mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
fsl_i2c: add workaround for the erratum I2C A004447
This workaround is for the erratum I2C A004447. Device reference manual provides a scheme that allows the I2C master controller to generate nine SCL pulses, which enable an I2C slave device that held SDA low to release SDA. However, due to this erratum, this scheme no longer works. In addition, when I2C is used as a source of the PBL, the state machine is not able to recover. At the same time, delete the reduplicative definition of SVR_VER and SVR_REV. The SVR_REV is the low 8 bits rather than the low 16 bits of svr. And we use the CONFIG_SYS_FSL_A004447_SVR_REV macro instead of hard-code value 0x10, 0x11 and 0x20. The CONFIG_SYS_FSL_A004447_SVR_REV = 0x00 represents that one version of platform has this I2C errata. So enable this errata by IS_SVR_REV(svr, maj, min) function. Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
b8ce3343b6
commit
9c3f77eb3b
5 changed files with 34 additions and 7 deletions
|
@ -847,7 +847,7 @@
|
|||
/* System-On-Chip Version Register (SVR) field extraction */
|
||||
|
||||
#define SVR_VER(svr) (((svr) >> 16) & 0xFFFF) /* Version field */
|
||||
#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revision field */
|
||||
#define SVR_REV(svr) (((svr) >> 0) & 0xFF) /* Revision field */
|
||||
|
||||
#define SVR_CID(svr) (((svr) >> 28) & 0x0F) /* Company or manufacturer ID */
|
||||
#define SVR_SOCOP(svr) (((svr) >> 22) & 0x3F) /* SOC integration options */
|
||||
|
@ -1043,9 +1043,6 @@
|
|||
|
||||
/* System Version Register (SVR) field extraction */
|
||||
|
||||
#define SVR_VER(svr) (((svr) >> 16) & 0xFFFF) /* Version field */
|
||||
#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revison field */
|
||||
|
||||
#define SVR_SUBVER(svr) (((svr) >> 8) & 0xFF) /* Process/MFG sub-version */
|
||||
|
||||
#define SVR_FAM(svr) (((svr) >> 20) & 0xFFF) /* Family field */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue