<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/clk/rockchip, branch linux-3.18.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2018-11-10T15:39:17+00:00</updated>
<entry>
<title>clk: rockchip: fix deadlock possibility in cpuclk</title>
<updated>2018-11-10T15:39:17+00:00</updated>
<author>
<name>Heiko Stübner</name>
<email>heiko@sntech.de</email>
</author>
<published>2015-01-16T16:52:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=db03188bc33b11d6526526c5af8841e77bc1c16c'/>
<id>urn:sha1:db03188bc33b11d6526526c5af8841e77bc1c16c</id>
<content type='text'>
[ Upstream commit a5e1baf7dca10f8cf945394034013260297bc416 ]

Lockdep reported a possible deadlock between the cpuclk lock and for example
the i2c driver.

       CPU0                    CPU1
       ----                    ----
  lock(clk_lock);
                               local_irq_disable();
                               lock(&amp;(&amp;i2c-&gt;lock)-&gt;rlock);
                               lock(clk_lock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;i2c-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

The generic clock-types of the core ccf already use spin_lock_irqsave when
touching clock registers, so do the same for the cpuclk.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
[mturquette@linaro.org: removed initialization of "flags"]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: free memory in error cases when registering clock branches</title>
<updated>2016-07-12T12:48:01+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2016-02-02T03:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35807de76e1c2b7d15eea2f947983fcd043a2db0'/>
<id>urn:sha1:35807de76e1c2b7d15eea2f947983fcd043a2db0</id>
<content type='text'>
[ Upstream commit 2467b6745e0ae9c6cdccff24c4cceeb14b1cce3f ]

Add free memeory if rockchip_clk_register_branch fails.

Fixes: a245fecbb806 ("clk: rockchip: add basic infrastructure...")
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: Add pclk_peri to critical clocks on RK3066/RK3188</title>
<updated>2016-04-18T12:49:15+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@gmail.com</email>
</author>
<published>2015-08-23T09:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e2a09ee529370549b13a5eb425b911950ceb6c0a'/>
<id>urn:sha1:e2a09ee529370549b13a5eb425b911950ceb6c0a</id>
<content type='text'>
[ Upstream commit 3bba75a2ec32bd5fa7024a4de3b8cf9ee113a76a ]

Now that the rockchip clock subsystem does clock gating with GPIO banks,
these are no longer enabled once during probe and no longer stay enabled
for eternity. When all these clocks are disabled, the parent clock pclk_peri
might be disabled too, as no other child claims it. So, we need to add pclk_peri
to the critical clocks.

Signed-off-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Tested-by: Michael Niewoehner &lt;linux@mniewoehner.de&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: add pclk_cpu to the list of rk3188 critical clocks</title>
<updated>2016-04-18T12:49:15+00:00</updated>
<author>
<name>Michael Niewoehner</name>
<email>linux@mniewoehner.de</email>
</author>
<published>2015-08-25T20:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=02c7a92be50f6f9595bb3c82d42609047c79fea2'/>
<id>urn:sha1:02c7a92be50f6f9595bb3c82d42609047c79fea2</id>
<content type='text'>
[ Upstream commit 1166160ab531198f7abc773992c0e04d0f9b7600 ]

pclk_cpu needs to keep running because it is needed for devices like
the act8865 regulator but with the recent gpio clock handling this is
not always the case anymore. So add it to the list of critical clocks.

Signed-off-by: Michael Niewoehner &lt;linux@mniewoehner.de&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: fix rk3066 pll lock bit location</title>
<updated>2015-01-27T16:29:38+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-12-24T13:31:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=94085032b432ab156da4c0ddfa510bb89268ce6d'/>
<id>urn:sha1:94085032b432ab156da4c0ddfa510bb89268ce6d</id>
<content type='text'>
commit 12551f0239b50c88352e3292dd7703382addbf5e upstream.

The bit locations indicating the locking status of the plls on rk3066 are
shifted by one to the right when compared to the rk3188, bits [7:4] instead
of [8:5] on the rk3188, thus indicating the locking state of the wrong pll
or a completely different information in case of the gpll.

The recently introduced pll init code exposed that problem on some rk3066
boards when it tried to bring the boot-pll value in line with the value
from the rate table.

Fix this by defining separate pll definitions for rk3066 with the correct
locking indices.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Fixes: 2c14736c75db ("clk: rockchip: add clock driver for rk3188 and rk3066 clocks")
Tested-by: FUKAUMI Naoki &lt;naobsd@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>clk: rockchip: fix rk3288 cpuclk core dividers</title>
<updated>2015-01-27T16:29:38+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-12-18T19:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a195f753217c0cfb47e53fd4ab6db210ae498015'/>
<id>urn:sha1:a195f753217c0cfb47e53fd4ab6db210ae498015</id>
<content type='text'>
commit 9880d4277f6aab6b21404c824f9d9c652ba518ac upstream.

Commit 0e5bdb3f9fa5 (clk: rockchip: switch to using the new cpuclk type
for armclk) didn't take into account that the divider used on rk3288
are of the (n+1) type.

The rk3066 and rk3188 socs use more complex divider types making it
necessary for the list-elements to be the real register-values to write.

Therefore reduce divider values in the table accordingly so that they
really are the values that should be written to the registers and match
the dividers actually specified for the rk3288.

Reported-by: Sonny Rao &lt;sonnyrao@chromium.org&gt;
Fixes: 0e5bdb3f9fa5 ("clk: rockchip: switch to using the new cpuclk type for armclk")
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>clk-divider: Fix READ_ONLY when divider &gt; 1</title>
<updated>2014-11-17T19:13:52+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2014-11-14T15:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e6d5e7d90be92cee626d7ec16ca9b06f1eed710b'/>
<id>urn:sha1:e6d5e7d90be92cee626d7ec16ca9b06f1eed710b</id>
<content type='text'>
Commit 79c6ab509558 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in
v3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the
recalc_rate() and round_rate() clock callbacks to be omitted.

However using this flag has the unfortunate side effect of causing the
clock recalculation code when a clock rate change is attempted to always
treat it as a pass-through clock, i.e. with a fixed divide of 1, which
may not be the case. Child clock rates are then recalculated using the
wrong parent rate.

Therefore instead of dropping the recalc_rate() and round_rate()
callbacks, alter clk_divider_bestdiv() to always report the current
divider as the best divider so that it is never altered.

For me the read only clock was the system clock, which divided the PLL
rate by 2, from which both the UART and the SPI clocks were divided.
Initial setting of the UART rate set it correctly, but when the SPI
clock was set, the other child clocks were miscalculated. The UART clock
was recalculated using the PLL rate as the parent rate, resulting in a
UART new_rate of double what it should be, and a UART which spewed forth
garbage when the rate changes were propagated.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Thomas Abraham &lt;thomas.ab@samsung.com&gt;
Cc: Tomasz Figa &lt;t.figa@samsung.com&gt;
Cc: Max Schwarz &lt;max.schwarz@online.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.16+
Acked-by: Haojian Zhuang &lt;haojian.zhuang@gmail.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: add restart handler</title>
<updated>2014-10-01T12:11:42+00:00</updated>
<author>
<name>Heiko Stübner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-08-20T00:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6f1294b5a87238c2f87f74a9942faf2f4ffa63b2'/>
<id>urn:sha1:6f1294b5a87238c2f87f74a9942faf2f4ffa63b2</id>
<content type='text'>
Add infrastructure to write the correct value to the restart register and
register the restart notifier for both rk3188 (including rk3066) and rk3288.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: rk3288: i2s_frac adds flag to set parent's rate</title>
<updated>2014-10-01T08:55:13+00:00</updated>
<author>
<name>Jianqun</name>
<email>jay.xu@rock-chips.com</email>
</author>
<published>2014-09-30T03:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fc69ed70c16a31d6a77ec47a30a9fe941f763f1e'/>
<id>urn:sha1:fc69ed70c16a31d6a77ec47a30a9fe941f763f1e</id>
<content type='text'>
The relation of i2s nodes as follows:
          i2s_src               0           0            594000000  0
             i2s_frac           0           0            11289600   0
                i2s_pre         0           0            11289600   0
                   sclk_i2s0    0           0            11289600   0
                   i2s0_clkout  0           0            11289600   0
                      hclk_i2s0 1           1            99000000   0

sclk_i2s0 is the master clock, when to set rate of sclk_i2s0, should
allow to set its parent's rate, by add flag CLK_SET_RATE_PARENT for
"i2s_frac", "i2s_pre", "i2s0_clkout" and "sclk_i2s0".

Tested on rk3288 board using max98090, with command "aplay &lt;music.wav&gt;"

Change-Id: I12faad082566532b65a7de8c0a6845e1c17870e6
Signed-off-by: Jianqun &lt;jay.xu@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
</entry>
<entry>
<title>clk: rockchip: switch to using the new cpuclk type for armclk</title>
<updated>2014-09-27T15:57:46+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-09-05T09:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0e5bdb3f9fa5c2bd4452c258de78122ef15f62d6'/>
<id>urn:sha1:0e5bdb3f9fa5c2bd4452c258de78122ef15f62d6</id>
<content type='text'>
This adds the necessary soc-specific divider values and switches the armclk
to use the newly introduced cpuclk type.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Doug Anderson &lt;dianders@chromium.org&gt;
Tested-by: Doug Anderson &lt;dianders@chromium.org&gt;
</content>
</entry>
</feed>
