common clock framework

Sascha Hauer s.hauer at pengutronix.de
Fri May 4 06:20:42 EDT 2012


Please do not top post.

On Fri, May 04, 2012 at 01:45:15AM -0700, Chao Xie wrote:
> Hi
> For the clock dependency, what about bus clock. What do you mean about
> bus level.  As I understand the device driver only need care about
> enabling a clock to make it work. For example a USB driver. To make a
> USB work, it may need turn on bus clock, function clock, and phy
> clock. For some SOCs, phy and function may share same clock. There is
> a problem, we leave this dependency to device driver or keep it in our
> clock framework.  To keep it in clock framework, the device driver
> only need know that enable one clock. To leave the dependency to
> device driver, the device driver will need know about all the clocks
> and dependency. If the device driver is shared by many SOCs, it will
> add some #ifdef into it.  So why not add a dependency list into clock
> structure, and it will do enable the dependency clock before enable
> its own clock.

Additional to what Russell already said:
If a clock is not needed by the device directly but for example by the
bus which connects the device, then you need an instance which controls
the bus. Then it's the bus that knows which clocks to activate when a
device on this bus is activated. That said, there currently is hardly
any infrastructure for this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list