From b6afa7cf62d7d3c618454009707a458a15a22942 Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Wed, 5 Apr 2023 00:59:26 +0200 Subject: i2c: fsl_i2c: fix m68k transferts This driver is actually used for powerpc and m68k/ColdFire. On ColdFire SoC's, interrupt flag get not set if IIEN flag (mbcr bit6, interrupt enabled) is not set appropriately before each transfert. As a result, the transfert hangs forever waiting for IIEN. This patch set IIEN before each transfert, while considering this fix as not harming powerpc arch. Signed-off-by: Angelo Dureghello --- arch/m68k/include/asm/fsl_i2c.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/fsl_i2c.h b/arch/m68k/include/asm/fsl_i2c.h index 9c54fdea77c..dc6b37a575f 100644 --- a/arch/m68k/include/asm/fsl_i2c.h +++ b/arch/m68k/include/asm/fsl_i2c.h @@ -57,4 +57,14 @@ typedef struct fsl_i2c_base { #define I2C_DR_RES ~(I2C_DR) } fsl_i2c_t; +#if CONFIG_IS_ENABLED(DM_I2C) +struct fsl_i2c_dev { + struct fsl_i2c_base __iomem *base; /* register base */ + u32 i2c_clk; + u32 index; + u8 slaveadd; + uint speed; +}; +#endif + #endif /* _ASM_I2C_H_ */ -- cgit v1.2.3