diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-09-10 14:40:01 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-03-14 21:27:09 +0800 |
commit | f6eebed89c03243d78723b94d16ebffebc300516 (patch) | |
tree | ca36b22617c3586e0f18852d51e6d693cfbdbd5c /arch/arm/cpu/armv7 | |
parent | e2b204b371a24c5e04f4e9accb17c654a0f7045b (diff) | |
download | u-boot-imx-f6eebed89c03243d78723b94d16ebffebc300516.zip u-boot-imx-f6eebed89c03243d78723b94d16ebffebc300516.tar.gz u-boot-imx-f6eebed89c03243d78723b94d16ebffebc300516.tar.bz2 |
MLK-11528 imx: mx6ul check fuse before init bee
Need to check fuse bit 25 of bank 0 word 4 before initialize bee.
The bit: 0 means bee enabled, 1 means bee disabled.
If disabled, continuing initialize bee will cause system hang, so
need to check this bit before initialize bee.
Add macro to enable BEE in header file, default disabled.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit ef4cb7c53418e4e1dd7cfcb7c6974cfea77ef3c0)
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/bee.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx6/bee.c b/arch/arm/cpu/armv7/mx6/bee.c index a4bd76d..ccdeb28 100644 --- a/arch/arm/cpu/armv7/mx6/bee.c +++ b/arch/arm/cpu/armv7/mx6/bee.c @@ -10,6 +10,7 @@ #include <asm/system.h> #include <common.h> #include <command.h> +#include <fuse.h> DECLARE_GLOBAL_DATA_PTR; @@ -265,7 +266,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; + u32 start, size, val; int ret; struct bee_parameters *p = ¶ @@ -278,6 +279,15 @@ 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; + } + } + /* Cache enabled? */ if ((get_cr() & (CR_I | CR_C)) != (CR_I | CR_C)) { /* |