]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-omap2/omap4/hwinit.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / mach-omap2 / omap4 / hwinit.c
index 7c6638ca80dc30ac72cd743d9d80344c4d561808..27dfa9142dcd7be5091ea3ca772e2f00ce84dbe6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  *
  * Common functions for OMAP4 based boards
@@ -8,10 +9,9 @@
  * Author :
  *     Aneesh V        <aneesh@ti.com>
  *     Steve Sakoman   <steve@sakoman.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <palmas.h>
 #include <asm/armv7.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/sys_proto.h>
@@ -20,8 +20,6 @@
 #include <asm/arch/gpio.h>
 #include <asm/omap_common.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
 
 static const struct gpio_bank gpio_bank_44xx[6] = {
@@ -175,3 +173,15 @@ void v7_outer_cache_disable(void)
        omap_smc1(OMAP4_SERVICE_PL310_CONTROL_REG_SET, 0);
 }
 #endif /* !CONFIG_SYS_L2CACHE_OFF */
+
+void vmmc_pbias_config(uint voltage)
+{
+       u32 value = 0;
+
+       value = readl((*ctrl)->control_pbiaslite);
+       value &= ~(MMC1_PBIASLITE_PWRDNZ | MMC1_PWRDNZ);
+       writel(value, (*ctrl)->control_pbiaslite);
+       value = readl((*ctrl)->control_pbiaslite);
+       value |= MMC1_PBIASLITE_VMODE | MMC1_PBIASLITE_PWRDNZ | MMC1_PWRDNZ;
+       writel(value, (*ctrl)->control_pbiaslite);
+}