From 2d3b5df8530cd5ef883750378838dea7c40259af Mon Sep 17 00:00:00 2001 From: Ye Li Date: Wed, 16 Mar 2016 13:50:54 +0800 Subject: 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 (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e) --- arch/arm/cpu/armv7/mx6/bee.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'arch/arm') 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 #include #include +#include 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)) { -- cgit v1.1