[PATCH] powerpc: i2c-mpc: make speed registers configurable via FDT

Grant Likely grant.likely at secretlab.ca
Fri Aug 1 05:59:11 EST 2008


On Thu, Jul 31, 2008 at 09:54:48PM +0200, Wolfgang Grandegger wrote:
> Thinking more about it, it would be best to add the property  
> "i2c-clock-divider" to the soc node and implement fsl_get_i2c_freq() in  
> a similar way:
>
>         soc8541 at e0000000 {
>                 #address-cells = <1>;
>                 #size-cells = <1>;
>                 device_type = "soc";
>                 ranges = <0x0 0xe0000000 0x100000>;
>                 reg = <0xe0000000 0x1000>;      // CCSRBAR 1M
>                 bus-frequency = <0>;
>                 i2c-clock-divider = <2>;
>
> U-Boot could then fixup that value like bus-frequency() and the i2c-mpc  
> driver simply calls fsl_get_i2c_freq().

Ugh.  This is specifically related to the i2c device, so please place
the property in the i2c device.  Remember, device tree design is not
about what will make the implementation simplest, but rather about what
describes the hardware in the best way.

Now, if you can argue that i2c-clock-frequency is actually a separate
clock domain defined at the SoC level, not the i2c device level, then I
will change my opinion.

g.




More information about the Linuxppc-dev mailing list