diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-02 11:13:51 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2016-03-04 15:35:57 +0800 |
commit | 0980df53fb5ba44e84f7b2d9cb95b806242e144c (patch) | |
tree | 9653c4355ab1d59c53cba120c216a48aa0743fca /drivers/spi | |
parent | c90fde3679d3022fb12b3f24ada19240349592eb (diff) |
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/spi')
-rw-r--r-- | drivers/spi/fsl_qspi.c | 8 | ||||
-rw-r--r-- | drivers/spi/mxc_spi.c | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index bb5c236..e3777d8 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -13,6 +13,7 @@ #include <spi.h> #include <asm/io.h> +#include <asm/arch/sys_proto.h> #define QUADSPI_AHBMAP_BANK_MAXSIZE SZ_64M @@ -544,6 +545,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, struct fsl_qspi *q; int ret; +#ifdef CONFIG_MX6 + if (mx6_qspi_fused(CONFIG_QSPI_BASE)) { + printf("QSPI@0x%x is fused, disable it\n", CONFIG_QSPI_BASE); + return NULL; + } +#endif + if (bus > 1) { puts("FSL_QSPI: Not a valid bus !\n"); return NULL; diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 0881599..c061145 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -13,6 +13,7 @@ #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> #include <asm/imx-common/spi.h> +#include <asm/arch/sys_proto.h> #ifdef CONFIG_MX27 /* i.MX27 has a completely wrong register layout and register definitions in the @@ -413,6 +414,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, return NULL; } + if (mx6_ecspi_fused(spi_bases[bus])){ + printf("ECSPI@0x%lx is fused, disable it\n", spi_bases[bus]); + return NULL; + } + mxcs = spi_alloc_slave(struct mxc_spi_slave, bus, cs); if (!mxcs) { puts("mxc_spi: SPI Slave not allocated !\n"); |