<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/clk/clk.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-12-11T06:35:02Z</updated>
<entry>
<title>clk: introduce optional disable_unused callback</title>
<updated>2012-12-11T06:35:02Z</updated>
<author>
<name>Mike Turquette</name>
</author>
<published>2012-12-04T19:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c045a55c97fb83a2e5e9c6c857162c4866cc602'/>
<id>urn:sha1:7c045a55c97fb83a2e5e9c6c857162c4866cc602</id>
<content type='text'>
Some gate clocks have special needs which must be handled during the
disable-unused clocks sequence.  These needs might be driven by software
due to the fact that we're disabling a clock outside of the normal
clk_disable path and a clk's enable_count will not be accurate.  On the
other hand a specific hardware programming sequence might need to be
followed for this corner case.

This change is needed for the upcoming OMAP port to the common clock
framework.  Specifically, it is undesirable to treat the disable-unused
path identically to the normal clk_disable path since other software
layers are involved.  In this case OMAP's clockdomain code throws WARNs
and bails early due to the clock's enable_count being set to zero.  A
custom callback mitigates this problem nicely.

Cc: Paul Walmsley &lt;paul@pwsan.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: clock multiplexers may register out of order</title>
<updated>2012-11-26T19:14:45Z</updated>
<author>
<name>Martin Fuzzey</name>
</author>
<published>2012-11-22T19:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f61e5f143b578606389887887af549bc5554353'/>
<id>urn:sha1:1f61e5f143b578606389887887af549bc5554353</id>
<content type='text'>
When a clock, C is initialised any orphan clocks listing C as
a possible parent are reparented to it regardless of the
parent requested by the orphan's get_parent() operation.

This means that multiplexers registered before their parents
are reparented to the first parent subsequently declared,
regardless of the selection made by the hardware registers.

For example:
	static const char *sel[] = { "srcA", "srcB", "dummy", "srcC" };

	child = clk_register_mux(NULL, "child",  sel, ARRAY_SIZE(sel), ...);
	clk_register_fixed(NULL, "dummy", ...);
	clk_register_fixed(NULL, "srcA", ...);
	clk_register_fixed(NULL, "srcB", ...);
	clk_register_fixed(NULL, "srcC", ...);

Causes child's parent to always be "dummy".

To fix this, when an orphanned clock has a get_parent() operation,
only reparent to the clock indicated by get_parent().

Signed-off-by: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
[mturquette@linaro.org: improve $SUBJECT]
</content>
</entry>
<entry>
<title>clk: Add devm_clk_{register,unregister}()</title>
<updated>2012-10-29T18:12:46Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2012-09-24T20:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46c8773a58010d31f228e148b8b774d94cc9810d'/>
<id>urn:sha1:46c8773a58010d31f228e148b8b774d94cc9810d</id>
<content type='text'>
Some clock drivers can be simplified if devres takes care of
unregistering any registered clocks along error paths. Introduce
devm_clk_register() so that clock drivers get unregistration for
free along with simplified error paths.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: Don't return negative numbers for unsigned values with !clk</title>
<updated>2012-10-29T18:05:03Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2012-10-04T06:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ac6b1f50a397580b8dc28f2833e54af7926fc71'/>
<id>urn:sha1:2ac6b1f50a397580b8dc28f2833e54af7926fc71</id>
<content type='text'>
Some of the helper functions return negative error codes if
passed a NULL clock. This can lead to confusing behavior when the
expected return value is unsigned. Fix up these accessors so that
they return unsigned values (or bool in the case of is_enabled).
This way we can't interpret NULL clocks as having valid and
interesting values.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: add of_clk_src_onecell_get() support</title>
<updated>2012-09-08T01:30:19Z</updated>
<author>
<name>Shawn Guo</name>
</author>
<published>2012-08-22T13:36:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=494bfec99922d54054d2d0873f1017680cfc3f13'/>
<id>urn:sha1:494bfec99922d54054d2d0873f1017680cfc3f13</id>
<content type='text'>
For those SoCs that have hundreds of clock outputs, their clock
DT bindings could reasonably define #clock-cells as 1 and require
the client device specify the index of the clock it consumes in the
cell of its "clocks" phandle.

Add a generic of_clk_src_onecell_get() function for this purpose.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Reviewed-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: Provide option for clk_get_rate to issue hw for new rate</title>
<updated>2012-09-07T00:56:22Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2012-08-31T12:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a093bde2b45a0a745f12c018e2d13c027d58641f'/>
<id>urn:sha1:a093bde2b45a0a745f12c018e2d13c027d58641f</id>
<content type='text'>
By using CLK_GET_RATE_NOCACHE flag, we tell the clk_get_rate API to
issue the hw for an updated clock rate. This can be used for a clock
which rate may be updated without a client necessary modifying it.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: validate pointer in __clk_disable()</title>
<updated>2012-07-31T00:25:13Z</updated>
<author>
<name>Fengguang Wu</name>
</author>
<published>2012-07-30T21:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e47c6a3408ea6bcfc5204f23d5a5b209de6e68b9'/>
<id>urn:sha1:e47c6a3408ea6bcfc5204f23d5a5b209de6e68b9</id>
<content type='text'>
clk_get() returns -ENOENT on error and some careless caller might
dereference it without error checking:

In mxc_rnga_remove():

        struct clk *clk = clk_get(&amp;pdev-&gt;dev, "rng");

	// ...

        clk_disable(clk);

Since it's insane to audit the lots of existing and future clk users,
let's add a check in the callee to avoid kernel panic and warn about
any buggy user.

Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Cc: viresh kumar &lt;viresh.linux@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>clk: add DT clock binding support</title>
<updated>2012-07-12T00:58:45Z</updated>
<author>
<name>Grant Likely</name>
</author>
<published>2012-04-09T19:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=766e6a4ec602d0c107553b91b3434fe9c03474f4'/>
<id>urn:sha1:766e6a4ec602d0c107553b91b3434fe9c03474f4</id>
<content type='text'>
Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
Likely, this patch adds support to clk_get to allow drivers to retrieve
clock data from the device tree.

Platforms scan for clocks in DT with of_clk_init and a match table, and
the register a provider through of_clk_add_provider. The provider's
clk_src_get function will be called when a device references the
provider's OF node for a clock reference.

v6 (Rob Herring):
    - Return error values instead of NULL to match clock framework
      expectations

v5 (Rob Herring):
    - Move from drivers/of into common clock subsystem
    - Squashed "dt/clock: add a simple provider get function" and
      "dt/clock: add function to get parent clock name"
    - Rebase to 3.4-rc1
    - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
    - Add missing EXPORT_SYMBOL to various functions
    - s/clock-output-name/clock-output-names/
    - Define that fixed-clock binding is a single output

v4 (Rob Herring):
    - Rework for common clk subsystem
    - Add of_clk_get_parent_name function

v3: - Clarified documentation

v2: - fixed errant ';' causing compile error
    - Editorial fixes from Shawn Guo
    - merged in adding lookup to clkdev
    - changed property names to match established convention. After
      working with the binding a bit it really made more sense to follow the
      lead of 'reg', 'gpios' and 'interrupts' by making the input simply
      'clocks' &amp; 'clock-names' instead of 'clock-input-*', and to only use
      clock-output* for the producer nodes. (Sorry Shawn, this will mean
      you need to change some code, but it should be trivial)
    - Add ability to inherit clocks from parent nodes by using an empty
      'clock-ranges' property.  Useful for busses.  I could use some feedback
      on the new property name, 'clock-ranges' doesn't feel right to me.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Reviewed-by: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: cache parent clocks only for muxes</title>
<updated>2012-07-11T22:36:45Z</updated>
<author>
<name>Rajendra Nayak</name>
</author>
<published>2012-06-06T09:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ca1c5a4bf4105d6f2f2a46892495953dd3e2fec'/>
<id>urn:sha1:9ca1c5a4bf4105d6f2f2a46892495953dd3e2fec</id>
<content type='text'>
caching parent clocks makes sense only when a clock has more
than one parent (mux clocks).
Avoid doing this for every other clock.

Signed-off-by: Rajendra Nayak &lt;rnayak@ti.com&gt;
[mturquette@linaro.org: removed extra parentheses]
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>clk: fix parent validation in __clk_set_parent()</title>
<updated>2012-07-03T19:05:14Z</updated>
<author>
<name>Rajendra Nayak</name>
</author>
<published>2012-07-03T06:41:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=863b13271f1608ab3af6f7a371047d9a66693e38'/>
<id>urn:sha1:863b13271f1608ab3af6f7a371047d9a66693e38</id>
<content type='text'>
The below commit introduced a bug in __clk_set_parent()
which could cause it to *skip* the parent validation
which makes sure the parent passed to the api is a valid
one.

    commit 7975059db572eb47f0fb272a62afeae272a4b209
    Author: Rajendra Nayak &lt;rnayak@ti.com&gt;
    Date:   Wed Jun 6 14:41:31 2012 +0530

        clk: Allow late cache allocation for clk-&gt;parents

This was identified by the following compiler warning..

    drivers/clk/clk.c: In function '__clk_set_parent':
    drivers/clk/clk.c:1083:5: warning: 'i' may be used uninitialized in this function [-Wuninitialized]

.. as reported by Marc Kleine-Budde.

There were various options discussed on how to fix this, one
being initing 'i' to clk-&gt;num_parents, but the below approach
was found to be more appropriate as it also makes the 'parent
validation' code simpler to read.

Reported-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Rajendra Nayak &lt;rnayak@ti.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: stable@kernel.org
</content>
</entry>
</feed>
