Re: [PATCH] I2C: mpc: insert DR read in i2c_fixup()

Wolfram Sang
2014-06-03T07:11:14Z

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

> > Have you checked other manuals if this always has been the proposed
> > procedure?
>
> I have just checked the RMs of the Freescale CPUs I am familiar with, and it is
> the same procedure:
> - MPC8360E (PowerQUICC II Pro family): 15.5.7
> - MPC8548E (PowerQUICC III family): 11.5.6
>
> So I think this is the correct procedure for this module according to several RMs.

Thanks.

> >> --- a/drivers/i2c/busses/i2c-mpc.c
> >> +++ b/drivers/i2c/busses/i2c-mpc.c
> >> @@ -107,6 +107,7 @@ static irqreturn_t mpc_i2c_isr(int irq, void *dev_id)
> >> static void mpc_i2c_fixup(struct mpc_i2c *i2c)
> >> {
> >> int k;
> >> + u8 dr;
> >
> > Looks like we can drop this variable since the value read is not used?
>
> That's correct it is not used. I have added it to make sure that this is not
> "optimized" out but I guess the readb call is enough for this purpose ?

I'd think so, but it needs your test :)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]