diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/apbh_dma.c | 8 | ||||
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 11 | ||||
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/mxs_nand.c | 7 | ||||
-rw-r--r-- | drivers/net/fec_mxc.c | 8 | ||||
-rw-r--r-- | drivers/spi/fsl_qspi.c | 8 | ||||
-rw-r--r-- | drivers/spi/mxc_spi.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ehci-mx6.c | 10 | ||||
-rw-r--r-- | drivers/video/mxc_gis.c | 16 | ||||
-rw-r--r-- | drivers/video/mxsfb.c | 10 |
10 files changed, 95 insertions, 1 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index 25e8b4a..5e72f4e 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -574,6 +574,14 @@ void mxs_dma_init(void) struct mxs_apbh_regs *apbh_regs = (struct mxs_apbh_regs *)MXS_APBH_BASE; +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_APBHDMA)) { + printf("NAND APBH-DMA@0x%x is fused, disable it\n", + MXS_APBH_BASE); + return; + } +#endif + mxs_reset_block(&apbh_regs->hw_apbh_ctrl0_reg); #ifdef CONFIG_APBH_DMA_BURST8 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 diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index b2f0dac..d41a8a7 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -20,6 +20,7 @@ #include <fsl_esdhc.h> #include <fdt_support.h> #include <asm/io.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -694,6 +695,13 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) regs = (struct fsl_esdhc *)cfg->esdhc_base; +#ifdef CONFIG_MX6 + if (mx6_esdhc_fused(cfg->esdhc_base)) { + printf("ESDHC@0x%x is fused, disable it\n", cfg->esdhc_base); + return -2; + } +#endif + /* First reset the eSDHC controller */ esdhc_reset(regs); diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c index b208435..871f5ab 100644 --- a/drivers/mtd/nand/mxs_nand.c +++ b/drivers/mtd/nand/mxs_nand.c @@ -1172,6 +1172,13 @@ int mxs_nand_init(struct mxs_nand_info *info) (struct mxs_bch_regs *)MXS_BCH_BASE; int i = 0, j, ret = 0; +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_GPMI)) { + printf("NAND GPMI@0x%x is fused, disable it\n", MXS_GPMI_BASE); + return -EPERM; + } +#endif + info->desc = malloc(sizeof(struct mxs_dma_desc *) * MXS_NAND_DMA_DESCRIPTOR_COUNT); if (!info->desc) { diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 765ac7a..778243a 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -23,6 +23,7 @@ #include <asm/io.h> #include <asm/errno.h> #include <linux/compiler.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -1094,6 +1095,13 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr) #endif int ret; +#ifdef CONFIG_MX6 + if (mx6_enet_fused(addr)) { + printf("Ethernet@0x%x is fused, disable it\n", addr); + return -2; + } +#endif + #ifdef CONFIG_MX28 /* * The i.MX28 has two ethernet interfaces, but they are not equal. diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index a214d34..1e15bb5 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..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"); diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index d491d45..ee75930 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -15,6 +15,7 @@ #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/arch/sys_proto.h> #include "ehci.h" @@ -314,6 +315,15 @@ int ehci_hcd_init(int index, enum usb_init_type init, if (index > 3) return -EINVAL; + +#if defined(CONFIG_MX6) + if (mx6_usb_fused(USB_BASE_ADDR + (0x200 * index))) { + printf("USB@0x%x is fused, disable it\n", + USB_BASE_ADDR + (0x200 * index)); + return -2; + } +#endif + enable_usboh3_clk(1); mdelay(1); diff --git a/drivers/video/mxc_gis.c b/drivers/video/mxc_gis.c index 01befb3..d12d1c1 100644 --- a/drivers/video/mxc_gis.c +++ b/drivers/video/mxc_gis.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. All Rights Reserved. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -301,6 +301,20 @@ void mxc_enable_gis(void) u32 csimemsize, pxpmemsize; char const *gis_input = getenv("gis"); +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_CSI)) { + printf("CSI@0x%x is fused, disable it\n", CSI1_BASE_ADDR); + return; + } +#endif + +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_PXP)) { + printf("PXP@0x%x is fused, disable it\n", PXP_BASE_ADDR); + return; + } +#endif + gis_regs = (struct mxs_gis_regs *)GIS_BASE_ADDR; pxp_regs = (struct mxs_pxp_regs *)PXP_BASE_ADDR; csi_regs = (struct mxs_csi_regs *)CSI1_BASE_ADDR; diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index d70c986..0ddb7b8 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -171,6 +171,10 @@ void lcdif_power_down(void) struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(panel.isaBase); int timeout = 1000000; +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_LCDIF)) + return; +#endif writel(panel.frameAdrs, ®s->hw_lcdif_cur_buf_reg); writel(panel.frameAdrs, ®s->hw_lcdif_next_buf_reg); writel(LCDIF_CTRL1_VSYNC_EDGE_IRQ, ®s->hw_lcdif_ctrl1_clr); @@ -218,6 +222,12 @@ void *video_hw_init(void) bpp = depth; } +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_LCDIF)) { + printf("LCDIF@0x%x is fused, disable it\n", MXS_LCDIF_BASE); + return NULL; + } +#endif /* fill in Graphic device struct */ sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp); |