<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/clk/versatile, branch v4.4.80</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>clk: versatile: sp810: support reentrance</title>
<updated>2016-05-11T09:21:12+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.toradex.cn/cgit/linux-toradex.git/commit/?id=5a9a5671011a3732daf1d300d5205aaae82ee558'/>
<id>5a9a5671011a3732daf1d300d5205aaae82ee558</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;

</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;

</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile-icst: fix memory leak</title>
<updated>2015-10-23T20:34:53+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2015-10-23T09:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7bdccef34fc67d3fce6778a018601dd41e43c5ce'/>
<id>7bdccef34fc67d3fce6778a018601dd41e43c5ce</id>
<content type='text'>
A static code checker found a memory leak in the Versatile
ICST code. Fix it.

Fixes: a183da637c52 "clk: versatile: respect parent rate in ICST clock"
Reported-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A static code checker found a memory leak in the Versatile
ICST code. Fix it.

Fixes: a183da637c52 "clk: versatile: respect parent rate in ICST clock"
Reported-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Allow drivers to build if COMPILE_TEST is enabled</title>
<updated>2015-10-16T18:58:53+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2015-10-13T14:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a7748c3d6419bb81787480526d62bbaf083ef84'/>
<id>4a7748c3d6419bb81787480526d62bbaf083ef84</id>
<content type='text'>
These drivers only have runtime but no build time dependencies so can be
built for testing purposes if the Kconfig COMPILE_TEST option is enabled.

This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Acked-by: Scott Branden &lt;sbranden@broadcom.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These drivers only have runtime but no build time dependencies so can be
built for testing purposes if the Kconfig COMPILE_TEST option is enabled.

This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Acked-by: Scott Branden &lt;sbranden@broadcom.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/clk: appropriate __init annotation for const data</title>
<updated>2015-08-24T23:59:32+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nicolas.pitre@linaro.org</email>
</author>
<published>2015-07-28T23:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e3ee276a5a62a1cd06de46aa0c808000d3fef00e'/>
<id>e3ee276a5a62a1cd06de46aa0c808000d3fef00e</id>
<content type='text'>
Init data marked const should be annotated with __initconst for
correctness and not __initdata.  This also fixes LTO builds that
otherwise fail with section mismatch errors.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@baylibre.com&gt;
[sboyd@codeaurora.org: Dropped hunks that moved const char *
arrays to const char * const]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Init data marked const should be annotated with __initconst for
correctness and not __initdata.  This also fixes LTO builds that
otherwise fail with section mismatch errors.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@baylibre.com&gt;
[sboyd@codeaurora.org: Dropped hunks that moved const char *
arrays to const char * const]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: Switch to assigned clock parents</title>
<updated>2015-08-24T23:48:59+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2015-07-31T00:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62f477119834d912a8471e775d2aeaca0166ab29'/>
<id>62f477119834d912a8471e775d2aeaca0166ab29</id>
<content type='text'>
We're removing struct clk from the clk provider API. This code is
calling the consumer APIs to change the parent to a 1 MHz fixed
rate clock for each of the clocks that the driver provides. Move
to using the assigned-clock-parents DT property for this instead.
Because this is an ABI break, detect if the property is missing
and fall back to setting the parent explicitly before the clocks
are registered.

Acked-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Tested-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're removing struct clk from the clk provider API. This code is
calling the consumer APIs to change the parent to a 1 MHz fixed
rate clock for each of the clocks that the driver provides. Move
to using the assigned-clock-parents DT property for this instead.
Because this is an ABI break, detect if the property is missing
and fall back to setting the parent explicitly before the clocks
are registered.

Acked-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Tested-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: off by one in clk_sp810_timerclken_of_get()</title>
<updated>2015-07-29T18:25:23+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.toradex.cn/cgit/linux-toradex.git/commit/?id=3294bee87091be5f179474f6c39d1d87769635e2'/>
<id>3294bee87091be5f179474f6c39d1d87769635e2</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: Remove clk.h and clkdev.h includes</title>
<updated>2015-07-20T18:11:20+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2015-06-19T22:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d31e3b22e131f5aa5c9d6407ea46fec2134f986'/>
<id>6d31e3b22e131f5aa5c9d6407ea46fec2134f986</id>
<content type='text'>
Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it and replace them with slab.h in files that were relying on the
implicit include of slab.h in clkdev.h.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it and replace them with slab.h in files that were relying on the
implicit include of slab.h in clkdev.h.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: Silence sparse warnings</title>
<updated>2015-05-15T00:11:27+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2015-05-01T20:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=11bee5e19afd11a42a03df9025f82a1bab4d5595'/>
<id>11bee5e19afd11a42a03df9025f82a1bab4d5595</id>
<content type='text'>
drivers/clk/versatile/clk-sp810.c:159:29: error: incompatible types for operation (&lt;=)
drivers/clk/versatile/clk-sp810.c:159:29:    left side has type char const *&lt;noident&gt;
drivers/clk/versatile/clk-sp810.c:159:29:    right side has type int
drivers/clk/versatile/clk-sp810.c:159:53: error: incompatible types for operation (&lt;=)
drivers/clk/versatile/clk-sp810.c:159:53:    left side has type char const *&lt;noident&gt;
drivers/clk/versatile/clk-sp810.c:159:53:    right side has type int
drivers/clk/versatile/clk-sp810.c:138:13: warning: symbol 'clk_sp810_of_setup' was not declared. Should it be static?

Acked: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/clk/versatile/clk-sp810.c:159:29: error: incompatible types for operation (&lt;=)
drivers/clk/versatile/clk-sp810.c:159:29:    left side has type char const *&lt;noident&gt;
drivers/clk/versatile/clk-sp810.c:159:29:    right side has type int
drivers/clk/versatile/clk-sp810.c:159:53: error: incompatible types for operation (&lt;=)
drivers/clk/versatile/clk-sp810.c:159:53:    left side has type char const *&lt;noident&gt;
drivers/clk/versatile/clk-sp810.c:159:53:    right side has type int
drivers/clk/versatile/clk-sp810.c:138:13: warning: symbol 'clk_sp810_of_setup' was not declared. Should it be static?

Acked: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: versatile: test returned value</title>
<updated>2015-04-09T15:19:31+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-04-04T14:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e52786ac3ca721636a6fb0ae88521f5b9ece88a3'/>
<id>e52786ac3ca721636a6fb0ae88521f5b9ece88a3</id>
<content type='text'>
Put NULL test on the result of the previous call instead on one of its
arguments.  A simplified version of the semantic match that finds this
problem is as follows (http://coccinelle.lip6.fr/):

// &lt;smpl&gt;
r@
expression *e1;
expression *e2;
identifier f;
statement S1,S2;
@@

e1 = f(...,e2,...);
(
if (e1 == NULL || ...) S1 else S2
|
*if (e2 == NULL || ...) S1 else S2
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Put NULL test on the result of the previous call instead on one of its
arguments.  A simplified version of the semantic match that finds this
problem is as follows (http://coccinelle.lip6.fr/):

// &lt;smpl&gt;
r@
expression *e1;
expression *e2;
identifier f;
statement S1,S2;
@@

e1 = f(...,e2,...);
(
if (e1 == NULL || ...) S1 else S2
|
*if (e2 == NULL || ...) S1 else S2
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: constify of_device_id array</title>
<updated>2015-04-01T17:59:27+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-31T18:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f375573c96470a27b911aeb1c0a25212d0e145a2'/>
<id>f375573c96470a27b911aeb1c0a25212d0e145a2</id>
<content type='text'>
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

__initdata updated to __initconst for
static const struct of_device_id ti_clkdm_match_table[]

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

__initdata updated to __initconst for
static const struct of_device_id ti_clkdm_match_table[]

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
