diff options
author | Robin Gong <b38343@freescale.com> | 2013-09-04 15:21:03 +0800 |
---|---|---|
committer | Robin Gong <b38343@freescale.com> | 2013-09-04 17:12:49 +0800 |
commit | 6e4b8b983660eb0560e56f8b6a72c99f7080b182 (patch) | |
tree | de772e10f03f0587ec29f42d21fffcfa5869e9e4 | |
parent | 52554e3857685a168d4fbc3db11eb88e01212e0e (diff) | |
download | u-boot-imx-6e4b8b983660eb0560e56f8b6a72c99f7080b182.zip u-boot-imx-6e4b8b983660eb0560e56f8b6a72c99f7080b182.tar.gz u-boot-imx-6e4b8b983660eb0560e56f8b6a72c99f7080b182.tar.bz2 |
ENGR00277895-2 ARM: mx6: check the property setting of "fsl,ldo-bypass"
Check the right property setting of "fsl,ldo-bypass" in dts to know what ldo
mode we need use(ldo-bypass or ldo-enable). Before only check the presence of
"fsl,ldo-bypass", now change to check whether "fsl,ldo-bypass = <1>" in dts.
If yes, switch to ldo-bypass mode. If "fsl,ldo-bypass = <0>" or no "fsl,
ldo-bypass" property, u-boot keep in ldo-enable mode.
Signed-off-by: Robin Gong <b38343@freescale.com>
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index e3f4377..930e96d 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -451,7 +451,7 @@ void s_init(void) DECLARE_GLOBAL_DATA_PTR; int check_ldo_bypass(void) { - int ret = 0; + const int *ldo_mode; int node; /* get the right fdt_addr */ @@ -461,11 +461,15 @@ int check_ldo_bypass(void) node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "fsl,imx6q-gpc"); if (node < 0) { - printf("gpc: No node for gpc in device tree,%d\n", node); - return ret; + printf("No gpc device node %d, force to ldo-enable.\n", node); + return 0; } - ret = fdt_getprop(gd->fdt_blob, node, "fsl,ldo-bypass", NULL); - return ret; + ldo_mode = fdt_getprop(gd->fdt_blob, node, "fsl,ldo-bypass", NULL); + /* + * 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; } int check_1_2G(void) |