diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-16 13:50:54 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-04-05 14:04:35 +0800 |
commit | 2d3b5df8530cd5ef883750378838dea7c40259af (patch) | |
tree | 346ff7728eddc05a01e58e4d6277a753c6b8acab /arch | |
parent | 8aef13ebd92f709f4e6b80cf46c7cfe0f69bb211 (diff) | |
download | u-boot-imx-2d3b5df8530cd5ef883750378838dea7c40259af.zip u-boot-imx-2d3b5df8530cd5ef883750378838dea7c40259af.tar.gz u-boot-imx-2d3b5df8530cd5ef883750378838dea7c40259af.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>
(cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e)
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/bee.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/mx6/bee.c b/arch/arm/cpu/armv7/mx6/bee.c index ccdeb28..84f6a5e2 100644 --- a/arch/arm/cpu/armv7/mx6/bee.c +++ b/arch/arm/cpu/armv7/mx6/bee.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -11,6 +11,7 @@ #include <common.h> #include <command.h> #include <fuse.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; @@ -266,7 +267,7 @@ static int region_valid(u32 start, u32 size) 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 = ¶ @@ -279,14 +280,12 @@ static int do_bee_init(cmd_tbl_t *cmdtp, int flag, int argc, 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)) { |