<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/clk/sunxi-ng, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-02-19T07:59:50Z</updated>
<entry>
<title>clk: sunxi-ng: a31: Fix CLK_OUT_* clock ops</title>
<updated>2018-02-19T07:59:50Z</updated>
<author>
<name>Chen-Yu Tsai</name>
</author>
<published>2018-02-17T13:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5682e268350f9eccdbb04006605c1b7068a7b323'/>
<id>urn:sha1:5682e268350f9eccdbb04006605c1b7068a7b323</id>
<content type='text'>
When support for the A31/A31s CCU was first added, the clock ops for
the CLK_OUT_* clocks was set to the wrong type. The clocks are MP-type,
but the ops was set for div (M) clocks. This went unnoticed until now.
This was because while they are different clocks, their data structures
aligned in a way that ccu_div_ops would access the second ccu_div_internal
and ccu_mux_internal structures, which were valid, if not incorrect.

Furthermore, the use of these CLK_OUT_* was for feeding a precise 32.768
kHz clock signal to the WiFi chip. This was achievable by using the parent
with the same clock rate and no divider. So the incorrect divider setting
did not affect this usage.

Commit 946797aa3f08 ("clk: sunxi-ng: Support fixed post-dividers on MP
style clocks") added a new field to the ccu_mp structure, which broke
the aforementioned alignment. Now the system crashes as div_ops tries
to look up a nonexistent table.

Reported-by: Philipp Rossak &lt;embed3d@gmail.com&gt;
Tested-by: Philipp Rossak &lt;embed3d@gmail.com&gt;
Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'clk-aspeed', 'clk-lock-UP', 'clk-mediatek' and 'clk-allwinner' into clk-next</title>
<updated>2018-01-27T00:43:39Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2018-01-27T00:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c43a52cfd27b20292d19d924eddfa5ff8dce87e5'/>
<id>urn:sha1:c43a52cfd27b20292d19d924eddfa5ff8dce87e5</id>
<content type='text'>
* clk-aspeed:
  clk: aspeed: Handle inverse polarity of USB port 1 clock gate
  clk: aspeed: Fix return value check in aspeed_cc_init()
  clk: aspeed: Add reset controller
  clk: aspeed: Register gated clocks
  clk: aspeed: Add platform driver and register PLLs
  clk: aspeed: Register core clocks
  clk: Add clock driver for ASPEED BMC SoCs
  dt-bindings: clock: Add ASPEED constants

* clk-lock-UP:
  clk: fix reentrancy of clk_enable() on UP systems

* clk-mediatek:
  clk: mediatek: adjust dependency of reset.c to avoid unexpectedly being built
  clk: mediatek: Fix all warnings for missing struct clk_onecell_data
  clk: mediatek: fixup test-building of MediaTek clock drivers
  clk: mediatek: group drivers under indpendent menu

* clk-allwinner:
  clk: sunxi-ng: a83t: Add M divider to TCON1 clock
  clk: sunxi-ng: fix the A64/H5 clock description of DE2 CCU
  clk: sunxi-ng: add support for Allwinner H3 DE2 CCU
  dt-bindings: fix the binding of Allwinner DE2 CCU of A83T and H3
  clk: sunxi-ng: sun8i: a83t: Use sigma-delta modulation for audio PLL
  clk: sunxi-ng: sun8i: a83t: Add /2 fixed post divider to audio PLL
  clk: sunxi-ng: Support fixed post-dividers on NM style clocks
  clk: sunxi-ng: sun50i: a64: Add 2x fixed post-divider to MMC module clocks
  clk: sunxi-ng: Support fixed post-dividers on MP style clocks
  clk: sunxi: Use PTR_ERR_OR_ZERO()
</content>
</entry>
<entry>
<title>Merge branch 'clk-divider-container' into clk-next</title>
<updated>2018-01-27T00:43:14Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2018-01-27T00:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=716d9b1d4a88493ec3e52957cc1026d32534ee67'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>clk: sunxi-ng: a83t: Add M divider to TCON1 clock</title>
<updated>2018-01-03T05:45:04Z</updated>
<author>
<name>Jernej Škrabec</name>
</author>
<published>2017-12-30T21:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dbc7f5f4904cfddc199af171ea095490a434f15'/>
<id>urn:sha1:7dbc7f5f4904cfddc199af171ea095490a434f15</id>
<content type='text'>
TCON1 also has M divider, contrary to TCON0. And the mux is only
2 bits wide, instead of 3.

Fixes: 05359be1176b ("clk: sunxi-ng: Add driver for A83T CCU")
Signed-off-by: Jernej Skrabec &lt;jernej.skrabec@siol.net&gt;
[wens@csie.org: Add description about mux width difference]
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: fix the A64/H5 clock description of DE2 CCU</title>
<updated>2017-12-29T08:15:14Z</updated>
<author>
<name>Icenowy Zheng</name>
</author>
<published>2017-12-22T12:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf4881c1293516c1975606e8f2af7948789168b8'/>
<id>urn:sha1:cf4881c1293516c1975606e8f2af7948789168b8</id>
<content type='text'>
The clocks of A64/H5 SoCs in the DE2 CCU is the same as the clocks in H3
DE2 CCU rather than the A83T DE2 CCU (the parent of them is the DE
module clock).

Fix this by change the clock descriptions to use the clocks of H3.

Fixes: 763c5bd045b1 ("clk: sunxi-ng: add support for DE2 CCU")
Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: add support for Allwinner H3 DE2 CCU</title>
<updated>2017-12-29T08:15:07Z</updated>
<author>
<name>Icenowy Zheng</name>
</author>
<published>2017-12-22T12:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19368d99746e9fda90ab4a7decb148a9f65e3915'/>
<id>urn:sha1:19368d99746e9fda90ab4a7decb148a9f65e3915</id>
<content type='text'>
Allwinner H3 features a DE2 CCU like the one on A83T, however the
parent of the clocks is the DE module clock, not the PLL_DE clock.

Add support for it.

Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
</content>
</entry>
<entry>
<title>clk: divider: fix incorrect usage of container_of</title>
<updated>2017-12-28T23:16:04Z</updated>
<author>
<name>Jerome Brunet</name>
</author>
<published>2017-12-21T16:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12a26c298d2a8b1cab498533fa65198e49e3afd3'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>clk: move clock common macros out from vendor directories</title>
<updated>2017-12-21T23:00:38Z</updated>
<author>
<name>Chunyan Zhang</name>
</author>
<published>2017-12-07T12:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ded879e12310b1f8f81b1f84e293933a3b69f14'/>
<id>urn:sha1:1ded879e12310b1f8f81b1f84e293933a3b69f14</id>
<content type='text'>
These macros are used by more than one SoC vendor platforms, avoid to
have many copies of these code, this patch moves them to the common
header file which every clock drivers can access to.

Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@spreadtrum.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: sun8i: a83t: Use sigma-delta modulation for audio PLL</title>
<updated>2017-12-08T09:08:32Z</updated>
<author>
<name>Chen-Yu Tsai</name>
</author>
<published>2017-12-08T08:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e952ca3c6b2ffdfbf9618e4bd3e9aad1ff3f5eb4'/>
<id>urn:sha1:e952ca3c6b2ffdfbf9618e4bd3e9aad1ff3f5eb4</id>
<content type='text'>
The audio blocks require specific clock rates. Until now we were using
the closest clock rate possible with integer N-M factors. This resulted
in audio playback being slightly slower than it should be.

The vendor kernel gets around this (for newer SoCs) by using sigma-delta
modulation to generate a fractional-N factor. This patch copies the
parameters for the A83T.

Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clk: sunxi-ng: sun8i: a83t: Add /2 fixed post divider to audio PLL</title>
<updated>2017-12-08T09:08:18Z</updated>
<author>
<name>Chen-Yu Tsai</name>
</author>
<published>2017-12-08T08:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10e6eb4f2c5b35ae71c9bc0db83d74238719b453'/>
<id>urn:sha1:10e6eb4f2c5b35ae71c9bc0db83d74238719b453</id>
<content type='text'>
On the A83T, the audio PLL should have its div1 set to 0, or /1, and
div2 set to 1, or /2. This setting is the default, and is required
to match the sigma-delta modulation parameters from the BSP kernel.

This patch adds a /2 fixed post divider to the audio PLL, and fixes
the enforced d1 &amp; d2 values. This also resolves the mismatch between
the values mentioned in the comment for the audio PLL, and the actual
enforced values.

Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
</feed>
