<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/clk/clk-composite.c, branch v3.17.4</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: composite: improve rate_hw sanity check logic</title>
<updated>2014-07-13T19:17:05+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2014-07-02T23:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a994e151f7c54a5fdeb07fe2fed4ed64b9321b8'/>
<id>5a994e151f7c54a5fdeb07fe2fed4ed64b9321b8</id>
<content type='text'>
The function pointer population and sanity checking logic got a bit ugly
with the advent of the .determine_rate callback. Clean it up.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function pointer population and sanity checking logic got a bit ugly
with the advent of the .determine_rate callback. Clean it up.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: allow read-only clocks</title>
<updated>2014-07-13T19:17:04+00:00</updated>
<author>
<name>Heiko Stübner</name>
<email>heiko@sntech.de</email>
</author>
<published>2014-07-02T23:57:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0c02cf2f1c2ffd75221b43bacb4f02a0e52e014b'/>
<id>0c02cf2f1c2ffd75221b43bacb4f02a0e52e014b</id>
<content type='text'>
This allows readl-only composite clocks by making mux_ops-&gt;set_parent and
divider_ops-&gt;round_rate/set_rate optional.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows readl-only composite clocks by making mux_ops-&gt;set_parent and
divider_ops-&gt;round_rate/set_rate optional.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: support determine_rate using rate_ops-&gt;round_rate + mux_ops-&gt;set_parent</title>
<updated>2014-07-13T19:16:08+00:00</updated>
<author>
<name>Boris BREZILLON</name>
<email>b.brezillon@overkiz.com</email>
</author>
<published>2014-07-02T23:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3eb635f1ca2d25bd11a697f5bdb52ac3d08c240e'/>
<id>3eb635f1ca2d25bd11a697f5bdb52ac3d08c240e</id>
<content type='text'>
In case the rate_hw does not implement determine_rate, but only round_rate
we fallback to best_parent selection if mux_hw is present and support
reparenting.

This also fixes a rate calculation problem when using the standard div and
mux ops, as in this case currently only the mux-&gt;determine_rate is used
in the composite rate calculation.
So when for example the composite clock has two parents at 600 and 800MHz,
the requested rate is 75MHz, which the divider could provide, without this
change the rate would be set 600MHz ignoring the divider completely.
This may be way out of spec for the component.

Signed-off-by: Boris BREZILLON &lt;b.brezillon@overkiz.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
[heiko@sntech.de: fixed output return a rate instead of the diff]
Acked-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-by: Gabriel Fernandez &lt;gabriel.fernandez@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case the rate_hw does not implement determine_rate, but only round_rate
we fallback to best_parent selection if mux_hw is present and support
reparenting.

This also fixes a rate calculation problem when using the standard div and
mux ops, as in this case currently only the mux-&gt;determine_rate is used
in the composite rate calculation.
So when for example the composite clock has two parents at 600 and 800MHz,
the requested rate is 75MHz, which the divider could provide, without this
change the rate would be set 600MHz ignoring the divider completely.
This may be way out of spec for the component.

Signed-off-by: Boris BREZILLON &lt;b.brezillon@overkiz.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
[heiko@sntech.de: fixed output return a rate instead of the diff]
Acked-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-By: Max Schwarz &lt;max.schwarz@online.de&gt;
Tested-by: Gabriel Fernandez &lt;gabriel.fernandez@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: pass mux_hw into determine_rate</title>
<updated>2014-01-15T15:48:03+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2014-01-14T20:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d2043fbe4ddc6cc16ba71b49c2c13f4cb2fe932'/>
<id>5d2043fbe4ddc6cc16ba71b49c2c13f4cb2fe932</id>
<content type='text'>
The composite clock's .determine_rate implementation can call the
underyling .determine_rate callback corresponding to rate_hw or the
underlying .determine_rate callback corresponding to mux_hw. In both
cases we pass in rate_hw, which is wrong. Fixed by passing mux_hw into
the correct callback.

Reported-by: Lemon Dai &lt;dailemon.gl@gmail.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The composite clock's .determine_rate implementation can call the
underyling .determine_rate callback corresponding to rate_hw or the
underlying .determine_rate callback corresponding to mux_hw. In both
cases we pass in rate_hw, which is wrong. Fixed by passing mux_hw into
the correct callback.

Reported-by: Lemon Dai &lt;dailemon.gl@gmail.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: .determine_rate support</title>
<updated>2013-11-10T10:39:07+00:00</updated>
<author>
<name>Emilio López</name>
<email>emilio@elopez.com.ar</email>
</author>
<published>2013-09-15T00:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=107f3198fd2c5902b9cc54c86a0c86f815c173e2'/>
<id>107f3198fd2c5902b9cc54c86a0c86f815c173e2</id>
<content type='text'>
This commit adds .determine_rate support to the composite clock. It will
use the .determine_rate callback from the rate component if available,
and fall back on the mux component otherwise. This allows composite
clocks to enjoy the benefits of automatic clock reparenting.

Signed-off-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds .determine_rate support to the composite clock. It will
use the .determine_rate callback from the rate component if available,
and fall back on the mux component otherwise. This allows composite
clocks to enjoy the benefits of automatic clock reparenting.

Signed-off-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: allow fixed rates &amp; fixed dividers</title>
<updated>2013-04-12T18:23:24+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2013-04-11T18:31:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f363e215931ecc8077b6f6ee6d39d9ffaf1c3bd0'/>
<id>f363e215931ecc8077b6f6ee6d39d9ffaf1c3bd0</id>
<content type='text'>
The composite clock assumes that any clock implementing the .recalc_rate
callback will also implement .round_rate and .set_rate.  This is not
always true; the basic fixed-rate clock will only implement .recalc_rate
and a fixed-divider clock may choose to implement .recalc_rate and
.round_rate but not .set_rate.

Fix this by conditionally registering .round_rate and .set_rate
callbacks based on the rate_ops passed in to clk_composite_register.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Tested-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Cc: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The composite clock assumes that any clock implementing the .recalc_rate
callback will also implement .round_rate and .set_rate.  This is not
always true; the basic fixed-rate clock will only implement .recalc_rate
and a fixed-divider clock may choose to implement .recalc_rate and
.round_rate but not .set_rate.

Fix this by conditionally registering .round_rate and .set_rate
callbacks based on the rate_ops passed in to clk_composite_register.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Tested-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Cc: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: composite: rename 'div' references to 'rate'</title>
<updated>2013-04-12T18:22:35+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2013-04-11T18:31:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3a1c7be8361e2fbb6affbdb19de47ca48d6c402'/>
<id>d3a1c7be8361e2fbb6affbdb19de47ca48d6c402</id>
<content type='text'>
Rename all div_hw and div_ops related variables and functions to use
rate_hw, rate_ops, etc.  This is to make the rate-change portion of the
composite clk implementation more generic.  A patch following this one
will allow for fixed-rate clocks to reuse this infrastructure.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Reviewed-by: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Tested-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Cc: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename all div_hw and div_ops related variables and functions to use
rate_hw, rate_ops, etc.  This is to make the rate-change portion of the
composite clk implementation more generic.  A patch following this one
will allow for fixed-rate clocks to reuse this infrastructure.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Reviewed-by: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Tested-by: Emilio López &lt;emilio@elopez.com.ar&gt;
Cc: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Add composite clock type</title>
<updated>2013-03-26T19:51:48+00:00</updated>
<author>
<name>Prashant Gaikwad</name>
<email>pgaikwad@nvidia.com</email>
</author>
<published>2013-03-20T12:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ece70094f6ab2107d4313fa1802b13dab0234ac5'/>
<id>ece70094f6ab2107d4313fa1802b13dab0234ac5</id>
<content type='text'>
Not all clocks are required to be decomposed into basic clock
types but at the same time want to use the functionality
provided by these basic clock types instead of duplicating.

For example, Tegra SoC has ~100 clocks which can be decomposed
into Mux -&gt; Div -&gt; Gate clock types making the clock count to
~300. Also, parent change operation can not be performed on gate
clock which forces to use mux clock in driver if want to change
the parent.

Instead aggregate the basic clock types functionality into one
clock and just use this clock for all operations. This clock
type re-uses the functionality of basic clock types and not
limited to basic clock types but any hardware-specific
implementation.

Signed-off-by: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not all clocks are required to be decomposed into basic clock
types but at the same time want to use the functionality
provided by these basic clock types instead of duplicating.

For example, Tegra SoC has ~100 clocks which can be decomposed
into Mux -&gt; Div -&gt; Gate clock types making the clock count to
~300. Also, parent change operation can not be performed on gate
clock which forces to use mux clock in driver if want to change
the parent.

Instead aggregate the basic clock types functionality into one
clock and just use this clock for all operations. This clock
type re-uses the functionality of basic clock types and not
limited to basic clock types but any hardware-specific
implementation.

Signed-off-by: Prashant Gaikwad &lt;pgaikwad@nvidia.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
