RE: [PATCH v4 2/3] mmc: sh_mobile_sdhi: explain clock bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wolfram,

Ulf's request was for more info, but it wasn't clear if he wanted more
info in the commit logs or in the files themselves.


On Friday, January 20, 2017, Wolfram Sang wrote:
> > +- clocks: Most controllers only have 1 clock source per channel.
> However, on
> > +	  some variations of this controller, the internal card detection
> > +	  logic that exists in this controller is sectioned off to be run by
> a
> > +	  separate second clock source to allow the main core clock to be
> turned
> > +	  off to save power. Unfortunately, the existing driver architecture
> > +	  does not support such a separation of clocks.
> > +	  Additionally, it is prohibited to supply a clock to the core but
> not
> > +	  to the card detect circuit. That leaves you with if separate
> clocks
> > +	  are presented, you must treat them both as 1.
> > +	  If 2 clocks are specified by the hardware, you must name them as
> > +	  "core" and "cd".
> > +	  If the controller only has 1 clock, naming is not required.
> 
> I know we are not perfect in this area, but DT binding should be OS
> agnostic and should refrain from specifying Linux internals.
> 
> So, I'd think the comments about driver architecture should be put into
> the driver, not into the bindings.


It sounds like your suggestion is to just put the HW description in
the DT bindings, but move the dirty details into the driver.

Keep in DT:

+- clocks: Most controllers only have 1 clock source per channel. However, on
+	  some variations of this controller, the internal card detection
+	  logic that exists in this controller is sectioned off to be run by a
+	  separate second clock source to allow the main core clock to be turned
+	  off to save power.
+	  If 2 clocks are specified by the hardware, you must name them as
+	  "core" and "cd".
+	  If the controller only has 1 clock, naming is not required.



Move somewhere in the driver (maybe where the 2nd clock is detected):

+	  Unfortunately, the existing driver architecture
+	  does not support such a separation of clocks.
+	  Additionally, it is prohibited to supply a clock to the core but not
+	  to the card detect circuit. That leaves you with if separate clocks
+	  are presented, you must treat them both as 1.


Is this what you were thinking?


Thank you,
Chris





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux