<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/clk.c, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/cmd/clk.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/cmd/clk.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-02-12T18:37:56Z</updated>
<entry>
<title>cmd: clk: probe the clock before dump them</title>
<updated>2023-02-12T18:37:56Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-12-13T13:57:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c40251c120fac5a85fb445b6b2c7db5d18792e2a'/>
<id>urn:sha1:c40251c120fac5a85fb445b6b2c7db5d18792e2a</id>
<content type='text'>
The clock UCLASS need to be probed to allow availability of the
private data (struct clk *), get in show_clks() with dev_get_clk_ptr()
before use them.

Without this patch the clock dump can cause crash because all the
private data are not available before calling the API clk_get_rate().

It is the case for the SCMI clocks, priv-&gt;channel is needed for
scmi_clk_get_rate() and it is initialized only in scmi_clk_probe().
This issue causes a crash for "clk dump" command on STM32MP135F-DK board
for SCMI clock not yet probed.

Fixes: 1a725e229096 ("clk: fix clock tree dump to properly dump out every registered clock")
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20221213145708.v2.1.Ia0bc6b272f1e2e3f37873c61d79138c2663c4055@changeid
</content>
</entry>
<entry>
<title>cmd: clk: fix long help message</title>
<updated>2022-02-25T06:41:04Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-01-31T16:21:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=92a1bba85761e4dd5c0647c48048423bceef4749'/>
<id>urn:sha1:92a1bba85761e4dd5c0647c48048423bceef4749</id>
<content type='text'>
Fix the long help message for "clk setfreq" command

Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20220131172131.4.Ic863c28ffdcc15b3f4616434c2efd88b4e45495c@changeid
</content>
</entry>
<entry>
<title>cmd: clk: update result of do_clk_setfreq</title>
<updated>2022-02-25T06:41:04Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-01-31T16:21:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=534859ac6b2fecb631457736e77e9d0df1e57616'/>
<id>urn:sha1:534859ac6b2fecb631457736e77e9d0df1e57616</id>
<content type='text'>
Update the result of do_clk_setfreq and always returns a CMD_RET_ value
(-EINVAL was a possible result).

This patch avoid the CLI output "exit not allowed from main input shell."

Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20220131172131.3.Iec2029edb7fc0b29e13bcb86058ad2f614f62779@changeid
</content>
</entry>
<entry>
<title>cmd: clk: replace clk_lookup by uclass_get_device_by_name</title>
<updated>2022-02-25T06:41:04Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-01-31T16:21:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=afcc26140bc6bff7c23ce02dbba7882c97d2c14a'/>
<id>urn:sha1:afcc26140bc6bff7c23ce02dbba7882c97d2c14a</id>
<content type='text'>
The function clk_lookup can be replaced by a direct call
to uclass_get_device_by_name for UCLASS_CLK.

This patch removes duplicated codes by the generic DM API and avoids
issue in clk_lookup because result of uclass_get_device wasn't tested;
when ret &lt; 0, dev = NULL and dev-&gt;name is invalid, the next function
call strcmp(name, dev-&gt;name) causes a crash.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220131172131.2.I7bc7762eff1e31ab7ff5b34c416ee03b8fe52200@changeid
</content>
</entry>
<entry>
<title>cmd: clk: test the number of argument in setfreq command</title>
<updated>2022-02-25T06:41:04Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2022-01-31T16:21:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3386fb1e485da7f206488ed206a61ae811885d90'/>
<id>urn:sha1:3386fb1e485da7f206488ed206a61ae811885d90</id>
<content type='text'>
Test the number of argument in setfreq command to avoid a crash when
the command setfreq is called without argument:

  STM32MP&gt; clk setfreq
  data abort
  pc : [&lt;ddba3f18&gt;]	   lr : [&lt;ddba3f89&gt;]
  reloc pc : [&lt;c018ff18&gt;]	   lr : [&lt;c018ff89&gt;]
  sp : dbaf45b8  ip : ddb1d859	 fp : 00000002
  r10: dbb3fd80  r9 : dbb11e90	 r8 : ddbf38cc
  r7 : ddb39725  r6 : 00000000	 r5 : 00000000  r4 : dbb3fd84
  r3 : dbb3fd84  r2 : 0000000a	 r1 : dbaf45bc  r0 : 00000011
  Flags: nzCv  IRQs off  FIQs off  Mode SVC_32 (T)
  Code: 4dd3 1062 85a3 ddbd (7803) 2b30
  Resetting CPU ...

Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Link: https://lore.kernel.org/r/20220131172131.1.I32a8f213d330dccd922f7aafc60d3d63fcbe8615@changeid
</content>
</entry>
<entry>
<title>global: Convert simple_strtoul() with decimal to dectoul()</title>
<updated>2021-08-02T17:32:14Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-07-24T15:03:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0b1284eb52578e15ec611adc5fee1a9ae68dadea'/>
<id>urn:sha1:0b1284eb52578e15ec611adc5fee1a9ae68dadea</id>
<content type='text'>
It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>clk: add support for setting clk rate from cmdline</title>
<updated>2021-06-11T11:04:52Z</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2021-06-11T08:45:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7ab418fbe61275efb5c89cff48bbdd299eb1a22e'/>
<id>urn:sha1:7ab418fbe61275efb5c89cff48bbdd299eb1a22e</id>
<content type='text'>
Add new clk subcommand "clk setfreq", for setting up a clock rate
directly from u-boot cmdline. This is handy for any debugging purposes
towards clocks.

Acked-by: Lukasz Majewski &lt;lukma@denx.de&gt;
Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tero Kristo &lt;kristo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: fix clock tree dump to properly dump out every registered clock</title>
<updated>2021-06-11T11:04:52Z</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2021-06-11T08:45:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a725e229096385b4fb8d59247584435779d0161'/>
<id>urn:sha1:1a725e229096385b4fb8d59247584435779d0161</id>
<content type='text'>
Some clocks are not associated to a DM node, so just parsing the DM is not
enough. This is especially true for root clocks, which typically don't have
any parents. Instead, fetch every registered UCLASS_CLK instance, and dump
these out.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Signed-off-by: Tero Kristo &lt;kristo@kernel.org&gt;
</content>
</entry>
<entry>
<title>cmd: clk: correctly handle depth for clk dump</title>
<updated>2020-08-24T09:03:26Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-07-30T12:04:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=689ca8c5d123445a1d23f515fd1c8fb407cfb622'/>
<id>urn:sha1:689ca8c5d123445a1d23f515fd1c8fb407cfb622</id>
<content type='text'>
Update depth only when clock uclass is found to have correct display
of command "clk dump".

Without this patch, the displayed depth is the binding depth for
all the uclass and that can be strange as only clock uclass nodes
are displayed.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cmd: clk: cosmetic: correct code alignment in show_clks</title>
<updated>2020-08-24T09:03:26Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-07-30T12:04:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cc6328412c3ba40c324f531fa5648d08573db110'/>
<id>urn:sha1:cc6328412c3ba40c324f531fa5648d08573db110</id>
<content type='text'>
Correct code alignment in show_clks() function.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
