From 952524c736c5831ee7faa8351b6ed4f6f44b73ba Mon Sep 17 00:00:00 2001 From: Ye Li Date: Wed, 2 Mar 2016 11:13:51 +0800 Subject: 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 (cherry picked from commit 61789a160ae023ba6f7d37da74be957d22505736) --- drivers/i2c/mxc_i2c.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/i2c') diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 7bc6d07..b77caac 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -21,6 +21,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -525,6 +526,15 @@ void bus_i2c_init(void *base, int speed, int unused, struct i2c_parms *p = srdata->i2c_data; if (!base) return; + +#ifdef CONFIG_MX6 + if (mx6_i2c_fused((u32)base)) { + printf("I2C@0x%x is fused, disable it\n", + (u32)base); + return; + } +#endif + for (;;) { if (!p->base || (p->base == base)) { p->base = base; -- cgit v1.1