From fccc0fcaaae5154612f8259365d26d04f204859f Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sun, 28 Jun 2009 12:52:31 -0500 Subject: OMAP3 Move twl4030 mmc function Because twl4030 now has its own device files, move and rename twl4030_mmc_config. twl4030_mmc_config initializes the twl4030 power setting to the mmc device. Because it is in the twl4030 power domain, move it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c. The function was renamed to twl4030_power_mmc_init because all the functions in this file are to have the format twl4030_power__ In this case the suffix is mmc_init so device : mmc action : init Signed-off-by: Tom Rix Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Heiko Schocher --- drivers/power/twl4030.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/power') diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c index c93b51f695d..eb066cb58df 100644 --- a/drivers/power/twl4030.c +++ b/drivers/power/twl4030.c @@ -98,3 +98,18 @@ void twl4030_power_init(void) TWL4030_PM_RECEIVER_VDAC_DEDICATED); } +#define VMMC1_VSEL_30 0x02 + +void twl4030_power_mmc_init(void) +{ + unsigned char byte; + + byte = DEV_GRP_P1; + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, + TWL4030_PM_RECEIVER_VMMC1_DEV_GRP); + + /* 3 Volts */ + byte = VMMC1_VSEL_30; + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, + TWL4030_PM_RECEIVER_VMMC1_DEDICATED); +} -- cgit v1.2.3