mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
omap_hsmmc: Board-specific TWL4030 MMC power initializations
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>
This commit is contained in:
parent
f3e85e4825
commit
aac5450ea9
16 changed files with 97 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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[] = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue