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/spi/mxc_spi.c | |
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/spi/mxc_spi.c')
-rw-r--r-- | drivers/spi/mxc_spi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 0881599..3112d92 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -1,6 +1,8 @@ /* * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> * + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * * SPDX-License-Identifier: GPL-2.0+ */ @@ -13,6 +15,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 +416,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, return NULL; } +#ifdef CONFIG_MX6 + if (mx6_ecspi_fused(spi_bases[bus])) { + printf("ECSPI@0x%lx is fused, disable it\n", spi_bases[bus]); + return NULL; + } +#endif + mxcs = spi_alloc_slave(struct mxc_spi_slave, bus, cs); if (!mxcs) { puts("mxc_spi: SPI Slave not allocated !\n"); |