diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-16 13:50:54 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2016-03-25 16:28:20 +0800 |
commit | 1704e116f9b39aeb99201919a18bc2b1e19a980e (patch) | |
tree | 09a871f7d14c6ab3d6b5e73dbf0dc2f63180ab55 /drivers/i2c | |
parent | 7236051526b73a5a25cc8330a79f5c08b7d70726 (diff) | |
download | u-boot-imx-1704e116f9b39aeb99201919a18bc2b1e19a980e.zip u-boot-imx-1704e116f9b39aeb99201919a18bc2b1e19a980e.tar.gz u-boot-imx-1704e116f9b39aeb99201919a18bc2b1e19a980e.tar.bz2 |
MLK-12483-4 mx6: Modify drivers to disable fused modules
Add the fuse checking in drivers, when the module is disabled in fuse,
the driver will not work.
Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
USB-EHCI, GIS, LCDIF.
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index b2d15c9..3127c85 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -4,6 +4,8 @@ * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> * (c) 2011 Marek Vasut <marek.vasut@gmail.com> * + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * * Based on i2c-imx.c from linux kernel: * Copyright (C) 2005 Torsten Koschorrek <koschorrek at synertronixx.de> * Copyright (C) 2005 Matthias Blaschke <blaschke at synertronixx.de> @@ -24,6 +26,7 @@ #include <watchdog.h> #include <dm.h> #include <fdtdec.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -581,6 +584,14 @@ void bus_i2c_init(int index, int speed, int unused, return; } +#ifdef CONFIG_MX6 + if (mx6_i2c_fused((u32)mxc_i2c_buses[index].base)) { + printf("I2C@0x%x is fused, disable it\n", + (u32)mxc_i2c_buses[index].base); + return; + } +#endif + /* * Warning: Be careful to allow the assignment to a static * variable here. This function could be called while U-Boot is |