Commit e8e64239 authored by David Cohen's avatar David Cohen Committed by Tony Lindgren

OMAP: MMC: Add menelaus_enable_slot on menelaus.c.

Adding menelaus_enable_slot() function on menelaus driver.
This function enables/disables the mmc slots on menelaus.
Signed-off-by: default avatarDavid Cohen <david.cohen@indt.org.br>
Acked-by: default avatarAnderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent aa3c182a
......@@ -314,6 +314,34 @@ out:
}
EXPORT_SYMBOL(menelaus_set_slot_sel);
int menelaus_enable_slot(int slot, int enable)
{
int ret, val;
mutex_lock(&the_menelaus->lock);
ret = menelaus_read_reg(MENELAUS_MCT_CTRL3);
if (ret < 0)
goto out;
val = ret;
if (slot == 1) {
if (enable)
val |= 1 << 0;
else
val &= ~(1 << 0);
} else {
if (enable)
val |= 1 << 1;
else
val &= ~(1 << 1);
}
ret = menelaus_write_reg(MENELAUS_MCT_CTRL3, val);
out:
mutex_unlock(&the_menelaus->lock);
return ret;
}
EXPORT_SYMBOL(menelaus_enable_slot);
int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_en)
{
int ret, val;
......
......@@ -18,6 +18,7 @@ extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_m
extern void menelaus_unregister_mmc_callback(void);
extern int menelaus_set_mmc_opendrain(int slot, int enable);
extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on);
extern int menelaus_enable_slot(int slot, int enable);
extern int menelaus_set_vmem(unsigned int mV);
extern int menelaus_set_vio(unsigned int mV);
......
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