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:23:44 +0800 |
commit | bd5d0327570716bc6b77e22814d515c0779acf8c (patch) | |
tree | de772e10f03f0587ec29f42d21fffcfa5869e9e4 | |
parent | 752f3b91bc60678d8b26707444bd8a470d60f15e (diff) | |
download | u-boot-imx-bd5d0327570716bc6b77e22814d515c0779acf8c.zip u-boot-imx-bd5d0327570716bc6b77e22814d515c0779acf8c.tar.gz u-boot-imx-bd5d0327570716bc6b77e22814d515c0779acf8c.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) |