<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/clk, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-04-28T17:47:21+00:00</updated>
<entry>
<title>clk: sunxi-ng: always select CCU_GATE</title>
<updated>2017-04-28T17:47:21+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-04-27T11:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=36c02d0be4c3c8804e51f9740f0d768e17f3b566'/>
<id>urn:sha1:36c02d0be4c3c8804e51f9740f0d768e17f3b566</id>
<content type='text'>
When the base driver is enabled but all SoC specific drivers are turned
off, we now get a build error after code was added to always refer to the
clk gates:

drivers/clk/built-in.o: In function `ccu_pll_notifier_cb':
:(.text+0x154f8): undefined reference to `ccu_gate_helper_disable'
:(.text+0x15504): undefined reference to `ccu_gate_helper_enable'

This changes the Kconfig to always require the gate code to be built-in
when CONFIG_SUNXI_CCU is set.

Fixes: 02ae2bc6febd ("clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'sunxi-clk-fixes-for-4.11-2-bis' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes</title>
<updated>2017-04-17T18:04:12+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2017-04-17T18:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7590308d17e578e47f298cc3fec359108341cb6'/>
<id>urn:sha1:e7590308d17e578e47f298cc3fec359108341cb6</id>
<content type='text'>
Pull Allwinner clock fixes for 4.11 from Maxime Ripard:

Two build errors fixes for the sunxi-ng drivers.

The two other patches fix random CPU crashes happening on the A33 since
CPUFreq has been enabled in 4.11.

* tag 'sunxi-clk-fixes-for-4.11-2-bis' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change
  clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks
  clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver
  clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER
</content>
</entry>
<entry>
<title>clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change</title>
<updated>2017-04-13T09:22:04+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2017-04-13T02:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=372fa10172a2f9e1bfbc70778449628e82b72341'/>
<id>urn:sha1:372fa10172a2f9e1bfbc70778449628e82b72341</id>
<content type='text'>
This patch utilizes the new PLL clk notifier to gate then ungate the
PLL CPU clock after rate changes. This should mitigate the system
hangs observed after the introduction of cpufreq for the A33.

Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Tested-by: Quentin Schulz &lt;quentin.schulz@free-electrons.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks</title>
<updated>2017-04-13T09:22:02+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2017-04-13T02:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02ae2bc6febd90cf3de61b6a1bdf491966ed410f'/>
<id>urn:sha1:02ae2bc6febd90cf3de61b6a1bdf491966ed410f</id>
<content type='text'>
In common PLL designs, changes to the dividers take effect almost
immediately, while changes to the multipliers (implemented as
dividers in the feedback loop) take a few cycles to work into
the feedback loop for the PLL to stablize.

Sometimes when the PLL clock rate is changed, the decrease in the
divider is too much for the decrease in the multiplier to catch up.
The PLL clock rate will spike, and in some cases, might lock up
completely. This is especially the case if the divider changed is
the pre-divider, which affects the reference frequency.

This patch introduces a clk notifier callback that will gate and
then ungate a clk after a rate change, effectively resetting it,
so it continues to work, despite any possible lockups. Care must
be taken to reparent any consumers to other temporary clocks during
the rate change, and that this notifier callback must be the first
to be registered.

This is intended to fix occasional lockups with cpufreq on newer
Allwinner SoCs, such as the A33 and the H3. Previously it was
thought that reparenting the cpu clock away from the PLL while
it stabilized was enough, as this worked quite well on the A31.

On the A33, hangs have been observed after cpufreq was recently
introduced. With the H3, a more thorough test [1] showed that
reparenting alone isn't enough. The system still locks up unless
the dividers are limited to 1.

A hunch was if the PLL was stuck in some unknown state, perhaps
gating then ungating it would bring it back to normal. Tests
done by Icenowy Zheng using Ondrej's test firmware shows this
to be a valid solution.

[1] http://www.spinics.net/lists/arm-kernel/msg552501.html

Reported-by: Ondrej Jirman &lt;megous@megous.com&gt;
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Tested-by: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Tested-by: Quentin Schulz &lt;quentin.schulz@free-electrons.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver</title>
<updated>2017-04-13T09:10:41+00:00</updated>
<author>
<name>Tobias Regnery</name>
<email>tobias.regnery@gmail.com</email>
</author>
<published>2017-04-10T12:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e87741ac6c578b240409a8114b9350a58b0f9e93'/>
<id>urn:sha1:e87741ac6c578b240409a8114b9350a58b0f9e93</id>
<content type='text'>
The ccu-sun9i-a80 driver uses the ccu_mult_ops struct, but unlike the other
users it doesen't select the corresponding Kconfig symbol under which the
struct is compiled in.

This results in the following link error with CONFIG_SUN9I_A80_CCU=y and
CONFIG_SUNXI_CCU_MULT=n:

drivers/built-in.o:(.data+0x2d638): undefined reference to 'ccu_mult_ops'

Fix this by explicitly selecting CONFIG_SUNXI_CCU_MULT like the other
users of the struct.

Signed-off-by: Tobias Regnery &lt;tobias.regnery@gmail.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER</title>
<updated>2017-04-13T09:10:40+00:00</updated>
<author>
<name>Tobias Regnery</name>
<email>tobias.regnery@gmail.com</email>
</author>
<published>2017-03-27T09:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa01338c018469274848a973bcbd287ef341937c'/>
<id>urn:sha1:aa01338c018469274848a973bcbd287ef341937c</id>
<content type='text'>
With CONFIG_RESET_CONTROLLER=n we get the following link error in the
sunxi-ng clk driver:

drivers/built-in.o: In function `sunxi_ccu_probe':
mux-core.c:(.text+0x12fe68): undefined reference to 'reset_controller_register'
mux-core.c:(.text+0x12fe68): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'reset_controller_register'

Fix this by adding the appropriate select statement.

Signed-off-by: Tobias Regnery &lt;tobias.regnery@gmail.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: stm32f4: fix: exclude values 0 and 1 for PLLQ</title>
<updated>2017-04-04T00:57:54+00:00</updated>
<author>
<name>Gabriel Fernandez</name>
<email>gabriel.fernandez@st.com</email>
</author>
<published>2017-03-16T08:16:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=daffad2123fc3efcc2c70bd6e905960a31886556'/>
<id>urn:sha1:daffad2123fc3efcc2c70bd6e905960a31886556</id>
<content type='text'>
0000: PLLQ = 0, wrong configuration
0001: PLLQ = 1, wrong configuration
...
0010: PLLQ = 2
0011: PLLQ = 3
0100: PLLQ = 4
...
1111: PLLQ = 1

Use divider table to exclude 0 and 1 values.

Fixes: 83135ad3c517 ("clk: stm32f4: Add PLL_I2S &amp; PLL_SAI for STM32F429/469 boards")

Signed-off-by: Gabriel Fernandez &lt;gabriel.fernandez@st.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'sunxi-clk-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-fixes</title>
<updated>2017-03-23T23:08:46+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2017-03-23T23:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f0b97d5bb4c1c99c38dd6770ad11f714ea42583'/>
<id>urn:sha1:7f0b97d5bb4c1c99c38dd6770ad11f714ea42583</id>
<content type='text'>
Pull Allwinner clock fixes from Maxime Ripard:

A few fixes for a bunch of clocks on a few SoCs. The most important one is
probably one that fixes the NKMP clock frequency calculation and could end
up with clocking the CPU frequency to out of bounds rates.

* tag 'sunxi-clk-fixes-for-4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  clk: sunxi-ng: fix recalc_rate formula of NKMP clocks
  clk: sunxi-ng: Fix div/mult settings for osc12M on A64
  clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock
  clk: sunxi: ccu-sun5i needs nkmp
  clk: sunxi-ng: mp: Adjust parent rate for pre-dividers
</content>
</entry>
<entry>
<title>clk: sunxi-ng: fix recalc_rate formula of NKMP clocks</title>
<updated>2017-03-20T09:34:05+00:00</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.xyz</email>
</author>
<published>2017-03-17T20:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b467e08a15563dede0d37d3233baa24fb97a7310'/>
<id>urn:sha1:b467e08a15563dede0d37d3233baa24fb97a7310</id>
<content type='text'>
In commit e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets"), the
final formula of NKMP clocks' recalc_rate is refactored; however, the
refactored formula broke the calculation due to some C language operand
priority problem -- the priority of operand &gt;&gt; is lower than * and /,
makes the formula being parsed as "(parent_rate * n * k) &gt;&gt; (p / m)", but
it should be "(parent_rate * n * k &gt;&gt; p) / m".

Add the pair of parentheses to fix up this issue. This pair of
parentheses used to exist in the old formula.

Fixes: e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets")
Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.xyz&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: Fix div/mult settings for osc12M on A64</title>
<updated>2017-03-20T08:49:43+00:00</updated>
<author>
<name>Philipp Tomsich</name>
<email>philipp.tomsich@theobroma-systems.com</email>
</author>
<published>2017-03-15T11:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe686babf4cf62b9b214b99847c735baa35a9fa2'/>
<id>urn:sha1:fe686babf4cf62b9b214b99847c735baa35a9fa2</id>
<content type='text'>
The mult/div for osc12M was previously backwards (giving a 48M rate
for osc12M). Fix it.

Signed-off-by: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Tested-by: Christoph Muellner &lt;christoph.muellner@theobroma-systems.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
</feed>
