<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/meson, branch v4.16</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: meson-axg: fix potential NULL dereference in axg_clkc_probe()</title>
<updated>2018-01-10T21:24:36+00:00</updated>
<author>
<name>weiyongjun (A)</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-05T01:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9d548d80384732bad74c3046329e5dbdae098104'/>
<id>9d548d80384732bad74c3046329e5dbdae098104</id>
<content type='text'>
platform_get_resource() may return NULL, add proper
check to avoid potential NULL dereferencing.

This is detected by Coccinelle semantic patch.

@@
expression pdev, res, n, t, e, e1, e2;
@@

res = platform_get_resource(pdev, t, n);
+ if (!res)
+   return -EINVAL;
... when != res == NULL
e = devm_ioremap(e1, res-&gt;start, e2);

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
platform_get_resource() may return NULL, add proper
check to avoid potential NULL dereferencing.

This is detected by Coccinelle semantic patch.

@@
expression pdev, res, n, t, e, e1, e2;
@@

res = platform_get_resource(pdev, t, n);
+ if (!res)
+   return -EINVAL;
... when != res == NULL
e = devm_ioremap(e1, res-&gt;start, e2);

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'meson-clk-for-v4.16-3' of git://github.com/BayLibre/clk-meson into clk-meson</title>
<updated>2018-01-03T01:51:29+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2018-01-03T01:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=348c898cb897d6663548aada9d68c0d2d7cfba8e'/>
<id>348c898cb897d6663548aada9d68c0d2d7cfba8e</id>
<content type='text'>
Pull Amlogic clk driver update from Jerome Brunet:

 - Fix overflow in the mpll driver on 32bits arch

* tag 'meson-clk-for-v4.16-3' of git://github.com/BayLibre/clk-meson:
  clk: meson: mpll: use 64-bit maths in params_from_rate
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull Amlogic clk driver update from Jerome Brunet:

 - Fix overflow in the mpll driver on 32bits arch

* tag 'meson-clk-for-v4.16-3' of git://github.com/BayLibre/clk-meson:
  clk: meson: mpll: use 64-bit maths in params_from_rate
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson-axg: make local symbol axg_gp0_params_table static</title>
<updated>2017-12-28T18:42:07+00:00</updated>
<author>
<name>weiyongjun (A)</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2017-12-28T03:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=65e01ae3f295c6e79f56383dce58716a99d3d866'/>
<id>65e01ae3f295c6e79f56383dce58716a99d3d866</id>
<content type='text'>
Fixes the following sparse warning:

drivers/clk/meson/axg.c:260:25: warning:
 symbol 'axg_gp0_params_table' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the following sparse warning:

drivers/clk/meson/axg.c:260:25: warning:
 symbol 'axg_gp0_params_table' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson-axg: fix return value check in axg_clkc_probe()</title>
<updated>2017-12-28T18:42:05+00:00</updated>
<author>
<name>weiyongjun (A)</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2017-12-28T02:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4f8f7809e47b6af17032aad66f84d7c16444bd05'/>
<id>4f8f7809e47b6af17032aad66f84d7c16444bd05</id>
<content type='text'>
In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: mpll: use 64-bit maths in params_from_rate</title>
<updated>2017-12-23T22:14:20+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2017-12-23T21:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=86aacdca66774051cbc0958110a48074b57a060b'/>
<id>86aacdca66774051cbc0958110a48074b57a060b</id>
<content type='text'>
"rem * SDM_DEN" can easily overflow on the 32-bit Meson8 and Meson8b
SoCs if the "remainder" (after the division operation) is greater than
262143Hz. This is likely to happen since the input clock for the MPLLs
on Meson8 and Meson8b is "fixed_pll", which is running at a rate of
2550MHz.

One example where this was observed to be problematic was the Ethernet
clock calculation (which takes MPLL2 as input). When requesting a rate
of 125MHz there is a remainder of 2500000Hz.
The resulting MPLL2 rate before this patch was 127488329Hz.
The resulting MPLL2 rate after this patch is 124999103Hz.

Commit b609338b26f5 ("clk: meson: mpll: use 64bit math in
rate_from_params") already fixed a similar issue in rate_from_params.

Fixes: 007e6e5c5f01d3 ("clk: meson: mpll: add rw operation")
Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"rem * SDM_DEN" can easily overflow on the 32-bit Meson8 and Meson8b
SoCs if the "remainder" (after the division operation) is greater than
262143Hz. This is likely to happen since the input clock for the MPLLs
on Meson8 and Meson8b is "fixed_pll", which is running at a rate of
2550MHz.

One example where this was observed to be problematic was the Ethernet
clock calculation (which takes MPLL2 as input). When requesting a rate
of 125MHz there is a remainder of 2500000Hz.
The resulting MPLL2 rate before this patch was 127488329Hz.
The resulting MPLL2 rate after this patch is 124999103Hz.

Commit b609338b26f5 ("clk: meson: mpll: use 64bit math in
rate_from_params") already fixed a similar issue in rate_from_params.

Fixes: 007e6e5c5f01d3 ("clk: meson: mpll: add rw operation")
Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson-axg: add clock controller drivers</title>
<updated>2017-12-14T09:19:37+00:00</updated>
<author>
<name>Qiufang Dai</name>
<email>qiufang.dai@amlogic.com</email>
</author>
<published>2017-12-11T14:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=78b4af312f910e4f28ebf4cb0a8c1983daa16924'/>
<id>78b4af312f910e4f28ebf4cb0a8c1983daa16924</id>
<content type='text'>
Add clock controller drivers for Amlogic Meson-AXG SoC.

Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Signed-off-by: Qiufang Dai &lt;qiufang.dai@amlogic.com&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add clock controller drivers for Amlogic Meson-AXG SoC.

Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Signed-off-by: Qiufang Dai &lt;qiufang.dai@amlogic.com&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: make the spinlock naming more specific</title>
<updated>2017-12-14T09:12:41+00:00</updated>
<author>
<name>Yixun Lan</name>
<email>yixun.lan@amlogic.com</email>
</author>
<published>2017-12-11T14:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=27aad9054813b503836018aa58d1165f8d8befc8'/>
<id>27aad9054813b503836018aa58d1165f8d8befc8</id>
<content type='text'>
Make the spinlock more specific, so better for lockdep
debugging and ctags/grep.

Suggested-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the spinlock more specific, so better for lockdep
debugging and ctags/grep.

Suggested-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: gxbb: remove IGNORE_UNUSED from mmc clocks</title>
<updated>2017-12-08T20:37:19+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2017-12-04T13:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed3fb5af69afc802d6e29700fff3401ba99edac1'/>
<id>ed3fb5af69afc802d6e29700fff3401ba99edac1</id>
<content type='text'>
Remove CLK_IGNORE_UNUSED from mmc clocks. This was only needed while the
mmc driver incorrectly used the xtal as source instead of the mmc
clock. Now, the driver takes the correct clock, CCF is aware that the
clock is being used and we can remove this flag.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove CLK_IGNORE_UNUSED from mmc clocks. This was only needed while the
mmc driver incorrectly used the xtal as source instead of the mmc
clock. Now, the driver takes the correct clock, CCF is aware that the
clock is being used and we can remove this flag.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: gxbb: fix wrong clock for SARADC/SANA</title>
<updated>2017-11-27T13:33:38+00:00</updated>
<author>
<name>Yixun Lan</name>
<email>yixun.lan@amlogic.com</email>
</author>
<published>2017-11-07T14:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=75eccf5ed83250c0aeaeeb76f7288254ac0a87b4'/>
<id>75eccf5ed83250c0aeaeeb76f7288254ac0a87b4</id>
<content type='text'>
According to the datasheet, in Meson-GXBB/GXL series,
The clock gate bit for SARADC is HHI_GCLK_MPEG2 bit[22],
while clock gate bit for SANA is HHI_GCLK_MPEG0 bit[10].

Test passed at gxl-s905x-p212 board.

The following published datasheets are wrong and should be updated
[1] GXBB v1.1.4
[2] GXL v0.3_20170314

Fixes: 738f66d3211d ("clk: gxbb: add AmLogic GXBB clk controller driver")
Tested-by: Xingyu Chen &lt;xingyu.chen@amlogic.com&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the datasheet, in Meson-GXBB/GXL series,
The clock gate bit for SARADC is HHI_GCLK_MPEG2 bit[22],
while clock gate bit for SANA is HHI_GCLK_MPEG0 bit[10].

Test passed at gxl-s905x-p212 board.

The following published datasheets are wrong and should be updated
[1] GXBB v1.1.4
[2] GXL v0.3_20170314

Fixes: 738f66d3211d ("clk: gxbb: add AmLogic GXBB clk controller driver")
Tested-by: Xingyu Chen &lt;xingyu.chen@amlogic.com&gt;
Signed-off-by: Yixun Lan &lt;yixun.lan@amlogic.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: gxbb: Add VPU and VAPB clocks data</title>
<updated>2017-10-20T08:34:49+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>narmstrong@baylibre.com</email>
</author>
<published>2017-10-16T15:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=762a1f2098b2fd4f84ccdb62d5747fff1ad7f816'/>
<id>762a1f2098b2fd4f84ccdb62d5747fff1ad7f816</id>
<content type='text'>
The Amlogic Meson GX SoCs needs these two clocks to power up the
VPU power domain.

These two clocks are similar to the MALI clocks by having a glitch-free
mux and two similar clocks with gate, divider and muxes.

Acked-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
[narmstrong: removed the CLK_IGNORE_UNUSED on muxes and dividers]
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Amlogic Meson GX SoCs needs these two clocks to power up the
VPU power domain.

These two clocks are similar to the MALI clocks by having a glitch-free
mux and two similar clocks with gate, divider and muxes.

Acked-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
[narmstrong: removed the CLK_IGNORE_UNUSED on muxes and dividers]
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
