[U-Boot] [PATCH 1/5] imx: mx6: export the set_ldo_voltage function
Tim Harvey
tharvey at gateworks.com
Fri Jun 17 15:01:49 CEST 2016
Allow the set_ldo_voltage function to be called by board support files
to configure the IMX6 internal LDO's.
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
arch/arm/cpu/armv7/mx6/soc.c | 8 +-------
arch/arm/include/asm/arch-mx6/sys_proto.h | 9 +++++++++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 88fcfdc..2b6cc47 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -23,12 +23,6 @@
#include <imx_thermal.h>
#include <mmc.h>
-enum ldo_reg {
- LDO_ARM,
- LDO_SOC,
- LDO_PU,
-};
-
struct scu_regs {
u32 ctrl;
u32 config;
@@ -228,7 +222,7 @@ static void clear_ldo_ramp(void)
* Possible values are from 0.725V to 1.450V in steps of
* 0.025V (25mV).
*/
-static int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
{
struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
u32 val, step, old, reg = readl(&anatop->reg_core);
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 16c9b76..a94c3a1 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -6,3 +6,12 @@
*/
#include <asm/imx-common/sys_proto.h>
+
+/* internal anatop LDO regulators */
+enum ldo_reg {
+ LDO_ARM,
+ LDO_SOC,
+ LDO_PU,
+};
+/* set internal anatop LDO regulator */
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv);
--
1.9.1
More information about the U-Boot
mailing list