summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2013-09-06 15:16:02 +0800
committerRobin Gong <b38343@freescale.com>2013-09-06 17:40:13 +0800
commit66205233ec70baab0709c6f45b6172c75ad8768c (patch)
tree43e8dbebc6d232b505841535ee5dd64ee4b5af85
parent063ebda76f662b33714a21f60e77139871d53cfa (diff)
downloadu-boot-imx-66205233ec70baab0709c6f45b6172c75ad8768c.zip
u-boot-imx-66205233ec70baab0709c6f45b6172c75ad8768c.tar.gz
u-boot-imx-66205233ec70baab0709c6f45b6172c75ad8768c.tar.bz2
ENGR00278511: ARM: mx6: get fdt_blob from images instead of 'fdt_addr' param
--Get fdt_blob from images.ft_addr which set by boot command instead of 'fdt_addr' param, so that we can use any other name as fdt load address. --If find it's not ldo-enable dts on 1.2G chip, will report the error log and reset board to correct the dtb file. Signed-off-by: Robin Gong <b38343@freescale.com>
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 930e96d..61f586c 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -449,14 +449,15 @@ void s_init(void)
#ifdef CONFIG_LDO_BYPASS_CHECK
DECLARE_GLOBAL_DATA_PTR;
+static int ldo_bypass;
+
int check_ldo_bypass(void)
{
const int *ldo_mode;
int node;
/* get the right fdt_addr */
- gd->fdt_blob = (void *)getenv_ulong("fdt_addr", 16,
- (uintptr_t)gd->fdt_blob);
+ gd->fdt_blob = images.ft_addr;
/* Get the node from FDT for anatop ldo-bypass */
node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
"fsl,imx6q-gpc");
@@ -469,7 +470,9 @@ int check_ldo_bypass(void)
* return 1 if "fsl,ldo-bypass = <1>", else return 0 if
* "fsl,ldo-bypass = <0>" or no "fsl,ldo-bypass" property
*/
- return fdt32_to_cpu(*ldo_mode) == 1 ? 1 : 0;
+ ldo_bypass = fdt32_to_cpu(*ldo_mode) == 1 ? 1 : 0;
+
+ return ldo_bypass;
}
int check_1_2G(void)
@@ -483,7 +486,19 @@ int check_1_2G(void)
reg = readl(&fuse_bank0->cfg3);
if ((reg >> 16) & 0x3 == 0x3) {
- printf("Please use ldo-enable dts!\n");
+ if (ldo_bypass) {
+ printf("ERR:Wrong dtb file used! i.MX6Q@1.2Ghz only"
+ "works with ldo-enable mode!\n");
+ /*
+ * Currently, only imx6q-sabresd board might be here,
+ * since only i.MX6Q support 1.2G and only Sabresd board
+ * support ldo-bypass mode. So hardcode here.
+ * You can also modify your board(i.MX6Q) dtb name if it
+ * supports both ldo-bypass and ldo-enable mode.
+ */
+ printf("Please use imx6q-sabresd-ldo.dtb!\n");
+ do_reset(NULL, 0, 0, NULL);
+ }
result = 1;
}