Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-24 Thread Wolfram Sang
> I see. It is using device tree to match. But the device tree doesn't > have enough information. Many platforms don't specifiy if compatible > with mpc85xx, so they fall into .compatible = "fsl-i2c". Please advise. The 'if (match->data)' block has an else branch which will call 'mpc_i2c_setup_8x

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread York Sun
On 09/23/2013 03:32 PM, Wolfram Sang wrote: > >> I see. It is using device tree to match. But the device tree doesn't >> have enough information. Many platforms don't specifiy if compatible >> with mpc85xx, so they fall into .compatible = "fsl-i2c". > > :( Can those be fixed to use proper "fsl,m

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread Wolfram Sang
> I see. It is using device tree to match. But the device tree doesn't > have enough information. Many platforms don't specifiy if compatible > with mpc85xx, so they fall into .compatible = "fsl-i2c". :( Can those be fixed to use proper "fsl,mpc8544-i2c"? > Please advise. My PPC knowledge is a

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread York Sun
On 09/23/2013 03:09 PM, Wolfram Sang wrote: > >>> Please, no unnecessary #ifdefs in code. We have 'struct mpc_i2c_data' >>> already. >>> >> >> I am not pround of this change. Please elaborate how to use mpc_i2c_data >> to separate the mpc85xx from the rest. > > Search for 'match->data' and see ho

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread Wolfram Sang
> > Please, no unnecessary #ifdefs in code. We have 'struct mpc_i2c_data' > > already. > > > > I am not pround of this change. Please elaborate how to use mpc_i2c_data > to separate the mpc85xx from the rest. Search for 'match->data' and see how the custom setup function and custom prescaler va

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread York Sun
On 09/23/2013 12:10 AM, Wolfram Sang wrote: > >> diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c >> index b80c768..55dce43 100644 >> --- a/drivers/i2c/busses/i2c-mpc.c >> +++ b/drivers/i2c/busses/i2c-mpc.c >> @@ -106,7 +106,12 @@ static irqreturn_t mpc_i2c_isr(int irq, voi

Re: [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-23 Thread Wolfram Sang
> diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c > index b80c768..55dce43 100644 > --- a/drivers/i2c/busses/i2c-mpc.c > +++ b/drivers/i2c/busses/i2c-mpc.c > @@ -106,7 +106,12 @@ static irqreturn_t mpc_i2c_isr(int irq, void *dev_id) > static void mpc_i2c_fixup(struct mpc_

Re: [linuxppc-release] [Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-16 Thread York Sun
On 09/16/2013 03:06 PM, York Sun wrote: > Erratum A-006037 indicates I2C controller executes the write to I2CCR only > after it sees SCL idle for 64K cycle of internal I2C controller clocks. If > during this waiting period, I2C controller is disabled (I2CCR[MEN] set to > 0), then the controller cou

[Patch v2] power/mpc85xx: Add delay after enabling I2C master

2013-09-16 Thread York Sun
Erratum A-006037 indicates I2C controller executes the write to I2CCR only after it sees SCL idle for 64K cycle of internal I2C controller clocks. If during this waiting period, I2C controller is disabled (I2CCR[MEN] set to 0), then the controller could end in bad state, and hang the future access