From: francesco.virlinzi@st.com (Francesco VIRLINZI)
To: linux-arm-kernel@lists.infradead.org
Subject: [Proposal] [PATCH] generic clock framework
Date: Tue, 10 Nov 2009 15:00:59 +0100 [thread overview]
Message-ID: <4AF9721B.4070203@st.com> (raw)
Hi all
I'm Francesco and I work in STMicroelectronics
In the last ELC-E_2009 I spoke on a generic clock framework I'm working on
(see
http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2009Presentations?action=AttachFile&do=view&target=ELC_E_2009_Generic_Clock_Framework.pdf).
I wrote the gcf to manage both clocks the platform_devices during a
clock operation.
The main features are:
- it's integrated in the LDM
- it tracks the clock-to-clock relationship
- it tracks the clock-to-device relationship
- it has sysfs interface
- - the user can navigate the clock tree under /sys/clocks/...
- it uses the linux API (<linux/clk.h>) with some extra functions (to
register/unregister a clock
and other utility functions as clk_for_each())
- it involves the platform_device and the platform_driver in the clock
propagation.
- - basically each clock operation is managed as a transaction which
evolves step by step.
- - all the clock rates are evaluated (before the clk operation is
actually done)
- - each platform_device can check (before the clk operation is
actually done) the clk environment
it will have at the end of clock operation and if required it can
reject the operation.
- - each clock operation is actually executed only if all the
platform_devices accept the operation it-self
Moreover a common clock framework could be used to avoid a lot of
duplicated and/or similar code
just a grep of 'EXPORT_SYMBOL\(clk_enable' under arch/arm finds 22
entries.
The patch is based on a 2.6.30 kernel also if it has a preliminary
integration with the PM_RUNTIME
support.
It works on our st40 (an sh4 cpu based system) no test/porting was done
on any ARM platform.
It would be mainly a starting point for a discussion and I'm available
to extend/fix/share it.
Regards
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091110/a197b928/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-generic-clock-framework.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091110/a197b928/attachment-0001.el>
next reply other threads:[~2009-11-10 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 14:00 Francesco VIRLINZI [this message]
[not found] <4AF98175.4090205@st.com>
[not found] ` <4AF9AC3B.2070004@am.sony.com>
2009-11-11 7:54 ` [Proposal] [PATCH] generic clock framework Francesco VIRLINZI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AF9721B.4070203@st.com \
--to=francesco.virlinzi@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).