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

Timur Tabi timur at freescale.com
Fri Aug 1 23:25:59 EST 2008


On Thu, Jul 31, 2008 at 9:35 PM, Jon Smirl <jonsmirl at gmail.com> wrote:

> I've having trouble with whether these clocks are a system resource or
> something that belongs to i2c. If they are a system resource then we
> should make nodes in the root and use a phandle in the i2c node to
> link to them.

I can't speak for 52xx, but for 8[356]xx, I would say the clocks
belong to the I2C devices.  The screwball determination of whether to
divide by 1, 2, or 3 only applies to the I2C device only.  The divider
itself is not used to drive a clock for any other device.  If you
disable I2C support, then you don't need to care about the divider (or
its output clock) at all.  That's why I think have the I2C clock in
the parent node is wrong, because it would only be used if you had I2C
child nodes.  If you didn't have any I2C nodes, then you would need to
delete the property from the parent node as well.

> The phandle in the mpc5200 case could be implicit since it is fixed in silicon.

If we want to use the same I2C driver for 52xx and 83xx, it shouldn't
be implicit.  Otherwise, the driver will have to check the platform to
determine where to look.

> Is this register in a system register bank or an i2c one?
> gur->pordevsr2 & MPC85xx_PORDEVSR2_SEC_CFG

That should be "guts->" I think.  The global utilities is a block of
miscellaneous registers, one per SOC.  It's not part of the I2C block.

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Linuxppc-dev mailing list