aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k
diff options
context:
space:
mode:
authorAngelo Dureghello2023-04-05 00:59:26 +0200
committerHeiko Schocher2023-04-11 06:51:56 +0200
commitb6afa7cf62d7d3c618454009707a458a15a22942 (patch)
tree355118744f5a73c4b8d5df19998eeb0e2aa13e97 /arch/m68k
parent987e20e5931df5b8e30f4ab363fe6c6adf94704f (diff)
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 <angelo@kernel-space.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/fsl_i2c.h10
1 files changed, 10 insertions, 0 deletions
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_ */