[U-Boot] [PATCH 5/6] rockchip: evb-rk3328: enable boot on regulator

Kever Yang kever.yang at rock-chips.com
Wed May 17 03:44:47 UTC 2017


Enable all the boot-on regulator in default.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 board/rockchip/evb_rk3328/evb-rk3328.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c
index d9dc782..eb15cee 100644
--- a/board/rockchip/evb_rk3328/evb-rk3328.c
+++ b/board/rockchip/evb_rk3328/evb-rk3328.c
@@ -10,12 +10,14 @@
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <dwc3-uboot.h>
+#include <power/regulator.h>
 #include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
+	int ret;
 #define GRF_BASE	0xff100000
 	struct rk3328_grf_regs * const grf = (void *)GRF_BASE;
 
@@ -25,7 +27,11 @@ int board_init(void)
 		     IOMUX_SEL_UART2_M1 << IOMUX_SEL_UART2_SHIFT |
 		     IOMUX_SEL_SDMMC_M1 << IOMUX_SEL_SDMMC_SHIFT);
 
-	return 0;
+	ret = regulators_enable_boot_on(false);
+	if (ret)
+		debug("%s: Cannot enable boot on regulator\n", __func__);
+
+	return ret;
 }
 
 int dram_init(void)
-- 
1.9.1



More information about the U-Boot mailing list