[PATCH 3/4] clk: shmobile: add CPG driver for rz-platforms

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Mar 4 06:02:31 EST 2014


Hi Wolfram,

On Monday 03 March 2014 17:27:31 Wolfram Sang wrote:
> > While the parent is indeed selected at boot time only, and only one parent
> > is thus needed, parent selection could be performed by a DIP switch
> > connected to MD_CLK on the board for instance. In that case both parents
> > should be available in DT, as selection will be done by the kernel at
> > boot time, not at DT compile time.
> 
> OK, I understand the case. I still wonder about specifying two parents,
> though. If a board uses USB_X1, it then has to spefify a dummy EXTAL
> clock (or an empty one), just because USB_X1 is enumerated as second
> entry?

That's a good question. Mike, would it be possible to support "holes" in the 
DT clocks lists, like the GPIO DT bindings do ?

> > > Again, now that I already coded it, what is the gain to remove it? The
> > > drawback is that other people might get encouraged to find reasons to
> > > allow them sloppy practices.
> > 
> > It will make the kernel binary smaller by removing code that is not needed
> > in practice.
> 
> Sounds like a micro-optimazation to me. If you insist, we should BUG()
> right away in that case, to make the code comprehensible. Returning with
> a leak and saying "we will probably fail somewhere" should really be
> avoided IMO.

It's a micro-optimization indeed, but a simple one, so I believe it makes 
sense. I'll leave it up to you in the end.

-- 
Regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140304/e2ea5833/attachment.sig>


More information about the linux-arm-kernel mailing list