Hi all,
A quick refresher: the clock framework APIs in include/linux/clk.h have
allowed platforms to develop their own platform-specific implementations
to manage clocks; this meant that everyone had their own definition of
struct clk, duplicated much code and contributed negatively to the
on-going quest for The One Image to Rule Them All.
The common clk framework is an attempt to define a generic struct clk
which most platforms can use to build a clk tree and perform a
well-defined set of operations against.
These five patches are the next iteration of the common clk framework.
Since the V2 submission back in late September I ported the OMAP4
portion of OMAP's platform-specific clk framework and actively developed
the generic code on a Panda board which revealed many bugs in V2.
The patches are based on Linus' v3.2-rc1 tag and can be pulled from:
git://git.linaro.org/people/mturquette/linux.githttp://git.linaro.org/gitweb?p=people/mturquette/linux.git;a=shortlog;h=ref…
A great deal of this work was first done by Jeremy Kerr, who in turn
based his patches off of work by Ben Herrenschmidt
(https://lkml.org/lkml/2011/5/20/81). Many others contributed to those
patches and promptly had their work stolen by me. Thanks to all for
their past contributions.
What to expect in this version:
.the most notable change is the removal of struct clk_hw. This extra
layer of abstraction is only necessary if we want hide the definition of
struct clk from platform code. Many developers expressed the need to
know some details of the generic struct clk in the platform layer, and
rightly so. Now struct clk is defined in include/linux/clk.h, protected
by #ifdef CONFIG_GENERIC_CLK.
.flags have been introduced to struct clk, with several of them
defined and used in the common code. These flags protect against
changing clk rates or switching the clk parent while that clk is
enabled; another flag is used to signal to clk_set_rate that it should
ask the parent to change it's rate too.
.speaking of which, clk_set_rate has been overhauled and is now
recursive. *collective groan*. clk_set_rate is still simple for the
common case of simply setting a single clk's rate. But if your clk has
the CLK_PARENT_SET_RATE flag and the .round_rate callback recommends
changing the parent rate, then clk_set_rate will recurse upwards to the
parent and try it all over again. In the event of a failure everything
unwinds and all the clks go out for drinks.
.clk_register has been replaced by clk_init, which does NOT allocate
memory for you. Platforms should allocate their own clk_hw_whatever
structure which contains struct clk. clk_init is still necessary to
initialize struct clk internals. clk_init also accepts struct device
*dev as an argument, but does nothing with it. This is in anticipation
of device tree support.
.Documentation! I'm sure somebody reads it.
.sysfs support. Visualize your clk tree at /sys/clk! Where would be
a better place to put the clk tree besides the root of /sys/? When a
consensus on this is reached I'll submit the proper changes to
Documentation/ABI/testing/.
What's missing?
.per tree locking. I implemented this at the Linaro Connect
conference but the implementation was unpopular, so it didn't make the
cut. There needs to be better understanding of everyone's needs for
this to work.
.rate change notifications. I simply didn't want to delay getting
these patches to the list any longer, so the notifiers didn't make it
in. I'll submit them to the list soon, or roll them into the V4
patchset. There are comments in the clk API definitions for where
PRECHANGE, POSTCHANGE and ABORT propagation will go.
.basic mux clk, divider and dummy clk implementations. I think others
have some code lying around to implement these, so I left them out.
.device tree support. I haven't looked much at the on-going
discussions on the dt clk bindings. How compatible (or not) are the
device tree clk bindings and the way these patches want to initialize
clks?
.what is the overlap between common clk and clkdev? We're essentially
tracking the clks in two places (common clk's tree and clkdevs's list),
which feels a bit wasteful.
What else?
.OMAP4 support will be posted to LOML and LAKML in a separate
patchset, since others might be interested in seeing a full port. It is
a total hack, and is not ready for a formal submission.
Mike Turquette (5):
clk: Kconfig: add entry for HAVE_CLK_PREPARE
Documentation: common clk API
clk: introduce the common clock framework
clk: basic gateable and fixed-rate clks
clk: export tree topology and clk data via sysfs
Documentation/clk.txt | 312 +++++++++++++++++++++++++++
drivers/clk/Kconfig | 24 ++
drivers/clk/Makefile | 5 +-
drivers/clk/clk-basic.c | 208 ++++++++++++++++++
drivers/clk/clk-sysfs.c | 199 +++++++++++++++++
drivers/clk/clk.c | 541 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/clk.h | 199 +++++++++++++++++-
7 files changed, 1484 insertions(+), 4 deletions(-)
create mode 100644 Documentation/clk.txt
create mode 100644 drivers/clk/clk-basic.c
create mode 100644 drivers/clk/clk-sysfs.c
create mode 100644 drivers/clk/clk.c
--
1.7.4.1
Hi LAVA users,
The Linaro Validation Team is preparing to change the way we deploy
LAVA in production. We expect this will require 1 hour of downtime or
less on Monday beginning at 22:00 UTC.
This upgrade will streamline our deployment process, allowing us to
deploy changes more frequently and quickly deliver incremental
improvements. This change will also allow others to deploy LAVA in the
same way, for development or production purposes.
As the API will not be working during the downtime, there is the
chance that some automatically-submitted jobs (e.g. from
android-build) will be lost. We hope to work soon on an approach that
will avoid this risk.
Cheers,
The Validation Team
Hello,
We launched "seeded" builds on Linaro Android Build System
(https://android-build.linaro.org) more than a week ago with the aim to
improve build performance and stability, following Android ICS import
which overloaded our previous build infrastructure, and looking forward
into making Android RC preparation to be comfortable instead of
stressful it became due to infra overload.
From the very first builds it was clear that it is huge relief
for problems we have, but it took entire Android team involvement to
prove that they're working as expected. And now, almost 2 weeks later,
we even enough stats materials to assess how much improvement they
actually did. So, I wrote a blog article about that, which includes
nice build time chart which vividly shows it all:
http://www.linaro.org/linaro-blog/2011/12/01/improving-performance-of-linar…
The seeded builds launch effort was a big success in cooperation
between Infrastructure and Android team, led by Platform Director, and
I would like to thank everyone for you discussion, involvement, peer
review!
One last thing I would like to add though is that we essentially just
*started* deployment of the seeded builds, they will require more time
to uncover their full potential and made be well maintainable, so work
on that continues thru 11.12
Thanks,
Paul
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linarohttp://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
I probably know the answer to this already but ...
For shared libs one can define and use something like:
void __attribute__ ((constructor)) my_init(void);
void __attribute__ ((destructor)) my_fini(void);
Which of course allows your lib to run code just after the library is
loaded and just before the library is going to be unloaded. This helps
keep out cruft such as the following out of your design:
PleaseCallThisLibraryFunctionFirstOrThereWillBeAnErrorWhichYouWillHitCausingYouToPostToTheMailingListAskingTheSameQuestionThatHasBeenAsked1000sOfTimes();
Yeah .. you know the function. I don't like it either.
Unfortunately this doesn't work when people link in the .a from your
lib. Libs like libjpeg-turbo in theory should never ever need to be
linked in that fashion but consider the browsers who link to the
universe instead of using system shared libs.
If we accept that linking .a's valid use, and we don't want to promote
the use of the function that won't be named in the design and use of
libraries, then I'd like to think for the good of humanity the
toolchain should allow for the use of __attribute__ ((constructor))
and __attribute__ ((destructor)) to continue to work in the static
link case.
Maybe this has already been solved, in which case where is that fine
manual as I clearly have some reading to do!
Thoughts?
Thanks!
Tom
"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Multimedia Tech Lead | Linaro.org │ Open source software for ARM SoCs
w) tom.gall att linaro.org
w) tom_gall att vnet.ibm.com
h) tom_gall att mac.com
Hi Amit,
Is there anyone working on a SoC bus framework?
The bus framework can manage the bus fabric, ddr, OCRAM clocks. When a
device driver become working, it tells bus framework, cpu may access
me (ip bus and related bus fabric on), I'm also a bus master, may
access ddr (ddr dma access +1 ). For bus framework, if ddr dma access
request is zero, ddr clk can be disabled in WFI/wait mode. The bus
framework manage the SoC bus topology. If a bus switch use count is
zero, it can be disabled. It may even adjust the bus freq dynamically
according to bus request.
Thanks
Richard
Please disregard previous draft a few minutes ago, it was sent in error.
Greetings,
This is a mail sent to remind you the coming release dates:
* Linaro 11.12 Toolchain WG release December 8, 2011.
* Linaro 11.12 Platform/WGs/LTs is December 15, 2011.
* Linaro 11.12 Release Candidate is December 19, 2011.
* Linaro 11.12 Release images is December 22, 2011
(early due to Christmas holiday).
* Linaro 11.12 release is UTC 16:00, December 22, 2011.
Components release will be announced this week.
The release dates and deliveries information is available from the release
dashboard: http://wiki.linaro.org/Cycles/1112/Release/Dashboard
--
David Zinman
Linaro Release Manager | Project Manager
Linaro.org | Open source software for ARM SoCs
Greetings,
This is a mail sent to remind you the coming release dates:
* Linaro 11.11 components release is November 17th, 2011.
* Linaro 11.10 RC images is November 21st, 2011.
* Linaro 11.10 Release images is November 21st, 2011 (due to holiday
on Nov 24).
* Linaro 11.10 release is UTC 16:00, November 24th, 2011.
Components release will be announced this week.
The release dates and deliveries information is available from the release
dashboard: http://wiki.linaro.org/Cycles/1111/Release/Dashboard
--
David Zinman
Linaro Release Manager | Project Manager
Linaro.org | Open source software for ARM SoCs
Hi Angus & Grant,
Because the Linaro Android 11.11 release has been done successfully, I have
some time to continue to work on device tree topic, here is my blue print
for it:
https://blueprints.launchpad.net/linaro-android/+spec/linaro-android-origen…
Therefore, I would like to know what I can do for this in the 11.12 cycle -
from now to the 18th December 2011. For Samsung Origen Android build, the
latest kernel version I got is still 3.0.4+, so I think there is no any
device tree stuff in it.
@Angus, Would you give me a brief about the device tree support status on
our current 3.0.4+ kernel? Will you upgrade it to the 3.1 in 11.12 cycle?
@Thomas, In this blue print:
https://blueprints.launchpad.net/linaro-android/+spec/linaro-platforms-lc4.…,
Tony mentioned that you has upstreamed the initial support for device tree.
However, it depends on the 3.1 kernel upgrade. I would like to know that is
there any possible that I can do something without the kernel upgrade?
I currently feel that this work highly depends on the outcome of landing
team and kernel group, so before I get something from them, I'm afraid that
I can't do any "real" work on this.
Thank you all for your help!
BR
Botao Sun