On Wed, Dec 11, 2013 at 03:51:51PM +0100, Olliver Schinagl wrote:Well many SoC's have these specific things so we need a place to provide for this.Working on this and studying the existingNot really. We did this for ahci_imx driver only because we do not want
ahci_platform/shci_platform drivers the last few days and was
figuring out why ahci_platform only supports 1 clock. IMX handles
this by having 3 clocks defined in the DT, the first one gets
enabled by default via ahci_platform, the other 2 get enabled in
IMX's probe function.
Is it an idea to extend this to support all clocks that would be
required (via a callback)?
to churn generic ahci_platform driver with those imx specific setup
code. Note, beside the additional two clocks, we have some PHY
parameters to set up in IMX IOMUXC general purpose registers, and vendor
specific register HOST_TIMER1MS to be set up as well.
I know, I started this entire thread :p hence my question :)
Or do we prefer having the clocksThe direction of the generic ahci platform driver will be having it be
separated for other technical reasons? Or do we want to handle the
clocks via the ahci_platform framework and extend hpriv->clk to an
array of clocks?
a library providing helper functions, as discussed as below.
https://lkml.org/lkml/2013/12/6/153
We can ask the helper function to handle the common clocks and leave the
platform specific ones to platform driver.
Shawn