Hi Alexander, Sorry for not getting back to you earlier. I didn't see the email chains until last night due to a poorly configured gmail filter. On Sat, Apr 21, 2018 at 2:11 PM, Alexander Monakov <amonakov@xxxxxxxxx> wrote: > Hi, > > there's a regression on Designware I2C controllers that do not implement > the IC_ENABLE_STATUS register, as detailed in thread > "[bug] some versions of designware i2c lack enable status register" at > https://www.spinics.net/lists/linux-i2c/msg34009.html > > Unfortunately I did not hear anything back from Ben, not even regarding > the IP core revision on his board. Looking on my own, I've found that > there's a possible race with the interrupt handler that may be causing > problems. > > Patch 1 adds missing IRQ synchronization, patch 2 reverts the commit > that caused a regression, and patch 3 is a bonus refactoring, as I > believe the low-level enable-disable functionality is now quite messy. > > Cc: Ben Gardner <gardner.ben@xxxxxxxxx> > Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> > Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx> > > Alexander Monakov (3): > i2c: designware: avoid race with interrupt handler > Revert "i2c: designware: must wait for enable" > i2c: designware: refactor low-level enable/disable > > drivers/i2c/busses/i2c-designware-common.c | 20 +++++++++----------- > drivers/i2c/busses/i2c-designware-core.h | 13 +++++++++++-- > drivers/i2c/busses/i2c-designware-master.c | 10 ++++++---- > drivers/i2c/busses/i2c-designware-slave.c | 6 +++--- > 4 files changed, 29 insertions(+), 20 deletions(-) > > -- > 2.11.0 > This patch series breaks my board again (Intel Atom E3845). Specifically, the revert breaks it. Two registers of interest from the controllers on the E3845: IC_COMP_VERISON: 0x3131352a IC_COMP_TYPE: 0x44570140 The full datasheet for that CPU is available online. https://www.intel.com/content/www/us/en/embedded/products/bay-trail/atom-e3800-family-datasheet.html I think we need to be smarter about which boards have the IC_ENABLE_STATUS register, but I don't know enough about the various supported Designware I2C controller implementations to suggest an approach. Thanks, Ben