/*
- * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <command.h>
#include <fuse.h>
+#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
static int do_bee_init(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
- u32 start, size, val;
+ u32 start, size;
int ret;
struct bee_parameters *p = ¶
if (argc > 5)
return CMD_RET_USAGE;
- if (fuse_read(0, 4, &val)) {
- puts("Can not get fuse bank 0, word 4\n");
- } else {
- if (val & (1 << 25)) {
- puts("BEE disabed in fuse!\n");
- return CMD_RET_FAILURE;
- }
+#ifdef CONFIG_MX6
+ if (check_module_fused(MX6_MODULE_BEE)) {
+ printf("BEE is fused, disable it!\n");
+ return CMD_RET_FAILURE;
}
+#endif
/* Cache enabled? */
if ((get_cr() & (CR_I | CR_C)) != (CR_I | CR_C)) {
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
* (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>
#include <dm.h>
#include <dm/pinctrl.h>
#include <fdtdec.h>
+#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
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
if (addr == FDT_ADDR_T_NONE)
return -ENODEV;
+#ifdef CONFIG_MX6
+ if (mx6_i2c_fused(addr)) {
+ printf("I2C@0x%lx is fused, disable it\n", addr);
+ return -ENODEV;
+ }
+#endif
+
i2c_bus->base = addr;
i2c_bus->index = bus->seq;
i2c_bus->bus = bus;
#include <dm.h>
#include <asm-generic/gpio.h>
#include <power/regulator.h>
+#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
return ret;
}
+#ifdef CONFIG_MX6
+ if (mx6_esdhc_fused(cfg->esdhc_base)) {
+ printf("ESDHC@0x%lx is fused, disable it\n", cfg->esdhc_base);
+ free(priv);
+ return -ENODEV;
+ }
+#endif
+
ret = fsl_esdhc_init(priv);
if (ret) {
debug("%s init failure\n", __func__);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
+#ifdef CONFIG_MX6
+ if (mx6_esdhc_fused(addr)) {
+ printf("ESDHC@0x%lx is fused, disable it\n", addr);
+ return -ENODEV;
+ }
+#endif
+
priv->esdhc_regs = (struct fsl_esdhc *)addr;
priv->dev = dev;
(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) {
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/imx-common/sys_proto.h>
+#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
#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.
uint32_t start;
int ret;
+#ifdef CONFIG_MX6
+ if (mx6_enet_fused((uint32_t)priv->eth)) {
+ printf("Ethernet@0x%x is fused, disable it\n", (uint32_t)priv->eth);
+ return -ENODEV;
+ }
+#endif
ret = fec_alloc_descs(priv);
if (ret)
return ret;
#include <errno.h>
#include <watchdog.h>
#include "fsl_qspi.h"
+#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
if (bus >= ARRAY_SIZE(spi_bases))
return NULL;
+#ifdef CONFIG_MX6
+ if (mx6_qspi_fused(spi_bases[bus])) {
+ printf("QSPI@0x%lx is fused, disable it\n", spi_bases[bus]);
+ return NULL;
+ }
+#endif
+
if (cs >= FSL_QSPI_FLASH_NUM)
return NULL;
struct dm_spi_bus *dm_spi_bus;
int i;
+#ifdef CONFIG_MX6
+ if (mx6_qspi_fused(plat->reg_base)) {
+ printf("QSPI@0x%lx is fused, disable it\n", plat->reg_base);
+ return -ENODEV;
+ }
+#endif
+
dm_spi_bus = bus->uclass_priv;
dm_spi_bus->max_hz = plat->speed_hz;
/*
* Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
#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
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");
#include <asm/imx-common/sys_proto.h>
#include <dm.h>
#include <power/regulator.h>
+#include <asm/arch/sys_proto.h>
#include "ehci.h"
if (index > 3)
return -EINVAL;
+#if defined(CONFIG_MX6)
+ if (mx6_usb_fused((u32)ehci)) {
+ printf("USB@0x%x is fused, disable it\n", (u32)ehci);
+ return -ENODEV;
+ }
+#endif
+
ret = ehci_mx6_common_init(ehci, index);
if (ret)
return ret;
struct ehci_hcor *hcor;
int ret;
+#if defined(CONFIG_MX6)
+ if (mx6_usb_fused((u32)ehci)) {
+ printf("USB@0x%x is fused, disable it\n", (u32)ehci);
+ return -ENODEV;
+ }
+#endif
+
priv->ehci = ehci;
priv->portnr = dev->seq;
priv->init_type = type;
/*
- * 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+
*/
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;
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
if (!panel.frameAdrs)
return;
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);