Commit 5a824e03 authored by Ladislav Michl's avatar Ladislav Michl Committed by Tony Lindgren

board H2: simplify MMC setup

Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent c4df5a4d
...@@ -24,19 +24,13 @@ ...@@ -24,19 +24,13 @@
static int mmc_set_power(struct device *dev, int slot, int power_on, static int mmc_set_power(struct device *dev, int slot, int power_on,
int vdd) int vdd)
{ {
if (power_on) gpio_set_value(H2_TPS_GPIO_MMC_PWR_EN, power_on);
gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 1);
else
gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0);
return 0; return 0;
} }
static int mmc_late_init(struct device *dev) static int mmc_late_init(struct device *dev)
{ {
int ret; int ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power");
ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power");
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -45,7 +39,7 @@ static int mmc_late_init(struct device *dev) ...@@ -45,7 +39,7 @@ static int mmc_late_init(struct device *dev)
return ret; return ret;
} }
static void mmc_shutdown(struct device *dev) static void mmc_cleanup(struct device *dev)
{ {
gpio_free(H2_TPS_GPIO_MMC_PWR_EN); gpio_free(H2_TPS_GPIO_MMC_PWR_EN);
} }
...@@ -58,7 +52,7 @@ static void mmc_shutdown(struct device *dev) ...@@ -58,7 +52,7 @@ static void mmc_shutdown(struct device *dev)
static struct omap_mmc_platform_data mmc1_data = { static struct omap_mmc_platform_data mmc1_data = {
.nr_slots = 1, .nr_slots = 1,
.init = mmc_late_init, .init = mmc_late_init,
.shutdown = mmc_shutdown, .cleanup = mmc_cleanup,
.dma_mask = 0xffffffff, .dma_mask = 0xffffffff,
.slots[0] = { .slots[0] = {
.set_power = mmc_set_power, .set_power = mmc_set_power,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment