<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/clk/nxp, branch v4.14.286</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-12T10:32:13+00:00</updated>
<entry>
<title>clk: divider: fix incorrect usage of container_of</title>
<updated>2018-04-12T10:32:13+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.radix-linux.su/kernel/linux.git/commit/?id=e6bc3a4b0c23ed8d754692fa15ceb280e3facc51'/>
<id>urn:sha1:e6bc3a4b0c23ed8d754692fa15ceb280e3facc51</id>
<content type='text'>
[ Upstream commit 12a26c298d2a8b1cab498533fa65198e49e3afd3 ]

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;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</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.radix-linux.su/kernel/linux.git/commit/?id=42d3c5f634de895cf01f066a1ea67140d653c36e'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=45261a3e625dffbfab08f3b9cad84403ddd512e6'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=f84d42a9cffc4ecd96f1ce3a038f841782142eb2'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=41d88559c31bfd2a7e5dd105362f0e39f810401c'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=9a0c42d216a6abef3b3637f9ceaac26e5f50a6a0'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=054e2730088a9c9340b5bc6927000f5c14a8b6d7'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=a444723569b48bc49e3175930eb9777582f48f44'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>clk: add lpc18xx creg clk driver</title>
<updated>2016-03-04T20:52:10+00:00</updated>
<author>
<name>Joachim Eastwood</name>
<email>manabian@gmail.com</email>
</author>
<published>2016-03-03T21:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=378523d1500314637ae07bb604475a98f01bfa4c'/>
<id>urn:sha1:378523d1500314637ae07bb604475a98f01bfa4c</id>
<content type='text'>
The CREG block on lpc18xx contains configuration register
for two low power clocks. Support enabling of these two
clocks with a clk driver that access CREG trough the
syscon regmap interface.

These clocks are needed to support peripherals like the
internal RTC on lpc18xx.

Signed-off-by: Joachim Eastwood &lt;manabian@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: lpc32xx: fix compilation warning</title>
<updated>2016-03-03T19:41:43+00:00</updated>
<author>
<name>Sylvain Lemieux</name>
<email>slemieux@tycoint.com</email>
</author>
<published>2016-02-23T19:56:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8626556f259331aac23c0e274aed24420f0e5403'/>
<id>urn:sha1:8626556f259331aac23c0e274aed24420f0e5403</id>
<content type='text'>
Remove the following false positives compilation warning:
- drivers/clk/nxp/clk-lpc32xx.c: In function 'lpc32xx_clk_register':
  warning: 'hw' may be used uninitialized in this function [-Wmaybe-uninitialized]
- drivers/clk/nxp/clk-lpc32xx.c: In function 'clk_hclk_pll_round_rate':
  warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
  warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
  warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]

Tested using gcc version 4.7.3.

Signed-off-by: Sylvain Lemieux &lt;slemieux@tycoint.com&gt;
[sboyd@codeaurora.org: Drop assignment of hw to NULL as return
silences it and is less likely to lead to hiding problems later]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
</feed>
