From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 01 Aug 2013 10:21:35 +0200 Subject: [U-Boot] [PATCH v2 2/2] fsl_i2c: add workaround for the erratum I2C A004447 In-Reply-To: <1375344455-28947-2-git-send-email-Chunhe.Lan@freescale.com> References: <1375344455-28947-1-git-send-email-Chunhe.Lan@freescale.com> <1375344455-28947-2-git-send-email-Chunhe.Lan@freescale.com> Message-ID: <51FA1A8F.1070600@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Chunhe Am 01.08.2013 10:07, schrieb Chunhe Lan: > 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 > Signed-off-by: Chunhe Lan > Cc: Scott Wood > --- > arch/powerpc/cpu/mpc85xx/cmd_errata.c | 5 +++++ > arch/powerpc/include/asm/config_mpc85xx.h | 16 ++++++++++++++++ > arch/powerpc/include/asm/fsl_i2c.h | 1 + > arch/powerpc/include/asm/processor.h | 5 +---- > drivers/i2c/fsl_i2c.c | 14 +++++++++++--- > 5 files changed, 34 insertions(+), 7 deletions(-) As this is a v2 patch, it would be nice if you add here a description, what exactly you changed against the v1 version bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany