omap_hsmmc: Board-specific TWL4030 MMC power initializations
authorPaul Kocialkowski <contact@paulk.fr>
Sat, 8 Nov 2014 19:55:47 +0000 (20:55 +0100)
committerTom Rini <trini@ti.com>
Fri, 5 Dec 2014 02:28:15 +0000 (21:28 -0500)
Boards using the TWL4030 regulator may not all use the LDOs the same way
(e.g. MMC2 power can be controlled by another LDO than VMMC2).
This delegates TWL4030 MMC power initializations to board-specific functions,
that may still call twl4030_power_mmc_init for the default behavior.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
[trini: Fix omap3_evm warning, add twl4030.h]
Signed-off-by: Tom Rini <trini@ti.com>
16 files changed:
board/comelit/dig297/dig297.c
board/compulab/cm_t35/cm_t35.c
board/corscience/tricorder/tricorder.c
board/isee/igep00x0/igep00x0.c
board/logicpd/omap3som/omap3logic.c
board/logicpd/zoom1/zoom1.c
board/matrix_vision/mvblx/mvblx.c
board/nokia/rx51/rx51.c
board/overo/overo.c
board/pandora/pandora.c
board/technexion/tao3530/tao3530.c
board/ti/beagle/beagle.c
board/ti/evm/evm.c
board/ti/sdp3430/sdp.c
board/timll/devkit8000/devkit8000.c
drivers/mmc/omap_hsmmc.c

index 2b826dffc5598d491efab6d7b2ce5fb9555d8462..9d4c41b00b34b524471b18c7c59d62a59e2d8b50 100644 (file)
@@ -133,6 +133,11 @@ int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
 #endif
 
 #ifdef CONFIG_CMD_NET
index 886c7239005a9dc323c67fe6c9fef5be2879c563..43463d5b4701cf0220049e3f82e34f47d40e608e 100644 (file)
@@ -382,6 +382,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #ifdef CONFIG_SYS_I2C_OMAP34XX
 /*
  * Routine: reset_net_chip
index 9e81bf3f3f94f645ac70563ad2c7563744b9d2b7..0fddf4551e7c64329bae1a45f38a9eb0f8c0e31e 100644 (file)
@@ -147,6 +147,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 /*
  * Routine: get_board_mem_timings
  * Description: If we use SPL then there is no x-loader nor config header
index 7b87cc27c41b4e517753342202f240e7ff5668b4..47522f8013e219f66b0d5e2021b24cd6cf656d43 100644 (file)
@@ -150,6 +150,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 void set_fdt(void)
 {
        switch (gd->bd->bi_arch_number) {
index 1fd9f2cf01cd612dbee9036e463998e24119fa54..609edf1e5c9a9386edcc9eb7b132a0e6fd600c42 100644 (file)
@@ -128,6 +128,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #ifdef CONFIG_SMC911X
 /* GPMC CS1 settings for Logic SOM LV/Torpedo LAN92xx Ethernet chip */
 static const u32 gpmc_lan92xx_config[] = {
index 9ef002637a665f7e405e5873bddee8f640da49af..d39203a9176e825fc956cf029be6f4b24bbd401a 100644 (file)
@@ -109,6 +109,11 @@ int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
 #endif
 
 #ifdef CONFIG_CMD_NET
index a69359fa1d954a54f50fe0fb66d14f0313f10c15..c9d615b79a201872f66a55df5eed0b2bbcad5f66 100644 (file)
@@ -94,6 +94,12 @@ int board_mmc_init(bd_t *bis)
        omap_mmc_init(1, 0, 0, -1, -1);
        return 0;
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+       twl4030_power_mmc_init(1);
+}
 #endif
 
 #if defined(CONFIG_CMD_NET)
index c2e07dbd9b5c6e2f90ec40e46f194b42df1a4af0..b6b8ad6c482d6a617ddfd22c7cbc7eaf4989aef6 100644 (file)
@@ -659,3 +659,9 @@ int board_mmc_init(bd_t *bis)
        omap_mmc_init(1, 0, 0, -1, -1);
        return 0;
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+       twl4030_power_mmc_init(1);
+}
index dfb8602bafccb8d8c912c58c7d946c06effee2c0..b7f85e711b46fed4bed4b35774599d929d382c7a 100644 (file)
@@ -493,6 +493,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #if defined(CONFIG_USB_EHCI) &&  !defined(CONFIG_SPL_BUILD)
 static struct omap_usbhs_board_data usbhs_bdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
index 146dcea4e15f821b45f294897f37a14f055aa582..59b5a7e2cd01c34afe4524ef4d8e31f4c1f49f68 100644 (file)
@@ -126,4 +126,9 @@ int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
 #endif
index 44a82406aa985ac500691c2ed75d473545bd611a..744ff44008316af6af39e597d26b6a4033d3d724 100644 (file)
@@ -188,6 +188,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
 /* Call usb_stop() before starting the kernel */
 void show_boot_progress(int val)
index 4c5e38136fd55c542c52379285d0e42237e2cda2..7b37fbe299e58bb9aa9f3552f49e42d06b75d8c9 100644 (file)
@@ -534,6 +534,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
 /* Call usb_stop() before starting the kernel */
 void show_boot_progress(int val)
index 81dd081d76a98b6f864037367abf05cc12e934d4..3f93d9cbe26bb0d00c922b80ed3728c0b3dcabd0 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/gpio.h>
 #include <i2c.h>
+#include <twl4030.h>
 #include <asm/mach-types.h>
 #include <linux/mtd/nand.h>
 #include "evm.h"
@@ -264,3 +265,10 @@ int board_mmc_init(bd_t *bis)
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
+
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
index 957940d53fe9789ed6c237f200a71a2124530802..7171363e764cfd5954e711d8c7ce5e61050a68e8 100644 (file)
@@ -195,4 +195,9 @@ int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);
 }
+
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
 #endif
index bcbee73d5d540f98660fdd3a1485bc88cb02135f..b97804413101f54c64a8009607eaa00b8b629231 100644 (file)
@@ -124,6 +124,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #if defined(CONFIG_DRIVER_DM9000) & !defined(CONFIG_SPL_BUILD)
 /*
  * Routine: board_eth_init
index 3303eafa85ad30ff710d3c7adb24ac4344c49241..c880cedb0addce6761aa67797bf19ed785a93031 100644 (file)
@@ -135,12 +135,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
        pbias_lite = readl(&t2_base->pbias_lite);
        pbias_lite &= ~(PBIASLITEPWRDNZ1 | PBIASLITEPWRDNZ0);
        writel(pbias_lite, &t2_base->pbias_lite);
-#endif
-#if defined(CONFIG_TWL4030_POWER)
-       twl4030_power_mmc_init(0);
-       twl4030_power_mmc_init(1);
-#endif
-#if defined(CONFIG_OMAP34XX)
+
        writel(pbias_lite | PBIASLITEPWRDNZ1 |
                PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
                &t2_base->pbias_lite);