<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/nxp, 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>Merge branch 'clk-divider-container' into clk-next</title>
<updated>2018-01-27T00:43:14+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2018-01-27T00:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=716d9b1d4a88493ec3e52957cc1026d32534ee67'/>
<id>716d9b1d4a88493ec3e52957cc1026d32534ee67</id>
<content type='text'>
* clk-divider-container:
  clk: divider: fix incorrect usage of container_of

Plus fixup sprd/div.c to pass the width too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* clk-divider-container:
  clk: divider: fix incorrect usage of container_of

Plus fixup sprd/div.c to pass the width too.
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: divider: fix incorrect usage of container_of</title>
<updated>2017-12-28T23:16:04+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2017-12-21T16:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=12a26c298d2a8b1cab498533fa65198e49e3afd3'/>
<id>12a26c298d2a8b1cab498533fa65198e49e3afd3</id>
<content type='text'>
divider_recalc_rate() is an helper function used by clock divider of
different types, so the structure containing the 'hw' pointer is not
always a 'struct clk_divider'

At the following line:
&gt; div = _get_div(table, val, flags, divider-&gt;width);

in several cases, the value of 'divider-&gt;width' is garbage as the actual
structure behind this memory is not a 'struct clk_divider'

Fortunately, this width value is used by _get_val() only when
CLK_DIVIDER_MAX_AT_ZERO flag is set. This has never been the case so
far when the structure is not a 'struct clk_divider'. This is probably
why we did not notice this bug before

Fixes: afe76c8fd030 ("clk: allow a clk divider with max divisor when zero")
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.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>
divider_recalc_rate() is an helper function used by clock divider of
different types, so the structure containing the 'hw' pointer is not
always a 'struct clk_divider'

At the following line:
&gt; div = _get_div(table, val, flags, divider-&gt;width);

in several cases, the value of 'divider-&gt;width' is garbage as the actual
structure behind this memory is not a 'struct clk_divider'

Fortunately, this width value is used by _get_val() only when
CLK_DIVIDER_MAX_AT_ZERO flag is set. This has never been the case so
far when the structure is not a 'struct clk_divider'. This is probably
why we did not notice this bug before

Fixes: afe76c8fd030 ("clk: allow a clk divider with max divisor when zero")
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: lpc32xx: pr_err() strings should end with newlines</title>
<updated>2017-12-07T06:39:53+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-11-24T06:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ea27e86dfa82c5d8481eae351ff8e6bdb202f6fc'/>
<id>ea27e86dfa82c5d8481eae351ff8e6bdb202f6fc</id>
<content type='text'>
pr_err() messages should end with a new-line to avoid other messages
being concatenated.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.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>
pr_err() messages should end with a new-line to avoid other messages
being concatenated.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: nxp: clk-lpc32xx: rename clk_gate_is_enabled()</title>
<updated>2017-09-01T01:35:44+00:00</updated>
<author>
<name>Gabriel Fernandez</name>
<email>gabriel.fernandez@st.com</email>
</author>
<published>2017-08-21T11:59:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=42d3c5f634de895cf01f066a1ea67140d653c36e'/>
<id>42d3c5f634de895cf01f066a1ea67140d653c36e</id>
<content type='text'>
We need to export clk_gate_is_enabled() from clk framework, then
to avoid compilation issue we have to rename clk_gate_is_enabled()
in NXP LPC32xx clock driver.
We changed all gate op with 'lpc32xx_' prefix:
lpc32xx_clk_gate_enable(),
lpc32xx_clk_gate_disable(),
lpc32xx_clk_gate_is_enabled().

Signed-off-by: Gabriel Fernandez &lt;gabriel.fernandez@st.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.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>
We need to export clk_gate_is_enabled() from clk framework, then
to avoid compilation issue we have to rename clk_gate_is_enabled()
in NXP LPC32xx clock driver.
We changed all gate op with 'lpc32xx_' prefix:
lpc32xx_clk_gate_enable(),
lpc32xx_clk_gate_disable(),
lpc32xx_clk_gate_is_enabled().

Signed-off-by: Gabriel Fernandez &lt;gabriel.fernandez@st.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: nxp: clk-lpc18xx-ccu: Unmap region obtained by of_iomap</title>
<updated>2016-11-02T00:32:25+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2016-09-20T10:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=45261a3e625dffbfab08f3b9cad84403ddd512e6'/>
<id>45261a3e625dffbfab08f3b9cad84403ddd512e6</id>
<content type='text'>
Free memory mapping, if lpc18xx_ccu_init() is not successful.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Joachim Eastwood &lt;manabian@gmail.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>
Free memory mapping, if lpc18xx_ccu_init() is not successful.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Joachim Eastwood &lt;manabian@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: lpc32xx: add a quirk for PWM and MS clock dividers</title>
<updated>2016-11-02T00:29:39+00:00</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2016-10-07T01:16:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f84d42a9cffc4ecd96f1ce3a038f841782142eb2'/>
<id>f84d42a9cffc4ecd96f1ce3a038f841782142eb2</id>
<content type='text'>
In common clock framework CLK_DIVIDER_ONE_BASED or'ed with
CLK_DIVIDER_ALLOW_ZERO flags indicates that
1) a divider clock may be set to zero value,
2) divider's zero value is interpreted as a non-divided clock.

On the LPC32xx platform clock dividers of PWM and memory card clocks
comply with the first condition, but zero value means a gated clock,
thus it may happen that the divider value is not updated when
the clock is enabled and the clock remains gated.

The change adds one-shot quirks, which check for zero value of divider
on initialization and set it to a non-zero value, therefore in runtime
a gate clock will work as expected.

Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Reviewed-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.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 common clock framework CLK_DIVIDER_ONE_BASED or'ed with
CLK_DIVIDER_ALLOW_ZERO flags indicates that
1) a divider clock may be set to zero value,
2) divider's zero value is interpreted as a non-divided clock.

On the LPC32xx platform clock dividers of PWM and memory card clocks
comply with the first condition, but zero value means a gated clock,
thus it may happen that the divider value is not updated when
the clock is enabled and the clock remains gated.

The change adds one-shot quirks, which check for zero value of divider
on initialization and set it to a non-zero value, therefore in runtime
a gate clock will work as expected.

Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Reviewed-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: nxp: clk-lpc32xx: Unmap region obtained by of_iomap</title>
<updated>2016-09-21T20:46:21+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2016-09-20T10:54:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=41d88559c31bfd2a7e5dd105362f0e39f810401c'/>
<id>41d88559c31bfd2a7e5dd105362f0e39f810401c</id>
<content type='text'>
Free memory mapping, if lpc32xx_clk_init is not successful.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.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>
Free memory mapping, if lpc32xx_clk_init is not successful.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: nxp: Use new macro CLK_OF_DECLARE_DRIVER</title>
<updated>2016-08-13T01:00:48+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2016-07-05T16:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9a0c42d216a6abef3b3637f9ceaac26e5f50a6a0'/>
<id>9a0c42d216a6abef3b3637f9ceaac26e5f50a6a0</id>
<content type='text'>
This driver initializes a clock provider via lpc18xx_creg_clk_init
and then continues the initialization on lpc18xx_creg_clk_probe.

Use the new macro to notify the clk subsystem about this behaviour.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
[sboyd@codeaurora.org: s/npx/nxp/ in subject]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver initializes a clock provider via lpc18xx_creg_clk_init
and then continues the initialization on lpc18xx_creg_clk_probe.

Use the new macro to notify the clk subsystem about this behaviour.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
[sboyd@codeaurora.org: s/npx/nxp/ in subject]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: lpc32xx: allow peripheral clock selection in device tree</title>
<updated>2016-07-07T00:51:14+00:00</updated>
<author>
<name>Sylvain Lemieux</name>
<email>slemieux@tycoint.com</email>
</author>
<published>2016-06-03T19:34:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=054e2730088a9c9340b5bc6927000f5c14a8b6d7'/>
<id>054e2730088a9c9340b5bc6927000f5c14a8b6d7</id>
<content type='text'>
This patch add the support to select the peripheral clock (PERIPH)
as a parent clock source using the "assigned-clock-parents"
parameter in the device tree.

Signed-off-by: Sylvain Lemieux &lt;slemieux@tycoint.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@baylibre.com&gt;
Link: lkml.kernel.org/r/1464982475-24738-1-git-send-email-slemieux.tyco@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add the support to select the peripheral clock (PERIPH)
as a parent clock source using the "assigned-clock-parents"
parameter in the device tree.

Signed-off-by: Sylvain Lemieux &lt;slemieux@tycoint.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@baylibre.com&gt;
Link: lkml.kernel.org/r/1464982475-24738-1-git-send-email-slemieux.tyco@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: nxp: lpc18xx: Initialize clk_init_data::flags to 0</title>
<updated>2016-05-06T17:55:11+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2016-05-06T17:55:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a444723569b48bc49e3175930eb9777582f48f44'/>
<id>a444723569b48bc49e3175930eb9777582f48f44</id>
<content type='text'>
Failure to initialize this flag to 0 by default can result in
stack junk filling the clk_init_data structure and weird things
happen. Joachim noticed that the critical clk feature started
triggering for these clks causing boot failures, when it really
shouldn't have happened:

BUG: scheduling while atomic: swapper/0/0x00000002
CPU: 0 PID: 0 Comm: swapper Not tainted
4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
Hardware name: NXP LPC18xx/43xx (Device Tree)
[&lt;2800be81&gt;] (unwind_backtrace) from [&lt;2800b22f&gt;] (show_stack+0xb/0xc)
[&lt;2800b22f&gt;] (show_stack) from [&lt;2801ea21&gt;] (__schedule_bug+0x2d/0x44)
[&lt;2801ea21&gt;] (__schedule_bug) from [&lt;281dc937&gt;] (__schedule+0x3b/0x268)
[&lt;281dc937&gt;] (__schedule) from [&lt;281dcbbb&gt;] (schedule+0x57/0x64)
[&lt;281dcbbb&gt;] (schedule) from [&lt;281de8ef&gt;] (schedule_timeout+0xfb/0x120)
[&lt;281de8ef&gt;] (schedule_timeout) from [&lt;28030fcd&gt;] (msleep+0xf/0x12)
[&lt;28030fcd&gt;] (msleep) from [&lt;28165a6d&gt;] (clk_creg_32k_prepare+0x1f/0x24)
[&lt;28165a6d&gt;] (clk_creg_32k_prepare) from [&lt;281620d5&gt;]
(clk_core_prepare+0x1d/0x36)
[&lt;281620d5&gt;] (clk_core_prepare) from [&lt;2816340b&gt;] (clk_register+0x22f/0x318)
[&lt;2816340b&gt;] (clk_register) from [&lt;282b06c9&gt;] (lpc18xx_creg_clk_init+0x55/0x84)
[&lt;282b06c9&gt;] (lpc18xx_creg_clk_init) from [&lt;282b0149&gt;] (of_clk_init+0xc1/0x12c)
[&lt;282b0149&gt;] (of_clk_init) from [&lt;282a665d&gt;] (time_init+0x15/0x20)
[&lt;282a665d&gt;] (time_init) from [&lt;282a457d&gt;] (start_kernel+0x169/0x274)
[&lt;282a457d&gt;] (start_kernel) from [&lt;28008025&gt;] (0x28008025)
bad: scheduling from the idle thread!
CPU: 0 PID: 0 Comm: swapper Tainted: G W
4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826

Fix this by initializing the flags member to 0.

Acked-by: Joachim Eastwood &lt;manabian@gmail.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>
Failure to initialize this flag to 0 by default can result in
stack junk filling the clk_init_data structure and weird things
happen. Joachim noticed that the critical clk feature started
triggering for these clks causing boot failures, when it really
shouldn't have happened:

BUG: scheduling while atomic: swapper/0/0x00000002
CPU: 0 PID: 0 Comm: swapper Not tainted
4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826
Hardware name: NXP LPC18xx/43xx (Device Tree)
[&lt;2800be81&gt;] (unwind_backtrace) from [&lt;2800b22f&gt;] (show_stack+0xb/0xc)
[&lt;2800b22f&gt;] (show_stack) from [&lt;2801ea21&gt;] (__schedule_bug+0x2d/0x44)
[&lt;2801ea21&gt;] (__schedule_bug) from [&lt;281dc937&gt;] (__schedule+0x3b/0x268)
[&lt;281dc937&gt;] (__schedule) from [&lt;281dcbbb&gt;] (schedule+0x57/0x64)
[&lt;281dcbbb&gt;] (schedule) from [&lt;281de8ef&gt;] (schedule_timeout+0xfb/0x120)
[&lt;281de8ef&gt;] (schedule_timeout) from [&lt;28030fcd&gt;] (msleep+0xf/0x12)
[&lt;28030fcd&gt;] (msleep) from [&lt;28165a6d&gt;] (clk_creg_32k_prepare+0x1f/0x24)
[&lt;28165a6d&gt;] (clk_creg_32k_prepare) from [&lt;281620d5&gt;]
(clk_core_prepare+0x1d/0x36)
[&lt;281620d5&gt;] (clk_core_prepare) from [&lt;2816340b&gt;] (clk_register+0x22f/0x318)
[&lt;2816340b&gt;] (clk_register) from [&lt;282b06c9&gt;] (lpc18xx_creg_clk_init+0x55/0x84)
[&lt;282b06c9&gt;] (lpc18xx_creg_clk_init) from [&lt;282b0149&gt;] (of_clk_init+0xc1/0x12c)
[&lt;282b0149&gt;] (of_clk_init) from [&lt;282a665d&gt;] (time_init+0x15/0x20)
[&lt;282a665d&gt;] (time_init) from [&lt;282a457d&gt;] (start_kernel+0x169/0x274)
[&lt;282a457d&gt;] (start_kernel) from [&lt;28008025&gt;] (0x28008025)
bad: scheduling from the idle thread!
CPU: 0 PID: 0 Comm: swapper Tainted: G W
4.6.0-rc6-next-20160505-00001-g5c8320450d1c #826

Fix this by initializing the flags member to 0.

Acked-by: Joachim Eastwood &lt;manabian@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
