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");
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_BEE)) {
+ printf("BEE is fused, disable it!\n");
return CMD_RET_FAILURE;
}
}
struct mxs_apbh_regs *apbh_regs =
(struct mxs_apbh_regs *)MXS_APBH_BASE;
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_APBHDMA)) {
+ printf("NAND APBH-DMA@0x%x is fused, disable it\n",
+ MXS_APBH_BASE);
+ return;
+ }
+ }
+
mxs_reset_block(&apbh_regs->hw_apbh_ctrl0_reg);
#ifdef CONFIG_APBH_DMA_BURST8
#include <mapmem.h>
#include <dm/ofnode.h>
#include <linux/iopoll.h>
+#if CONFIG_IS_ENABLED(IMX_MODULE_FUSE)
+#include <asm/mach-imx/sys_proto.h>
+#endif
#if !CONFIG_IS_ENABLED(BLK)
#include "mmc_private.h"
if (!cfg)
return -EINVAL;
+#if CONFIG_IS_ENABLED(IMX_MODULE_FUSE)
+ if (esdhc_fused(cfg->esdhc_base)) {
+ printf("ESDHC@0x%lx is fused, disable it\n", cfg->esdhc_base);
+ return -ENODEV;
+ }
+#endif
+
priv = calloc(sizeof(struct fsl_esdhc_priv), 1);
if (!priv)
return -ENOMEM;
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
+
+#if CONFIG_IS_ENABLED(IMX_MODULE_FUSE)
+ if (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;
priv->mode = -1;
{
int i = 0, j, ret = 0;
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_GPMI)) {
+ printf("NAND GPMI@0x%lx is fused, disable it\n", (ulong)info->gpmi_regs);
+ return -EPERM;
+ }
+ }
+
info->desc = malloc(sizeof(struct mxs_dma_desc *) *
MXS_NAND_DMA_DESCRIPTOR_COUNT);
if (!info->desc) {
#include <linux/sizes.h>
#include <linux/err.h>
#include <asm/io.h>
+#if CONFIG_IS_ENABLED(IMX_MODULE_FUSE)
+#include <asm/mach-imx/sys_proto.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
q->iobase = map_physmem(res.start, res.end - res.start, MAP_NOCACHE);
+#if CONFIG_IS_ENABLED(IMX_MODULE_FUSE)
+ if (qspi_fused((ulong)(q->iobase))) {
+ printf("QSPI@0x%lx is fused, disable it\n", (ulong)(q->iobase));
+ return -ENODEV;
+ }
+#endif
+
ret = fdt_get_named_resource(blob, node, "reg", "reg-names",
"QuadSPI-memory", &res);
if (ret) {
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
*/
#include <common.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/mach-imx/spi.h>
+#include <asm/mach-imx/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
return NULL;
}
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (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");
#include <asm/cache.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <asm/mach-imx/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
void lcd_enable(void)
{
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_EPDC)) {
+ return;
+ }
+ }
+
if (board_setup_logo_file(lcd_base)) {
debug("Load logo failed!\n");
return;
void lcd_disable(void)
{
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_EPDC)) {
+ return;
+ }
+ }
+
debug("lcd_disable\n");
/* Disable clocks to EPDC */
{
unsigned int val;
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_EPDC)) {
+ printf("EPDC@0x%x is fused, disable it\n", EPDC_BASE_ADDR);
+ return;
+ }
+ }
+
/*
* We rely on lcdbase being a physical address, i.e., either MMU off,
* or 1-to-1 mapping. Might want to add some virt2phys here.
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. All Rights Reserved.
*
*/
u32 csimemsize, pxpmemsize;
char const *gis_input = env_get("gis");
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_CSI)) {
+ printf("CSI@0x%x is fused, disable it\n", CSI1_BASE_ADDR);
+ return;
+ }
+ }
+
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_PXP)) {
+ printf("PXP@0x%x is fused, disable it\n", PXP_BASE_ADDR);
+ return;
+ }
+ }
+
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 *)(reg_base);
int timeout = 1000000;
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_LCDIF))
+ return -ENODEV;
+ }
+
if (!fb)
return -EINVAL;
bpp = depth;
}
+ if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
+ if (check_module_fused(MODULE_LCDIF)) {
+ printf("LCDIF@0x%x is fused, disable it\n", MXS_LCDIF_BASE);
+ return NULL;
+ }
+ }
/* fill in Graphic device struct */
sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp);