diff options
Diffstat (limited to 'arch/arm/cpu/armv7/mx6/bee.c')
-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)) { |