<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<big><big><tt>Hi all<br>
<br>
I'm Francesco and I work in STMicroelectronics<br>
<br>
In the last ELC-E_2009 I spoke on a generic clock framework I'm working
on<br>
(see
<a class="moz-txt-link-freetext" href="http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2009Presentations?action=AttachFile&do=view&target=ELC_E_2009_Generic_Clock_Framework.pdf">http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2009Presentations?action=AttachFile&do=view&target=ELC_E_2009_Generic_Clock_Framework.pdf</a>).<br>
<br>
</tt><tt>I wrote the gcf to manage both clocks the platform_devices
during a clock operation.<br>
<br>
</tt><tt>The main features are:<br>
- it's integrated in the LDM<br>
</tt></big></big><big><big><tt> - it tracks the clock-to-clock
relationship<br>
- it tracks the clock-to-device relationship<br>
<br>
</tt></big></big><big><big><tt> - it has sysfs interface<br>
- - the user can navigate the clock tree under /sys/clocks/...<br>
<br>
- it uses the linux API (<linux/clk.h>) with some extra
functions (to register/unregister a clock<br>
and other utility functions as clk_for_each())<br>
<br>
- it involves the platform_device and the platform_driver in the clock
propagation.<br>
- - basically each clock operation is managed as a transaction which
evolves step by step.<br>
- - </tt><tt>all the clock rates are evaluated (before the clk
operation is actually done)<br>
</tt><tt> - - each platform_device can check (</tt><tt>before the clk
operation is </tt></big></big><big><big><tt>actually</tt></big></big><big><big><tt>
done</tt><tt>) the clk environment<br>
it will have at the end of clock operation and if required it can
reject the operation.<br>
- - each clock operation is </tt></big></big><big><big><tt>actually</tt></big></big><big><big><tt>
executed only if all the </tt><tt>platform_</tt><tt>devices accept the
operation it-self<br>
<br>
<br>
Moreover a common clock framework could be used to avoid a lot of
duplicated and/or similar code<br>
just a grep of 'EXPORT_SYMBOL\(clk_enable' under arch/arm finds 22
entries.<br>
<br>
The patch is based on a 2.6.30 kernel also if it has a preliminary
integration with the PM_RUNTIME<br>
support.<br>
<br>
It works on our st40 (an sh4 cpu based system) no test/porting was done
on any ARM platform.<br>
<br>
It would be mainly a starting point for a discussion and I'm available
to extend/fix/share it.<br>
<br>
Regards<br>
Francesco</tt></big></big><br>
</body>
</html>