<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/meson, branch v6.5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: meson: change usleep_range() to udelay() for atomic context</title>
<updated>2023-07-11T09:35:42+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-04T21:54:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6e2acbfe59b83043bc7ae1bb39fac4fc9dcd5a18'/>
<id>6e2acbfe59b83043bc7ae1bb39fac4fc9dcd5a18</id>
<content type='text'>
The function meson_clk_pll_enable() can be invoked under the enable_lock
spinlock from the clk core logic, which risks a kernel panic during the
usleep_range() call:

   BUG: scheduling while atomic: kworker/u4:2/36/0x00000002
   Modules linked in: g_ffs usb_f_fs libcomposite
   CPU: 1 PID: 36 Comm: kworker/u4:2 Not tainted 6.4.0-rc5 #273
   Workqueue: events_unbound async_run_entry_fn
   Call trace:
    dump_backtrace+0x9c/0x128
    show_stack+0x20/0x38
    dump_stack_lvl+0x48/0x60
    dump_stack+0x18/0x28
    __schedule_bug+0x58/0x78
    __schedule+0x828/0xa88
    schedule+0x64/0xd8
    schedule_hrtimeout_range_clock+0xd0/0x208
    schedule_hrtimeout_range+0x1c/0x30
    usleep_range_state+0x6c/0xa8
    meson_clk_pll_enable+0x1f4/0x310
    clk_core_enable+0x78/0x200
    clk_core_enable+0x58/0x200
    clk_core_enable+0x58/0x200
    clk_core_enable+0x58/0x200
    clk_enable+0x34/0x60

So it is required to use the udelay() function instead of usleep_range()
for the atomic context safety.

Fixes: b6ec400aa153 ("clk: meson: introduce new pll power-on sequence for A1 SoC family")
Reported-by: Jan Dakinevich &lt;yvdakinevich@sberdevices.ru&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230704215404.11533-1-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function meson_clk_pll_enable() can be invoked under the enable_lock
spinlock from the clk core logic, which risks a kernel panic during the
usleep_range() call:

   BUG: scheduling while atomic: kworker/u4:2/36/0x00000002
   Modules linked in: g_ffs usb_f_fs libcomposite
   CPU: 1 PID: 36 Comm: kworker/u4:2 Not tainted 6.4.0-rc5 #273
   Workqueue: events_unbound async_run_entry_fn
   Call trace:
    dump_backtrace+0x9c/0x128
    show_stack+0x20/0x38
    dump_stack_lvl+0x48/0x60
    dump_stack+0x18/0x28
    __schedule_bug+0x58/0x78
    __schedule+0x828/0xa88
    schedule+0x64/0xd8
    schedule_hrtimeout_range_clock+0xd0/0x208
    schedule_hrtimeout_range+0x1c/0x30
    usleep_range_state+0x6c/0xa8
    meson_clk_pll_enable+0x1f4/0x310
    clk_core_enable+0x78/0x200
    clk_core_enable+0x58/0x200
    clk_core_enable+0x58/0x200
    clk_core_enable+0x58/0x200
    clk_enable+0x34/0x60

So it is required to use the udelay() function instead of usleep_range()
for the atomic context safety.

Fixes: b6ec400aa153 ("clk: meson: introduce new pll power-on sequence for A1 SoC family")
Reported-by: Jan Dakinevich &lt;yvdakinevich@sberdevices.ru&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230704215404.11533-1-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: pll: remove unneeded semicolon</title>
<updated>2023-06-15T10:29:10+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2023-06-14T08:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b8533204885a4e1e643014eccb9c727c55f58ce0'/>
<id>b8533204885a4e1e643014eccb9c727c55f58ce0</id>
<content type='text'>
No functional modification involved.

./drivers/clk/meson/clk-pll.c:373:2-3: Unneeded semicolon.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230614084808.98819-1-jiapeng.chong@linux.alibaba.com
Fixes: b6ec400aa153 ("clk: meson: introduce new pll power-on sequence for A1 SoC family")
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional modification involved.

./drivers/clk/meson/clk-pll.c:373:2-3: Unneeded semicolon.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230614084808.98819-1-jiapeng.chong@linux.alibaba.com
Fixes: b6ec400aa153 ("clk: meson: introduce new pll power-on sequence for A1 SoC family")
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: a1: Staticize rtc clk</title>
<updated>2023-06-12T21:29:24+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2023-06-12T18:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e13dd04a242cc8c064b9af8cde38b8e9a548cf81'/>
<id>e13dd04a242cc8c064b9af8cde38b8e9a548cf81</id>
<content type='text'>
Sparse rightly complains that this symbol is supposed to be static.

Cc: Jian Hu &lt;jian.hu@amlogic.com&gt;
Cc: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Fixes: 84af914404db ("clk: meson: a1: add Amlogic A1 Peripherals clock controller driver")
Link: https://lore.kernel.org/r/20230612182332.371003-1-sboyd@kernel.org
Reviewed-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sparse rightly complains that this symbol is supposed to be static.

Cc: Jian Hu &lt;jian.hu@amlogic.com&gt;
Cc: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Fixes: 84af914404db ("clk: meson: a1: add Amlogic A1 Peripherals clock controller driver")
Link: https://lore.kernel.org/r/20230612182332.371003-1-sboyd@kernel.org
Reviewed-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: a1: add Amlogic A1 Peripherals clock controller driver</title>
<updated>2023-05-30T15:53:09+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=84af914404dbc01f388c440cac72428784b8a161'/>
<id>84af914404dbc01f388c440cac72428784b8a161</id>
<content type='text'>
Introduce Peripherals clock controller for Amlogic A1 SoC family.

A1 SoC has four clock controllers on the board: PLL, Peripherals, CPU,
and Audio.
This patchset adds support for Amlogic A1 Peripherals clock driver and
allows to generate clocks for all A1 SoC peripheral IPs.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-7-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce Peripherals clock controller for Amlogic A1 SoC family.

A1 SoC has four clock controllers on the board: PLL, Peripherals, CPU,
and Audio.
This patchset adds support for Amlogic A1 Peripherals clock driver and
allows to generate clocks for all A1 SoC peripheral IPs.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-7-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: a1: add Amlogic A1 PLL clock controller driver</title>
<updated>2023-05-30T15:53:05+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=28f3be518081b2127f98105fa9735a19812a33ca'/>
<id>28f3be518081b2127f98105fa9735a19812a33ca</id>
<content type='text'>
Introduce PLL clock controller for Amlogic A1 SoC family.
The clock unit is an APB slave module that is designed for generating all
of the internal and system clocks.
The SoC uses an external 24MHz crystal; there are 4 internal PLLs:
SYS_PLL/HIFI_PLL/USB_PLL/(FIXPLL), these PLLs generate 27 clock sources.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-5-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce PLL clock controller for Amlogic A1 SoC family.
The clock unit is an APB slave module that is designed for generating all
of the internal and system clocks.
The SoC uses an external 24MHz crystal; there are 4 internal PLLs:
SYS_PLL/HIFI_PLL/USB_PLL/(FIXPLL), these PLLs generate 27 clock sources.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-5-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: introduce new pll power-on sequence for A1 SoC family</title>
<updated>2023-05-30T15:53:00+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b6ec400aa153b27e056b2dfc5e830b724c053a04'/>
<id>b6ec400aa153b27e056b2dfc5e830b724c053a04</id>
<content type='text'>
Modern meson PLL IPs are a little bit different from early known PLLs.
The main difference is located in the init/enable/disable sequences; the
rate logic is the same.

In A1 PLL, the PLL enable sequence is different, so add new optional pll
reg bits and use the new power-on sequence to enable the PLL:
    1. enable the pll, delay for 10us
    2. enable the pll self-adaption current module, delay for 40us
    3. enable the lock detect module

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-3-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modern meson PLL IPs are a little bit different from early known PLLs.
The main difference is located in the init/enable/disable sequences; the
rate logic is the same.

In A1 PLL, the PLL enable sequence is different, so add new optional pll
reg bits and use the new power-on sequence to enable the PLL:
    1. enable the pll, delay for 10us
    2. enable the pll self-adaption current module, delay for 40us
    3. enable the lock detect module

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-3-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: make pll rst bit as optional</title>
<updated>2023-05-30T15:52:52+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-05-23T13:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=02f1e17c4106a24fabb27e1419cbcb144b4faa1b'/>
<id>02f1e17c4106a24fabb27e1419cbcb144b4faa1b</id>
<content type='text'>
Compared with the previous SoCs, self-adaption current module
is newly added for A1, and there is no reset parameter except the
fixed pll. Since we use clk-pll generic driver for A1 pll
implementation, rst bit should be optional to support new behavior.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-2-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compared with the previous SoCs, self-adaption current module
is newly added for A1, and there is no reset parameter except the
fixed pll. Since we use clk-pll generic driver for A1 pll
implementation, rst bit should be optional to support new behavior.

Signed-off-by: Jian Hu &lt;jian.hu@amlogic.com&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230523135351.19133-2-ddrokosov@sberdevices.ru
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: clk-cpu-dyndiv: switch from .round_rate to .determine_rate</title>
<updated>2023-01-13T14:14:12+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2022-12-25T21:26:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=716592fdb5e255a1b9dcb444822c9c1f9a1e248c'/>
<id>716592fdb5e255a1b9dcb444822c9c1f9a1e248c</id>
<content type='text'>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch clk-cpu-dyndiv over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-5-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch clk-cpu-dyndiv over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-5-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: sclk-div: switch from .round_rate to .determine_rate</title>
<updated>2023-01-13T14:14:12+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2022-12-25T21:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ac323943f7a4c5e5b7c5d4bd6c8225f62b94c43'/>
<id>9ac323943f7a4c5e5b7c5d4bd6c8225f62b94c43</id>
<content type='text'>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch sclk-div over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-4-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch sclk-div over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-4-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: meson: dualdiv: switch from .round_rate to .determine_rate</title>
<updated>2023-01-13T14:14:12+00:00</updated>
<author>
<name>Martin Blumenstingl</name>
<email>martin.blumenstingl@googlemail.com</email>
</author>
<published>2022-12-25T21:26:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=581f772566efea8a3fe6a166fe0b88febdba1b26'/>
<id>581f772566efea8a3fe6a166fe0b88febdba1b26</id>
<content type='text'>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch clk-dualdiv over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-3-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clk_ops.round_rate will be removed at some point. It's replacement is
.determine_rate. Switch clk-dualdiv over to use .determine_rate.

Signed-off-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Link: https://lore.kernel.org/r/20221225212632.2760126-3-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
