Re: [PATCH v2 3/3] i2c: mpc: implement erratum A-004447 workaround

2021-05-07 Thread Andy Shevchenko
On Fri, May 7, 2021 at 5:52 PM Joakim Tjernlund wrote: > On Fri, 2021-05-07 at 14:46 +0300, Andy Shevchenko wrote: > > On Fri, May 7, 2021 at 3:40 AM Chris Packham > > wrote: ... > > So, now you may shrink it even further, i.e. > > > >void __iomem *sr = i2c->base + MPC_I2C_SR; > >

Re: [PATCH v2 3/3] i2c: mpc: implement erratum A-004447 workaround

2021-05-07 Thread Joakim Tjernlund
On Fri, 2021-05-07 at 14:46 +0300, Andy Shevchenko wrote: > On Fri, May 7, 2021 at 3:40 AM Chris Packham > wrote: > > > > The P2040/P2041 has an erratum where the normal i2c recovery mechanism > > does not work. Implement the alternative recovery mechanism documented > > in the P2040 Chip Errata

Re: [PATCH v2 3/3] i2c: mpc: implement erratum A-004447 workaround

2021-05-07 Thread Andy Shevchenko
On Fri, May 7, 2021 at 3:40 AM Chris Packham wrote: > > The P2040/P2041 has an erratum where the normal i2c recovery mechanism > does not work. Implement the alternative recovery mechanism documented > in the P2040 Chip Errata Rev Q. Thanks. > +static int i2c_mpc_wait_sr(struct mpc_i2c *i2c, int

[PATCH v2 3/3] i2c: mpc: implement erratum A-004447 workaround

2021-05-06 Thread Chris Packham
The P2040/P2041 has an erratum where the normal i2c recovery mechanism does not work. Implement the alternative recovery mechanism documented in the P2040 Chip Errata Rev Q. Signed-off-by: Chris Packham --- Notes: Changes in v2: - Use readb_poll_timeout instead of open-coded loop drive