<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/clk/imx/clk.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-05-18T14:40:22Z</updated>
<entry>
<title>clk: imx: drop imx_unregister_clocks</title>
<updated>2023-05-18T14:40:22Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2023-05-06T09:08:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6077af232cf58bfa4203c2364f99e0218aac7667'/>
<id>urn:sha1:6077af232cf58bfa4203c2364f99e0218aac7667</id>
<content type='text'>
There is no user using imx_unregister_clocks, so drop it.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20230506090856.3599035-1-peng.fan@oss.nxp.com
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: imx: add imx_obtain_fixed_of_clock()</title>
<updated>2023-01-31T12:45:14Z</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2023-01-31T08:46:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7757731053406dd00ad39fd136092ff05ec6fffe'/>
<id>urn:sha1:7757731053406dd00ad39fd136092ff05ec6fffe</id>
<content type='text'>
Add imx_obtain_fixed_of_clock() to optionally add clock not configured in
the devicetree.

Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Link: https://lore.kernel.org/r/20230131084642.709385-15-o.rempel@pengutronix.de
</content>
</entry>
<entry>
<title>clk: imx: remove clk_count of imx_register_uart_clocks</title>
<updated>2023-01-29T18:29:29Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2023-01-04T11:00:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2d5513bf7563b425b74867c254a7352373613b74'/>
<id>urn:sha1:2d5513bf7563b425b74867c254a7352373613b74</id>
<content type='text'>
The clk count has been get with of_clk_get_parent_count, there is
no need to pass clk_count from users.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Link: https://lore.kernel.org/r/20230104110032.1220721-4-peng.fan@oss.nxp.com
</content>
</entry>
<entry>
<title>clk: imx: get stdout clk count from device tree</title>
<updated>2023-01-29T18:29:26Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2023-01-04T11:00:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8658f0acc8b0ab67f66b028e8f6136038b7b7379'/>
<id>urn:sha1:8658f0acc8b0ab67f66b028e8f6136038b7b7379</id>
<content type='text'>
Currently the clk_count is specified by API users, but this
parameter is wrongly used, for example, i.MX8M clk driver use 4,
however the uart device tree node only use 2 clock entries. So
let using of_clk_get_parent_count to get the exact clock count.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Link: https://lore.kernel.org/r/20230104110032.1220721-3-peng.fan@oss.nxp.com
</content>
</entry>
<entry>
<title>clk: imx: avoid memory leak</title>
<updated>2023-01-29T18:29:17Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2023-01-04T11:00:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f4419db4086e8c31821da14140e81498516a3c75'/>
<id>urn:sha1:f4419db4086e8c31821da14140e81498516a3c75</id>
<content type='text'>
In case imx_register_uart_clocks return early, the imx_uart_clocks
memory will be no freed. So execute kfree always to avoid memory leak.

Fixes: 379c9a24cc23 ("clk: imx: Fix reparenting of UARTs not associated with stdout")
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Link: https://lore.kernel.org/r/20230104110032.1220721-2-peng.fan@oss.nxp.com
</content>
</entry>
<entry>
<title>clk: imx: rename imx_obtain_fixed_clk_hw() to imx_get_clk_hw_by_name()</title>
<updated>2022-11-25T09:22:15Z</updated>
<author>
<name>Dario Binacchi</name>
<email>dario.binacchi@amarulasolutions.com</email>
</author>
<published>2022-11-13T18:08:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8178e245fa953f793670147368642717fcdb302e'/>
<id>urn:sha1:8178e245fa953f793670147368642717fcdb302e</id>
<content type='text'>
The imx_obtain_fixed_clk_hw name was wrong and misleading. Renaming it
to imx_get_clk_hw_by_name clarifies the purpose of the function, and
will allow it to be used not only for fixed rate clocks but also in
wider contexts.

No functional changes intended.

The replacements were made with the following command:

grep -rl 'imx_obtain_fixed_clk_hw' ./ | \
     xargs sed -i 's/imx_obtain_fixed_clk_hw/imx_get_clk_hw_by_name/g'

Tested on a BSH SystemMaster (SMM) S2 board.

Signed-off-by: Dario Binacchi &lt;dario.binacchi@amarulasolutions.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Link: https://lore.kernel.org/r/20221113180839.1625832-1-dario.binacchi@amarulasolutions.com
</content>
</entry>
<entry>
<title>clk: imx: Add check for kcalloc</title>
<updated>2022-04-12T11:00:20Z</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2022-03-10T08:02:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed713e2bc093239ccd380c2ce8ae9e4162f5c037'/>
<id>urn:sha1:ed713e2bc093239ccd380c2ce8ae9e4162f5c037</id>
<content type='text'>
As the potential failure of the kcalloc(),
it should be better to check it in order to
avoid the dereference of the NULL pointer.

Fixes: 379c9a24cc23 ("clk: imx: Fix reparenting of UARTs not associated with stdout")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Link: https://lore.kernel.org/r/20220310080257.1988412-1-jiasheng@iscas.ac.cn
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: add mcore_booted module paratemter</title>
<updated>2022-04-12T08:17:43Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2022-02-28T12:41:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=19565ea12d61c69ef2be97a97b426ba5c55572ff'/>
<id>urn:sha1:19565ea12d61c69ef2be97a97b426ba5c55572ff</id>
<content type='text'>
Add mcore_booted boot parameter which could simplify AMP clock
management. To i.MX8M, there is CCM(clock control Module) to generate
clock root clock, anatop(analog PLL module) to generate PLL, and CCGR
(clock gating) to gate clocks to peripherals. As below:
  anatop-&gt;ccm-&gt;ccgr-&gt;peripheral

Linux handles the clock management and the auxiliary core is under
control of Linux. Although there is per hardware domain control for CCGR
and CCM, auxiliary core normally only use CCGR hardware domain control
to avoid linux gate off the clk to peripherals and leave CCM ana anatop
to Linux.

Per NXP hardware design, because CCGR already support gate to
peripherals, and clk root gate power leakage is negligible. So
when in AMP case, we could not register the clk root gate.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Link: https://lore.kernel.org/r/20220228124112.3974242-1-peng.fan@oss.nxp.com
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: Fix reparenting of UARTs not associated with stdout</title>
<updated>2021-04-04T19:39:04Z</updated>
<author>
<name>Adam Ford</name>
<email>aford173@gmail.com</email>
</author>
<published>2021-03-13T12:28:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=379c9a24cc239000b1dec53db02fe17a86947423'/>
<id>urn:sha1:379c9a24cc239000b1dec53db02fe17a86947423</id>
<content type='text'>
Most if not all i.MX SoC's call a function which enables all UARTS.
This is a problem for users who need to re-parent the clock source,
because any attempt to change the parent results in an busy error
due to the fact that the clocks have been enabled already.

  clk: failed to reparent uart1 to sys_pll1_80m: -16

Instead of pre-initializing all UARTS, scan the device tree to see
which UART clocks are associated to stdout, and only enable those
UART clocks if it's needed early.  This will move initialization of
the remaining clocks until after the parenting of the clocks.

When the clocks are shutdown, this mechanism will also disable any
clocks that were pre-initialized.

Fixes: 9461f7b33d11c ("clk: fix CLK_SET_RATE_GATE with clock rate protection")
Suggested-by: Aisheng Dong &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Reviewed-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
Tested-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Abel Vesa &lt;abel.vesa@nxp.com&gt;
</content>
</entry>
<entry>
<title>clk: imx: Explicitly include bits.h</title>
<updated>2020-08-22T12:36:57Z</updated>
<author>
<name>Anson Huang</name>
<email>Anson.Huang@nxp.com</email>
</author>
<published>2020-08-04T23:17:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7d6b5e4f2445728b9eca71f3fc21fd453d6b36b7'/>
<id>urn:sha1:7d6b5e4f2445728b9eca71f3fc21fd453d6b36b7</id>
<content type='text'>
It is better to explicitly include the required header file rather
then get it through some recursive include.

Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Shawn Guo &lt;shawnguo@kernel.org&gt;
</content>
</entry>
</feed>
