On Wed, Dec 11, 2013 at 03:51:51PM +0100, Olliver Schinagl wrote: > Working on this and studying the existing > 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)? Not really. We did this for ahci_imx driver only because we do not want 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. > Or do we prefer having the clocks > 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? The direction of the generic ahci platform driver will be having it be 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 -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html