diff options
author | Angelo Dureghello <angelo@kernel-space.org> | 2023-04-05 01:59:26 +0300 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2023-04-11 07:51:56 +0300 |
commit | b6afa7cf62d7d3c618454009707a458a15a22942 (patch) | |
tree | 355118744f5a73c4b8d5df19998eeb0e2aa13e97 /arch/m68k/include/asm | |
parent | 987e20e5931df5b8e30f4ab363fe6c6adf94704f (diff) | |
download | u-boot-b6afa7cf62d7d3c618454009707a458a15a22942.tar.xz |
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/include/asm')
-rw-r--r-- | arch/m68k/include/asm/fsl_i2c.h | 10 |
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 9c54fdea77..dc6b37a575 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_ */ |