<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/clk/rockchip, branch v3.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>clk: rockchip: fix deadlock possibility in cpuclk</title>
<updated>2015-01-17T19:22:39+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.tavy.me/linux.git/commit/?id=a5e1baf7dca10f8cf945394034013260297bc416'/>
<id>a5e1baf7dca10f8cf945394034013260297bc416</id>
<content type='text'>
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"]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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"]
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: fix rk3288 cpuclk core dividers</title>
<updated>2014-12-28T22:31:44+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.tavy.me/linux.git/commit/?id=9880d4277f6aab6b21404c824f9d9c652ba518ac'/>
<id>9880d4277f6aab6b21404c824f9d9c652ba518ac</id>
<content type='text'>
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;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: fix rk3066 pll lock bit location</title>
<updated>2014-12-28T22:30:08+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.tavy.me/linux.git/commit/?id=12551f0239b50c88352e3292dd7703382addbf5e'/>
<id>12551f0239b50c88352e3292dd7703382addbf5e</id>
<content type='text'>
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;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: Fix clock gate for rk3188 hclk_emem_peri</title>
<updated>2014-12-21T14:21:28+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@gmail.com</email>
</author>
<published>2014-12-12T17:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5039d16abe250102c021557184950c47566170a4'/>
<id>5039d16abe250102c021557184950c47566170a4</id>
<content type='text'>
Do not disable clock gate "hclk_emem_peri", otherwise EMAC clocks no longer work
and it breaks ethernet on RK3066 and RK3188. It fixes a regression introduced by
commit 78eaf6095cc7 ("clk: rockchip: disable unused clocks").

Signed-off-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Fixes: 78eaf6095cc7 ("clk: rockchip: disable unused clocks")
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not disable clock gate "hclk_emem_peri", otherwise EMAC clocks no longer work
and it breaks ethernet on RK3066 and RK3188. It fixes a regression introduced by
commit 78eaf6095cc7 ("clk: rockchip: disable unused clocks").

Signed-off-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Fixes: 78eaf6095cc7 ("clk: rockchip: disable unused clocks")
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: add CLK_IGNORE_UNUSED flag to fix rk3066/rk3188 USB Host</title>
<updated>2014-12-21T14:18:24+00:00</updated>
<author>
<name>Julien CHAUVEAU</name>
<email>julien.chauveau@neo-technologies.fr</email>
</author>
<published>2014-12-12T21:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=caa6934ac70b1dd7d1d4939961da5b23f305d968'/>
<id>caa6934ac70b1dd7d1d4939961da5b23f305d968</id>
<content type='text'>
This patch adds CLK_IGNORE_UNUSED flag to hclk_usb_peri, hclk_usbotg0
and hclk_usbotg1 because these clocks must remain enabled to use the
USB controllers in host mode.

This fixes a regression introduced by commit 78eaf6095cc7
("clk: rockchip: disable unused clocks").

Signed-off-by: Julien CHAUVEAU &lt;julien.chauveau@neo-technologies.fr&gt;
Fixes: 78eaf6095cc7 ("clk: rockchip: disable unused clocks")
Reviewed-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Tested-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds CLK_IGNORE_UNUSED flag to hclk_usb_peri, hclk_usbotg0
and hclk_usbotg1 because these clocks must remain enabled to use the
USB controllers in host mode.

This fixes a regression introduced by commit 78eaf6095cc7
("clk: rockchip: disable unused clocks").

Signed-off-by: Julien CHAUVEAU &lt;julien.chauveau@neo-technologies.fr&gt;
Fixes: 78eaf6095cc7 ("clk: rockchip: disable unused clocks")
Reviewed-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Tested-by: Romain Perier &lt;romain.perier@gmail.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v3.19-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next</title>
<updated>2014-11-29T05:00:16+00:00</updated>
<author>
<name>Michael Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2014-11-29T05:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b572b5f821abb350439609f367bd35961f53a28e'/>
<id>b572b5f821abb350439609f367bd35961f53a28e</id>
<content type='text'>
- clock phase setting capability for the rk3288 mmc clocks
- pll init to allow syncing to actual rate table values
- some more exported clocks
- fixes for some clocks (typos etc) all of them not yet used
  in actual drivers
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- clock phase setting capability for the rk3288 mmc clocks
- pll init to allow syncing to actual rate table values
- some more exported clocks
- fixes for some clocks (typos etc) all of them not yet used
  in actual drivers
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: Add support for the mmc clock phases using the framework</title>
<updated>2014-11-27T23:44:24+00:00</updated>
<author>
<name>Alexandru M Stan</name>
<email>amstan@chromium.org</email>
</author>
<published>2014-11-27T01:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=89bf26cbc1a09476c4c4740d16a0ffdfa2192b9c'/>
<id>89bf26cbc1a09476c4c4740d16a0ffdfa2192b9c</id>
<content type='text'>
This patch adds the 2 physical clocks for the mmc (drive and sample). They're
mostly there for the phase properties, but they also show the true clock
(by dividing by RK3288_MMC_CLKGEN_DIV).

The drive and sample phases are generated by dividing an upstream parent clock
by 2, this allows us to adjust the phase by 90 deg.

There's also an option to have up to 255 delay elements (40-80 picoseconds long).
This driver uses those elements (under the assumption that they're 60 ps long)
to generate approximate 22.5 degrees options. 67.5 (22.5*3) might be as high as
90 deg if the delay elements are as big as 80 ps, so a finer division (smaller
than 22.5) was not picked because the phase might not be monotonic anymore.

Suggested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Alexandru M Stan &lt;amstan@chromium.org&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the 2 physical clocks for the mmc (drive and sample). They're
mostly there for the phase properties, but they also show the true clock
(by dividing by RK3288_MMC_CLKGEN_DIV).

The drive and sample phases are generated by dividing an upstream parent clock
by 2, this allows us to adjust the phase by 90 deg.

There's also an option to have up to 255 delay elements (40-80 picoseconds long).
This driver uses those elements (under the assumption that they're 60 ps long)
to generate approximate 22.5 degrees options. 67.5 (22.5*3) might be as high as
90 deg if the delay elements are as big as 80 ps, so a finer division (smaller
than 22.5) was not picked because the phase might not be monotonic anymore.

Suggested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Alexandru M Stan &lt;amstan@chromium.org&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: rk3288 export i2s0_clkout for use in DT</title>
<updated>2014-11-27T23:37:47+00:00</updated>
<author>
<name>Sonny Rao</name>
<email>sonnyrao@chromium.org</email>
</author>
<published>2014-11-19T07:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d288b169bdfbed28d308b077af3d9196025cd8b'/>
<id>6d288b169bdfbed28d308b077af3d9196025cd8b</id>
<content type='text'>
This exposes the clock that comes out of the i2s block which generally
goes to the audio codec.

Signed-off-by: Sonny Rao &lt;sonnyrao@chromium.org&gt;
[removed CLK_SET_RATE_PARENT from original patch]
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This exposes the clock that comes out of the i2s block which generally
goes to the audio codec.

Signed-off-by: Sonny Rao &lt;sonnyrao@chromium.org&gt;
[removed CLK_SET_RATE_PARENT from original patch]
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: use clock ID for DMC (memory controller) on rk3288</title>
<updated>2014-11-26T17:32:28+00:00</updated>
<author>
<name>Jeff Chen</name>
<email>cym@rock-chips.com</email>
</author>
<published>2014-11-26T00:13:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a72da7c1666b4464f1610fb9e90ac64ca2ea7a44'/>
<id>a72da7c1666b4464f1610fb9e90ac64ca2ea7a44</id>
<content type='text'>
The DMC clocks need to be turned off at runtime.  Use the newly
assigned clock IDs to export them.

Signed-off-by: Jeff Chen &lt;cym@rock-chips.com&gt;
[dianders: split into two patches; adjusted commit msg]
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DMC clocks need to be turned off at runtime.  Use the newly
assigned clock IDs to export them.

Signed-off-by: Jeff Chen &lt;cym@rock-chips.com&gt;
[dianders: split into two patches; adjusted commit msg]
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: rockchip: add ROCKCHIP_PLL_SYNC_RATE flag to some plls</title>
<updated>2014-11-25T08:57:22+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-11-20T19:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dd79c0bea70516f52edc01c32e3f1ac7f20751a5'/>
<id>dd79c0bea70516f52edc01c32e3f1ac7f20751a5</id>
<content type='text'>
Add the new flag to gpll and cpll on rk3188 and similar and to
gpll, cpll and npll on rk3288.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Tested-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the new flag to gpll and cpll on rk3188 and similar and to
gpll, cpll and npll on rk3288.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Tested-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
