<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/clk, branch linux-3.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>clk: clk-wm831x: fix a logic error</title>
<updated>2017-06-07T22:46:53+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2016-12-01T06:25:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b09fd959af0fae9be22688e17160d736b083c536'/>
<id>b09fd959af0fae9be22688e17160d736b083c536</id>
<content type='text'>
commit 20979202ee6e4c68dab7bcf408787225a656d18e upstream.

Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188561. Function
wm831x_clkout_is_prepared() returns "true" when it fails to read
CLOCK_CONTROL_1. "true" means the device is already prepared. So
return "true" on the read failure seems improper.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Fixes: f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver")
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 20979202ee6e4c68dab7bcf408787225a656d18e upstream.

Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188561. Function
wm831x_clkout_is_prepared() returns "true" when it fails to read
CLOCK_CONTROL_1. "true" means the device is already prepared. So
return "true" on the read failure seems improper.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Fixes: f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver")
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: sp810: support reentrance</title>
<updated>2016-06-07T08:42:52+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-02-24T08:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d3605b9c39cffb3cd67176083dc014696c29198c'/>
<id>d3605b9c39cffb3cd67176083dc014696c29198c</id>
<content type='text'>
commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken&lt;0&gt; .. timclken&lt;n&gt; to sp810_&lt;instance&gt;_&lt;n&gt;
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[&lt;c00167f8&gt;] (unwind_backtrace) from [&lt;c0013204&gt;]
             (show_stack+0x10/0x14)
[&lt;c0013204&gt;] (show_stack) from [&lt;c01a049c&gt;]
             (dump_stack+0x84/0x9c)
[&lt;c01a049c&gt;] (dump_stack) from [&lt;c0024990&gt;]
             (warn_slowpath_common+0x74/0xb0)
[&lt;c0024990&gt;] (warn_slowpath_common) from [&lt;c0024a68&gt;]
             (warn_slowpath_null+0x1c/0x24)
[&lt;c0024a68&gt;] (warn_slowpath_null) from [&lt;c051eb44&gt;]
             (clk_sp810_of_setup+0x110/0x154)
[&lt;c051eb44&gt;] (clk_sp810_of_setup) from [&lt;c051e3a4&gt;]
             (of_clk_init+0x12c/0x1c8)
[&lt;c051e3a4&gt;] (of_clk_init) from [&lt;c0504714&gt;]
             (time_init+0x20/0x2c)
[&lt;c0504714&gt;] (time_init) from [&lt;c0501b18&gt;]
             (start_kernel+0x244/0x3c4)
[&lt;c0501b18&gt;] (start_kernel) from [&lt;7000807c&gt;] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken&lt;0&gt; .. timclken&lt;n&gt; to sp810_&lt;instance&gt;_&lt;n&gt;
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[&lt;c00167f8&gt;] (unwind_backtrace) from [&lt;c0013204&gt;]
             (show_stack+0x10/0x14)
[&lt;c0013204&gt;] (show_stack) from [&lt;c01a049c&gt;]
             (dump_stack+0x84/0x9c)
[&lt;c01a049c&gt;] (dump_stack) from [&lt;c0024990&gt;]
             (warn_slowpath_common+0x74/0xb0)
[&lt;c0024990&gt;] (warn_slowpath_common) from [&lt;c0024a68&gt;]
             (warn_slowpath_null+0x1c/0x24)
[&lt;c0024a68&gt;] (warn_slowpath_null) from [&lt;c051eb44&gt;]
             (clk_sp810_of_setup+0x110/0x154)
[&lt;c051eb44&gt;] (clk_sp810_of_setup) from [&lt;c051e3a4&gt;]
             (of_clk_init+0x12c/0x1c8)
[&lt;c051e3a4&gt;] (of_clk_init) from [&lt;c0504714&gt;]
             (time_init+0x20/0x2c)
[&lt;c0504714&gt;] (time_init) from [&lt;c0501b18&gt;]
             (start_kernel+0x244/0x3c4)
[&lt;c0501b18&gt;] (start_kernel) from [&lt;7000807c&gt;] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: off by one in clk_sp810_timerclken_of_get()</title>
<updated>2015-09-21T17:00:07+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-07-29T10:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=44a7b4fb57258d95e2ed213c2c595d033cda79d0'/>
<id>44a7b4fb57258d95e2ed213c2c595d033cda79d0</id>
<content type='text'>
commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.

The "&gt;" should be "&gt;=" or we end up reading beyond the end of the array.

Fixes: 6e973d2c4385 ('clk: vexpress: Add separate SP810 driver')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.

The "&gt;" should be "&gt;=" or we end up reading beyond the end of the array.

Fixes: 6e973d2c4385 ('clk: vexpress: Add separate SP810 driver')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: sunxi: Support factor clocks with N factor starting not from 0</title>
<updated>2015-03-18T12:22:34+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2014-06-26T15:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6e6493c26e176987bf215625ebcaea5954a05fa1'/>
<id>6e6493c26e176987bf215625ebcaea5954a05fa1</id>
<content type='text'>
commit 9a5e6c7eb5ccbb5f0d3a1dffce135f0a727f40e1 upstream.

The PLLs on newer Allwinner SoC's, such as the A31 and A23, have a
N multiplier factor that starts from 1, not 0.

This patch adds an option to the factor clk driver's config data
structures to specify the base value of N.

Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9a5e6c7eb5ccbb5f0d3a1dffce135f0a727f40e1 upstream.

The PLLs on newer Allwinner SoC's, such as the A31 and A23, have a
N multiplier factor that starts from 1, not 0.

This patch adds an option to the factor clk driver's config data
structures to specify the base value of N.

Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: spear3xx: Use proper control register offset</title>
<updated>2014-07-17T22:58:02+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2014-06-19T21:52:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=57b30c333f45ac9ec0406dab2bd74f31c28fd00c'/>
<id>57b30c333f45ac9ec0406dab2bd74f31c28fd00c</id>
<content type='text'>
commit 15ebb05248d025534773c9ef64915bd888f04e4b upstream.

The control register is at offset 0x10, not 0x0. This is wreckaged
since commit 5df33a62c (SPEAr: Switch to common clock framework).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 15ebb05248d025534773c9ef64915bd888f04e4b upstream.

The control register is at offset 0x10, not 0x0. This is wreckaged
since commit 5df33a62c (SPEAr: Switch to common clock framework).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: vexpress: NULL dereference on error path</title>
<updated>2014-06-07T20:25:35+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-11-07T08:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c4f3c998c17e31c73c1ab223469435a12358d25e'/>
<id>c4f3c998c17e31c73c1ab223469435a12358d25e</id>
<content type='text'>
commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.

If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.

If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks</title>
<updated>2014-01-15T23:28:52+00:00</updated>
<author>
<name>Andrew Bresticker</name>
<email>abrestic@chromium.org</email>
</author>
<published>2013-11-08T10:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=94f8884551dac1e358bc4a7a90d9442998261a3e'/>
<id>94f8884551dac1e358bc4a7a90d9442998261a3e</id>
<content type='text'>
commit 97c3557c3e0413efb1f021f582d1459760e22727 upstream.

The gate clocks for the MFC sysmmus appear to be flipped, i.e.
GATE_IP_MFC[2] gates sysmmu_mfcl and GATE_IP_MFC[1] gates sysmmu_mfcr.
Fix this so that the MFC will start up.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 97c3557c3e0413efb1f021f582d1459760e22727 upstream.

The gate clocks for the MFC sysmmus appear to be flipped, i.e.
GATE_IP_MFC[2] gates sysmmu_mfcl and GATE_IP_MFC[1] gates sysmmu_mfcr.
Fix this so that the MFC will start up.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock</title>
<updated>2014-01-15T23:28:52+00:00</updated>
<author>
<name>Abhilash Kesavan</name>
<email>a.kesavan@samsung.com</email>
</author>
<published>2013-12-11T11:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e964763f1bed41305564d0656295639fcd7f7ed7'/>
<id>e964763f1bed41305564d0656295639fcd7f7ed7</id>
<content type='text'>
commit 2feed5aecf5f367b92bd6b6e92afe9e3de466907 upstream.

The sysreg (system register) generates control signals for various blocks
like disp1blk, i2c, mipi, usb etc. However, it gets disabled as an unused
clock at boot-up. This can lead to failures in operation of above blocks,
because they can not be configured properly if this clock is disabled.

Signed-off-by: Abhilash Kesavan &lt;a.kesavan@samsung.com&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
[t.figa: Updated patch description.]
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2feed5aecf5f367b92bd6b6e92afe9e3de466907 upstream.

The sysreg (system register) generates control signals for various blocks
like disp1blk, i2c, mipi, usb etc. However, it gets disabled as an unused
clock at boot-up. This can lead to failures in operation of above blocks,
because they can not be configured properly if this clock is disabled.

Signed-off-by: Abhilash Kesavan &lt;a.kesavan@samsung.com&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
[t.figa: Updated patch description.]
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: samsung: exynos4: Correct SRC_MFC register</title>
<updated>2014-01-15T23:28:52+00:00</updated>
<author>
<name>Seung-Woo Kim</name>
<email>sw0312.kim@samsung.com</email>
</author>
<published>2013-11-22T05:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3541ef9f6f33b137586b32d37b2a068e0160a82c'/>
<id>3541ef9f6f33b137586b32d37b2a068e0160a82c</id>
<content type='text'>
commit 5fdd1b56be51b1ec4dbde5b213d649ac717442da upstream.

The SRC_MFC register offset was incorrect, which could cause have caused
wrong calculation of rate of sclk_mfc clock, that could in turn lead to
incorrect operation of MFC. This patch corrects it.

Signed-off-by: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
[t.figa: Updated patch description]
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5fdd1b56be51b1ec4dbde5b213d649ac717442da upstream.

The SRC_MFC register offset was incorrect, which could cause have caused
wrong calculation of rate of sclk_mfc clock, that could in turn lead to
incorrect operation of MFC. This patch corrects it.

Signed-off-by: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Acked-by: Mike Turquette &lt;mturquette@linaro.org&gt;
[t.figa: Updated patch description]
Signed-off-by: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: clk-divider: fix divisor &gt; 255 bug</title>
<updated>2014-01-15T23:28:52+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2013-12-16T10:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f783d8b1299501f0aa0586dbd4fa0460f5f33be0'/>
<id>f783d8b1299501f0aa0586dbd4fa0460f5f33be0</id>
<content type='text'>
commit 778037e1ccb75609846deca9e419449c1dc137fa upstream.

Commit 6d9252bd9a4bb (clk: Add support for power of two type dividers)
merged in v3.6 added the _get_val function to convert a divisor value to
a register field value depending on the flags. However it used the type
u8 for the div field, causing divisors larger than 255 to be masked
and the resultant clock rate to be too high.

E.g. in my case an 11bit divider was supposed to divide 24.576 MHz down
to 32.768KHz. The divisor was correctly calculated as 750 (0x2ee). This
was masked to 238 (0xee) resulting in a frequency of 103.26KHz.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Rajendra Nayak &lt;rnayak@ti.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 778037e1ccb75609846deca9e419449c1dc137fa upstream.

Commit 6d9252bd9a4bb (clk: Add support for power of two type dividers)
merged in v3.6 added the _get_val function to convert a divisor value to
a register field value depending on the flags. However it used the type
u8 for the div field, causing divisors larger than 255 to be masked
and the resultant clock rate to be too high.

E.g. in my case an 11bit divider was supposed to divide 24.576 MHz down
to 32.768KHz. The divisor was correctly calculated as 750 (0x2ee). This
was masked to 238 (0xee) resulting in a frequency of 103.26KHz.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Rajendra Nayak &lt;rnayak@ti.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
