Timur Tabi wrote:
Wolfgang Grandegger wrote:

But clock-frequency, aka bus-frequency, is already used by fsl_get_sys_freq():

http://lxr.linux.no/linux+v2.6.26/arch/powerpc/sysdev/fsl_soc.c#L80

So?  clock-frequency is a per-node property.  I use it in the codec node on the
8610 (mpc8610_hpcd.dts).  It does not mean "platform clock frequency".

U-Boot could then fixup that value like bus-frequency() and the i2c-mpc driver simply calls fsl_get_i2c_freq().

This is just more complicated than it needs to be.  Why should the I2C driver
fetch the platform clock and the divider from the parent node, and then do
additional math, when it could just get the value it needs right from the node
it's probing?

I'm a bit confused. The frequency of the I2C source clock and the real I2C clock frequency are two different things. The first one is common for all I2C devices, the second can be different. What properties would you like to use for defining both?

Besides, U-Boot does not currently store the divider value.  Look at the code
I've posted twice already - it stores the frequency in i2c1_clk.  So now I would
need to create another variable in the gd_t to store the divider?  No thanks.

OK, that's an argument but it's biased by U-Boot.

Wolfgang.

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to