<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/clk.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>clk: Add missing &lt;dm/device.h&gt; to include/clk.h</title>
<updated>2025-10-28T18:12:20+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-07-02T01:05:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e15dd01422efda76dcb5346b37e9781af5fcb67c'/>
<id>e15dd01422efda76dcb5346b37e9781af5fcb67c</id>
<content type='text'>
In this header we make direct references to some dm/device.h functions
while not including the header directly. Add the missing include.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this header we make direct references to some dm/device.h functions
while not including the header directly. Add the missing include.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: add CONFIG_CLK_AUTO_ID</title>
<updated>2025-06-11T07:42:55+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2025-05-27T13:27:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0846bad0d08b53f6abaa4c8afe812dba93057424'/>
<id>0846bad0d08b53f6abaa4c8afe812dba93057424</id>
<content type='text'>
Add a new config CONFIG_CLK_AUTO_ID to support a unique clk id
for all the clock providers, managed by clk uclass, when the clock
reference arg[0] is the same.

When the CONFIG is activated, the clock id is limited to the lower
CLK_ID_SZ = 24 bits in default clock xlate function
and the sequence number + 1 of the clk provider device is
added for the 8 higher bits.

We use sequence number + 1 to avoid the "dummy" clock id = 0,
used for invalid clock when CCF is activated.

When this config is activated, the new function clk_get_id()
should be used to get back the internal reference to clock
for the each clock provider.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Cc: Lukasz Majewski &lt;lukma@denx.de&gt;
Cc: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new config CONFIG_CLK_AUTO_ID to support a unique clk id
for all the clock providers, managed by clk uclass, when the clock
reference arg[0] is the same.

When the CONFIG is activated, the clock id is limited to the lower
CLK_ID_SZ = 24 bits in default clock xlate function
and the sequence number + 1 of the clk provider device is
added for the 8 higher bits.

We use sequence number + 1 to avoid the "dummy" clock id = 0,
used for invalid clock when CCF is activated.

When this config is activated, the new function clk_get_id()
should be used to get back the internal reference to clock
for the each clock provider.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Cc: Lukasz Majewski &lt;lukma@denx.de&gt;
Cc: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Add clk_resolve_parent_clk()</title>
<updated>2025-03-24T11:51:34+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2025-03-23T15:58:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1054163c4dc79eef2732d1129990d47827ae1c06'/>
<id>1054163c4dc79eef2732d1129990d47827ae1c06</id>
<content type='text'>
Add clk_resolve_parent_clk() to resolve parent clock udevice name
based on clock-names DT property. This is used in SoC clock drivers
to look up the clock name in clock tables, which matches a clock
name in DT clock-names property, and convert it into udevice name
which is used by U-Boot clock framework to look up parent clock in
e.g. clk_register() using uclass_get_device_by_name(UCLASS_CLK,
parent_name, &amp;parent);

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add clk_resolve_parent_clk() to resolve parent clock udevice name
based on clock-names DT property. This is used in SoC clock drivers
to look up the clock name in clock tables, which matches a clock
name in DT clock-names property, and convert it into udevice name
which is used by U-Boot clock framework to look up parent clock in
e.g. clk_register() using uclass_get_device_by_name(UCLASS_CLK,
parent_name, &amp;parent);

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Revise help text for clk_get_parent_rate()</title>
<updated>2024-08-01T21:33:19+00:00</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2024-05-03T07:20:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=133f67a3610b5252e85828d86c5e9311f24b7faa'/>
<id>133f67a3610b5252e85828d86c5e9311f24b7faa</id>
<content type='text'>
The function returns the rate of the parent clock, the previous text
made no sense at all.

Fixes: 4aa78300a025 ("dm: clk: Define clk_get_parent_rate() for clk operations")
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function returns the rate of the parent clock, the previous text
made no sense at all.

Fixes: 4aa78300a025 ("dm: clk: Define clk_get_parent_rate() for clk operations")
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Remove clk_free</title>
<updated>2024-01-30T03:35:02+00:00</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2023-12-16T19:38:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9309f40a6831b1ac5cd0a7227b5c3717d34c812'/>
<id>c9309f40a6831b1ac5cd0a7227b5c3717d34c812</id>
<content type='text'>
This function is a no-op. Remove it.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is a no-op. Remove it.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Remove rfree</title>
<updated>2024-01-30T03:35:02+00:00</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2023-12-16T19:38:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=82719d3f409f93b2ce85145547c0bb91624a2c63'/>
<id>82719d3f409f93b2ce85145547c0bb91624a2c63</id>
<content type='text'>
Nothing uses this function. Remove it. Since clk_free no longer does
anything, just stub it out.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20231216193843.2463779-2-seanga2@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nothing uses this function. Remove it. Since clk_free no longer does
anything, just stub it out.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20231216193843.2463779-2-seanga2@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: clk: Make soc_clk_dump static</title>
<updated>2023-12-15T18:05:55+00:00</updated>
<author>
<name>Igor Prusov</name>
<email>ivprusov@sberdevices.ru</email>
</author>
<published>2023-11-09T10:55:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5666558a6cb04b2f731a7a13d0bbaefa528e7616'/>
<id>5666558a6cb04b2f731a7a13d0bbaefa528e7616</id>
<content type='text'>
After introducing dump to clk_ops there is no need to override or expose
this symbol anymore.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Tested-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Signed-off-by: Igor Prusov &lt;ivprusov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20231109105516.24892-9-ivprusov@sberdevices.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After introducing dump to clk_ops there is no need to override or expose
this symbol anymore.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Tested-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Signed-off-by: Igor Prusov &lt;ivprusov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20231109105516.24892-9-ivprusov@sberdevices.ru
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: also handle ENOENT in *_optional functions</title>
<updated>2023-11-01T19:14:51+00:00</updated>
<author>
<name>Yang Xiwen</name>
<email>forbidden405@outlook.com</email>
</author>
<published>2023-08-17T17:04:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c4b52fda6924e92c6745351f32c4cafc36034170'/>
<id>c4b52fda6924e92c6745351f32c4cafc36034170</id>
<content type='text'>
If the device does not specify any clocks in device tree, these
functions will return PTR_ERR(-ENOENT). This is not the intended
behavior and does not comply with linux kernel CCF. Fix that by
returning NULL under such circumstances instead.

Signed-off-by: Yang Xiwen &lt;forbidden405@outlook.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20230818-clk-fix-v1-3-49ec18f820bf@outlook.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the device does not specify any clocks in device tree, these
functions will return PTR_ERR(-ENOENT). This is not the intended
behavior and does not comply with linux kernel CCF. Fix that by
returning NULL under such circumstances instead.

Signed-off-by: Yang Xiwen &lt;forbidden405@outlook.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20230818-clk-fix-v1-3-49ec18f820bf@outlook.com
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: fix count parameter type for clk_release_all</title>
<updated>2023-11-01T19:13:55+00:00</updated>
<author>
<name>Eugen Hristev</name>
<email>eugen.hristev@collabora.com</email>
</author>
<published>2023-06-19T10:47:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b6a56f553318b4c0c8fb8b1ea05f2e15b2662ccb'/>
<id>b6a56f553318b4c0c8fb8b1ea05f2e15b2662ccb</id>
<content type='text'>
The second parameter for clk_release_all is used as an unsigned
(which makes sense) but the function prototype declares it as an int.
This causes warnings/error like such below:

include/clk.h:422:48: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion]
  422 |         return clk_release_all(bulk-&gt;clks, bulk-&gt;count);

To fix this, changed the type of the count to `unsigned int`

Fixes: 82a8a669b4f7 ("clk: add clk_release_all()")
Signed-off-by: Eugen Hristev &lt;eugen.hristev@collabora.com&gt;
Reviewed-by: Xavier Drudis Ferran &lt;xdrudis@tinet.cat&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20230619104752.278500-1-eugen.hristev@collabora.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The second parameter for clk_release_all is used as an unsigned
(which makes sense) but the function prototype declares it as an int.
This causes warnings/error like such below:

include/clk.h:422:48: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion]
  422 |         return clk_release_all(bulk-&gt;clks, bulk-&gt;count);

To fix this, changed the type of the count to `unsigned int`

Fixes: 82a8a669b4f7 ("clk: add clk_release_all()")
Signed-off-by: Eugen Hristev &lt;eugen.hristev@collabora.com&gt;
Reviewed-by: Xavier Drudis Ferran &lt;xdrudis@tinet.cat&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20230619104752.278500-1-eugen.hristev@collabora.com
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Allow clk_get_by_name() with NULL name</title>
<updated>2023-02-12T18:44:20+00:00</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2023-01-22T00:02:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2050f824e1367cb227d8e13a91c98577987fe413'/>
<id>2050f824e1367cb227d8e13a91c98577987fe413</id>
<content type='text'>
This allows devm_clock_get(dev, NULL) to work and get the first clock,
which is common in code ported from Linux.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Link: https://lore.kernel.org/r/20230122000252.53642-1-samuel@sholland.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows devm_clock_get(dev, NULL) to work and get the first clock,
which is common in code ported from Linux.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Link: https://lore.kernel.org/r/20230122000252.53642-1-samuel@sholland.org
</pre>
</div>
</content>
</entry>
</feed>
