omap4: Adding hsmmc support to board file
Adding support for MMC1 & MMC2 controllers of OMAP4430 SDP to board file. Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
2c9d103e1e
commit
717c1fbf7c
|
@ -137,7 +137,8 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
|
||||||
hsmmc.o
|
hsmmc.o
|
||||||
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
|
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
|
||||||
hsmmc.o
|
hsmmc.o
|
||||||
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
|
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
|
||||||
|
hsmmc.o
|
||||||
|
|
||||||
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
|
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <plat/control.h>
|
#include <plat/control.h>
|
||||||
#include <plat/timer-gp.h>
|
#include <plat/timer-gp.h>
|
||||||
#include <plat/usb.h>
|
#include <plat/usb.h>
|
||||||
|
#include <plat/mmc.h>
|
||||||
|
#include "hsmmc.h"
|
||||||
|
|
||||||
#define ETH_KS8851_IRQ 34
|
#define ETH_KS8851_IRQ 34
|
||||||
#define ETH_KS8851_POWER_ON 48
|
#define ETH_KS8851_POWER_ON 48
|
||||||
|
@ -137,24 +139,66 @@ static struct omap_musb_board_data musb_board_data = {
|
||||||
.mode = MUSB_PERIPHERAL,
|
.mode = MUSB_PERIPHERAL,
|
||||||
.power = 100,
|
.power = 100,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct omap2_hsmmc_info mmc[] = {
|
||||||
|
{
|
||||||
|
.mmc = 1,
|
||||||
|
.wires = 8,
|
||||||
|
.gpio_wp = -EINVAL,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.mmc = 2,
|
||||||
|
.wires = 8,
|
||||||
|
.gpio_cd = -EINVAL,
|
||||||
|
.gpio_wp = -EINVAL,
|
||||||
|
.nonremovable = true,
|
||||||
|
},
|
||||||
|
{} /* Terminator */
|
||||||
|
};
|
||||||
|
|
||||||
static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
|
static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
|
||||||
{
|
{
|
||||||
.supply = "vmmc",
|
.supply = "vmmc",
|
||||||
|
.dev_name = "mmci-omap-hs.0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.supply = "vmmc",
|
.supply = "vmmc",
|
||||||
},
|
.dev_name = "mmci-omap-hs.1",
|
||||||
{
|
|
||||||
.supply = "vmmc",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.supply = "vmmc",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.supply = "vmmc",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
struct platform_device *pdev = container_of(dev,
|
||||||
|
struct platform_device, dev);
|
||||||
|
struct omap_mmc_platform_data *pdata = dev->platform_data;
|
||||||
|
|
||||||
|
/* Setting MMC1 Card detect Irq */
|
||||||
|
if (pdev->id == 0)
|
||||||
|
pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
|
||||||
|
MMCDETECT_INTR_OFFSET;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
|
||||||
|
{
|
||||||
|
struct omap_mmc_platform_data *pdata = dev->platform_data;
|
||||||
|
|
||||||
|
pdata->init = omap4_twl6030_hsmmc_late_init;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
||||||
|
{
|
||||||
|
struct omap2_hsmmc_info *c;
|
||||||
|
|
||||||
|
omap2_hsmmc_init(controllers);
|
||||||
|
for (c = controllers; c->mmc; c++)
|
||||||
|
omap4_twl6030_hsmmc_set_late_init(c->dev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static struct regulator_init_data sdp4430_vaux1 = {
|
static struct regulator_init_data sdp4430_vaux1 = {
|
||||||
.constraints = {
|
.constraints = {
|
||||||
.min_uV = 1000000,
|
.min_uV = 1000000,
|
||||||
|
@ -206,7 +250,7 @@ static struct regulator_init_data sdp4430_vmmc = {
|
||||||
| REGULATOR_CHANGE_MODE
|
| REGULATOR_CHANGE_MODE
|
||||||
| REGULATOR_CHANGE_STATUS,
|
| REGULATOR_CHANGE_STATUS,
|
||||||
},
|
},
|
||||||
.num_consumer_supplies = 5,
|
.num_consumer_supplies = 2,
|
||||||
.consumer_supplies = sdp4430_vmmc_supply,
|
.consumer_supplies = sdp4430_vmmc_supply,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -329,6 +373,7 @@ static void __init omap_4430sdp_init(void)
|
||||||
omap4_i2c_init();
|
omap4_i2c_init();
|
||||||
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
|
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
|
||||||
omap_serial_init();
|
omap_serial_init();
|
||||||
|
omap4_twl6030_hsmmc_init(mmc);
|
||||||
/* OMAP4 SDP uses internal transceiver so register nop transceiver */
|
/* OMAP4 SDP uses internal transceiver so register nop transceiver */
|
||||||
usb_nop_xceiv_register();
|
usb_nop_xceiv_register();
|
||||||
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
|
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
|
||||||
|
|
Loading…
Reference in New Issue