<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/clk/mvebu, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/clk/mvebu?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/clk/mvebu?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-01T00:46:30Z</updated>
<entry>
<title>clk: mvebu: armada-37xx-tbg: Remove the unneeded result variable</title>
<updated>2022-10-01T00:46:30Z</updated>
<author>
<name>ye xingchen</name>
<email>ye.xingchen@zte.com.cn</email>
</author>
<published>2022-09-06T07:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f816ac1115b9d4f874efa04f721eba99cf69067e'/>
<id>urn:sha1:f816ac1115b9d4f874efa04f721eba99cf69067e</id>
<content type='text'>
Return the value of_clk_add_hw_provider() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: ye xingchen &lt;ye.xingchen@zte.com.cn&gt;
Link: https://lore.kernel.org/r/20220906072322.337253-1-ye.xingchen@zte.com.cn
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-22T23:22:53Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-18T21:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c19edff61210eb846bf8ec44c9f87d1ca9efdfd2'/>
<id>urn:sha1:c19edff61210eb846bf8ec44c9f87d1ca9efdfd2</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Link: https://lore.kernel.org/r/20220818210000.6600-1-wsa+renesas@sang-engineering.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it</title>
<updated>2022-02-17T22:06:12Z</updated>
<author>
<name>Wang Qing</name>
<email>wangqing@vivo.com</email>
</author>
<published>2022-02-15T01:55:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b191fe39a5ff2334b60ef4588ec15a0abd88f6a4'/>
<id>urn:sha1:b191fe39a5ff2334b60ef4588ec15a0abd88f6a4</id>
<content type='text'>
Use the helper function time_is_{before,after}_jiffies() to improve
code readability.

Signed-off-by: Wang Qing &lt;wangqing@vivo.com&gt;
Link: https://lore.kernel.org/r/1644890154-64915-3-git-send-email-wangqing@vivo.com
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths</title>
<updated>2021-09-15T01:25:16Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-04-23T07:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=af9617b419f77cf0b99702a7b2b0519da0d27715'/>
<id>urn:sha1:af9617b419f77cf0b99702a7b2b0519da0d27715</id>
<content type='text'>
If we exit the for_each_of_cpu_node loop early, the reference on the
current node must be decremented, otherwise there is a leak.

Fixes: f756e362d938 ("clk: mvebu: add CPU clock driver for Armada 7K/8K")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/545df946044fc1fc05a4217cdf0054be7a79e49e.1619161112.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: kirkwood: Fix a clocking boot regression</title>
<updated>2021-08-29T04:11:22Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2021-08-14T23:55:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aaedb9e00e5400220a8871180d23a83e67f29f63'/>
<id>urn:sha1:aaedb9e00e5400220a8871180d23a83e67f29f63</id>
<content type='text'>
Since a few kernel releases the Pogoplug 4 has crashed like this
during boot:

Unable to handle kernel NULL pointer dereference at virtual address 00000002
(...)
[&lt;c04116ec&gt;] (strlen) from [&lt;c00ead80&gt;] (kstrdup+0x1c/0x4c)
[&lt;c00ead80&gt;] (kstrdup) from [&lt;c04591d8&gt;] (__clk_register+0x44/0x37c)
[&lt;c04591d8&gt;] (__clk_register) from [&lt;c04595ec&gt;] (clk_hw_register+0x20/0x44)
[&lt;c04595ec&gt;] (clk_hw_register) from [&lt;c045bfa8&gt;] (__clk_hw_register_mux+0x198/0x1e4)
[&lt;c045bfa8&gt;] (__clk_hw_register_mux) from [&lt;c045c050&gt;] (clk_register_mux_table+0x5c/0x6c)
[&lt;c045c050&gt;] (clk_register_mux_table) from [&lt;c0acf3e0&gt;] (kirkwood_clk_muxing_setup.constprop.0+0x13c/0x1ac)
[&lt;c0acf3e0&gt;] (kirkwood_clk_muxing_setup.constprop.0) from [&lt;c0aceae0&gt;] (of_clk_init+0x12c/0x214)
[&lt;c0aceae0&gt;] (of_clk_init) from [&lt;c0ab576c&gt;] (time_init+0x20/0x2c)
[&lt;c0ab576c&gt;] (time_init) from [&lt;c0ab3d18&gt;] (start_kernel+0x3dc/0x56c)
[&lt;c0ab3d18&gt;] (start_kernel) from [&lt;00000000&gt;] (0x0)
Code: e3130020 1afffffb e12fff1e c08a1078 (e5d03000)

This is because the "powersave" mux clock 0 was provided in an unterminated
array, which is required by the loop in the driver:

        /* Count, allocate, and register clock muxes */
        for (n = 0; desc[n].name;)
                n++;

Here n will go out of bounds and then call clk_register_mux() on random
memory contents after the mux clock.

Fix this by terminating the array with a blank entry.

Fixes: 105299381d87 ("cpufreq: kirkwood: use the powersave multiplexer")
Cc: stable@vger.kernel.org
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Cc: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Cc: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20210814235514.403426-1-linus.walleij@linaro.org
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0</title>
<updated>2021-04-09T09:47:33Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-04-08T11:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e93033aff684641f71a436ca7a9d2a742126baaf'/>
<id>urn:sha1:e93033aff684641f71a436ca7a9d2a742126baaf</id>
<content type='text'>
When CPU frequency is at 250 MHz and set_rate() is called with 500 MHz (L1)
quickly followed by a call with 1 GHz (L0), the CPU does not necessarily
stay in L1 for at least 20ms as is required by Marvell errata.

This situation happens frequently with the ondemand cpufreq governor and
can be also reproduced with userspace governor. In most cases it causes CPU
to crash.

This change fixes the above issue and ensures that the CPU always stays in
L1 for at least 20ms when switching from any state to L0.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Acked-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Tested-by: Tomasz Maciej Nowak &lt;tmn505@gmail.com&gt;
Tested-by: Anders Trier Olesen &lt;anders.trier.olesen@gmail.com&gt;
Tested-by: Philip Soares &lt;philips@netisense.com&gt;
Fixes: 61c40f35f5cd ("clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to 1.2GHz")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz</title>
<updated>2021-04-09T09:47:33Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-04-08T11:42:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4decb9187589f61fe9fc2bc4d9b01160b0a610c5'/>
<id>urn:sha1:4decb9187589f61fe9fc2bc4d9b01160b0a610c5</id>
<content type='text'>
It was observed that the workaround introduced by commit 61c40f35f5cd
("clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to
1.2GHz") when base CPU frequency is 1.2 GHz is also required when base
CPU frequency is 1 GHz. Otherwise switching CPU frequency directly from
L2 (250 MHz) to L0 (1 GHz) causes a crash.

When base CPU frequency is just 800 MHz no crashed were observed during
switch from L2 to L0.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Acked-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Tested-by: Tomasz Maciej Nowak &lt;tmn505@gmail.com&gt;
Tested-by: Anders Trier Olesen &lt;anders.trier.olesen@gmail.com&gt;
Tested-by: Philip Soares &lt;philips@netisense.com&gt;
Fixes: 2089dc33ea0e ("clk: mvebu: armada-37xx-periph: add DVFS support for cpu clocks")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock</title>
<updated>2021-04-09T09:47:32Z</updated>
<author>
<name>Marek Behún</name>
<email>kabel@kernel.org</email>
</author>
<published>2021-04-08T11:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4e435a9dd26c46ac018997cc0562d50b1a96f372'/>
<id>urn:sha1:4e435a9dd26c46ac018997cc0562d50b1a96f372</id>
<content type='text'>
Remove the .set_parent method in clk_pm_cpu_ops.

This method was supposed to be needed by the armada-37xx-cpufreq driver,
but was never actually called due to wrong assumptions in the cpufreq
driver. After this was fixed in the cpufreq driver, this method is not
needed anymore.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Acked-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Tested-by: Pali Rohár &lt;pali@kernel.org&gt;
Tested-by: Tomasz Maciej Nowak &lt;tmn505@gmail.com&gt;
Tested-by: Anders Trier Olesen &lt;anders.trier.olesen@gmail.com&gt;
Tested-by: Philip Soares &lt;philips@netisense.com&gt;
Fixes: 2089dc33ea0e ("clk: mvebu: armada-37xx-periph: add DVFS support for cpu clocks")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: ap-cpu-clk: Demote non-conformant kernel-doc header</title>
<updated>2021-02-11T19:56:06Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2021-01-20T09:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=793eb69c9639c82c7ee0d55c98ea58ffe6964dae'/>
<id>urn:sha1:793eb69c9639c82c7ee0d55c98ea58ffe6964dae</id>
<content type='text'>
Not much effort has been put into this one.

Demote it for the time being at least.

Fixes the following W=1 kernel build warning(s):

 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'ratio_state_reg' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'divider_mask' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'cluster_offset' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'force_mask' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'divider_offset' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'divider_ratio' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'ratio_offset' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'ratio_state_offset' not described in 'cpu_dfs_regs'
 drivers/clk/mvebu/ap-cpu-clk.c:52: warning: Function parameter or member 'ratio_state_cluster_offset' not described in 'cpu_dfs_regs'

Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Stephen Boyd &lt;sboyd@kernel.org&gt;
Cc: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Cc: Omri Itach &lt;omrii@marvell.com&gt;
Cc: Gregory Clement &lt;gregory.clement@bootlin.com&gt;
Cc: linux-clk@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20210120093040.1719407-10-lee.jones@linaro.org
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9</title>
<updated>2020-12-19T23:51:18Z</updated>
<author>
<name>Terry Zhou</name>
<email>bjzhou@marvell.com</email>
</author>
<published>2020-11-06T10:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6f37689cf6b38fff96de52e7f0d3e78f22803ba0'/>
<id>urn:sha1:6f37689cf6b38fff96de52e7f0d3e78f22803ba0</id>
<content type='text'>
There is an error in the current code that the XTAL MODE
pin was set to NB MPP1_31 which should be NB MPP1_9.
The latch register of NB MPP1_9 has different offset of 0x8.

Signed-off-by: Terry Zhou &lt;bjzhou@marvell.com&gt;
[pali: Fix pin name in commit message]
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201106100039.11385-1-pali@kernel.org
Reviewed-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
</feed>
