<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/clk/imx/clk-scu.h, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=master</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-02-24T11:54:17Z</updated>
<entry>
<title>clk: scu/imx8qxp: do not register driver in probe()</title>
<updated>2026-02-24T11:54:17Z</updated>
<author>
<name>Danilo Krummrich</name>
<email>dakr@kernel.org</email>
</author>
<published>2026-02-12T23:58:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=78437ab3b769f80526416570f60173c89858dd84'/>
<id>urn:sha1:78437ab3b769f80526416570f60173c89858dd84</id>
<content type='text'>
imx_clk_scu_init() registers the imx_clk_scu_driver while commonly being
called from IMX driver's probe() callbacks.

However, it neither makes sense to register drivers from probe()
callbacks of other drivers, nor does the driver core allow registering
drivers with a device lock already being held.

The latter was revealed by commit dc23806a7c47 ("driver core: enforce
device_lock for driver_match_device()") leading to a deadlock condition
described in [1].

Besides that, nothing seems to unregister the imx_clk_scu_driver once
the corresponding driver module is unloaded, which leaves the
driver-core with a dangling pointer.

Also, if there are multiple matching devices for the imx8qxp_clk_driver,
imx8qxp_clk_probe() calls imx_clk_scu_init() multiple times.  However,
any subsequent call after the first one will fail, since the driver-core
does not allow to register the same struct platform_driver multiple
times.

Hence, register the imx_clk_scu_driver from module_init() and unregister
it in module_exit().

Note that we first register the imx8qxp_clk_driver and then call
imx_clk_scu_module_init() to avoid having to call
imx_clk_scu_module_exit() in the unwind path of imx8qxp_clk_init().

Fixes: dc23806a7c47 ("driver core: enforce device_lock for driver_match_device()")
Fixes: 220175cd3979 ("clk: imx: scu: fix build break when compiled as modules")
Reported-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Closes: https://lore.kernel.org/lkml/13955113.uLZWGnKmhe@steina-w/
Tested-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt; # TQMa8x/MBa8x
Link: https://lore.kernel.org/lkml/DFU7CEPUSG9A.1KKGVW4HIPMSH@kernel.org/ [1]
Acked-by: Abel Vesa &lt;abelvesa@kernel.org&gt;
Reviewed-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://patch.msgid.link/20260212235842.85934-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: imx: Add imx8dxl clk driver</title>
<updated>2022-01-29T13:12:07Z</updated>
<author>
<name>Jacky Bai</name>
<email>ping.bai@nxp.com</email>
</author>
<published>2021-12-17T13:25:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=036a4b4b4dfa6c56806b71daf8589044ff7aeeaa'/>
<id>urn:sha1:036a4b4b4dfa6c56806b71daf8589044ff7aeeaa</id>
<content type='text'>
Add files for imx8dxl clk driver which is based on imx8qxp clock driver.

Signed-off-by: Jacky Bai &lt;ping.bai@nxp.com&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/1639747533-9778-1-git-send-email-abel.vesa@nxp.com
</content>
</entry>
<entry>
<title>clk: imx8qm: add clock valid resource checking</title>
<updated>2021-06-14T09:33:22Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2021-04-23T03:33:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=afd0406b4663014ef1f5993454db89c8a0e8bb42'/>
<id>urn:sha1:afd0406b4663014ef1f5993454db89c8a0e8bb42</id>
<content type='text'>
Add imx8qm clock valid resource checking mechanism

Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx8qxp: add clock valid checking mechnism</title>
<updated>2021-06-14T09:33:19Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2021-04-23T03:33:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5964012ce37e66d2588a9bc82f7184a008851cac'/>
<id>urn:sha1:5964012ce37e66d2588a9bc82f7184a008851cac</id>
<content type='text'>
clk-imx8qxp is a common SCU clock driver used by both QM and QXP
platforms. The clock numbers vary a bit between those two platforms.
This patch introduces a mechanism to only register the valid clocks
for one platform by checking the clk resource id table.

Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: scu: add gpr clocks support</title>
<updated>2021-06-14T09:33:17Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2021-04-23T03:33:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5392c5de096a1cad7cc06265a8cbf18de2da22c7'/>
<id>urn:sha1:5392c5de096a1cad7cc06265a8cbf18de2da22c7</id>
<content type='text'>
SCU clock protocol supports a few clocks based on GPR controller
registers including mux/divider/gate.
Add a generic clock register API to support them all.

Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: scu: remove legacy scu clock binding support</title>
<updated>2021-06-14T09:33:14Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2021-04-23T03:33:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=91e916771de0abaf58094aa9375cd0227eca102a'/>
<id>urn:sha1:91e916771de0abaf58094aa9375cd0227eca102a</id>
<content type='text'>
Legacy scu clock binding are not maintained anymore, it has a very
limited clocks supported during initial upstreaming and obviously
unusable by products. So it's meaningless to keep it in
kernel which worse the code readability.
Remove it to keep code much cleaner.

Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: lpcg: add suspend/resume support</title>
<updated>2020-10-26T02:54:08Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2020-07-29T08:00:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ea0c5cbaf8b70fd6fe0269fb0b951965c82229cc'/>
<id>urn:sha1:ea0c5cbaf8b70fd6fe0269fb0b951965c82229cc</id>
<content type='text'>
LPCG clock state may be lost when it's power domain is completely
off during system suspend/resume and we need save and restore the
state properly.

Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Shawn Guo &lt;shawnguo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: imx: lpcg: allow lpcg clk to take device pointer</title>
<updated>2020-10-26T02:54:02Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2020-07-29T08:00:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a4bfc85ccf374fb4ff10c806a270bf241598a70a'/>
<id>urn:sha1:a4bfc85ccf374fb4ff10c806a270bf241598a70a</id>
<content type='text'>
Used to support runtime pm.

Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Shawn Guo &lt;shawnguo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: imx: imx8qxp-lpcg: add parsing clocks from device tree</title>
<updated>2020-10-26T02:54:00Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2020-07-29T08:00:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8'/>
<id>urn:sha1:d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8</id>
<content type='text'>
One LPCG controller supports up to 8 clock outputs while each of them
is fixed to 4 bits.  It supports only gating function with fixed bits.
So we can use the clk-indices to fetch the corresponding clock idx from
device tree. With this way, we can write a generic LPCG clock drivers.

This patch add that support to parse clocks from device tree.

Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Shawn Guo &lt;shawnguo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: imx: scu: allow scu clk to take device pointer</title>
<updated>2020-10-26T02:53:51Z</updated>
<author>
<name>Dong Aisheng</name>
<email>aisheng.dong@nxp.com</email>
</author>
<published>2020-07-29T08:00:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2f1a2c1d00bc9417f5faa54777a23a52f054e9cf'/>
<id>urn:sha1:2f1a2c1d00bc9417f5faa54777a23a52f054e9cf</id>
<content type='text'>
Used to support runtime pm.

Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Shawn Guo &lt;shawnguo@kernel.org&gt;
</content>
</entry>
</feed>
