Merge remote branches 'remotes/origin/pwrdm_clkdm_b_2.6.39', 'remotes/origin/pwrdm_add_can_lose_context_fns_2.6.39', 'remotes/origin/omap_device_a_2.6.39', 'remotes/origin/mmc_a_2.6.39', 'remotes/origin/hwmod_b_2.6.39', 'remotes/origin/dmtimer_a_2.6.39', 'remotes/origin/pwrdm_clkdm_a_2.6.39', 'remotes/origin/clkdm_statdep_omap4_2.6.39', 'remotes/origin/clk_a_2.6.39', 'remotes/origin/clk_autoidle_a_2.6.39', 'remotes/origin/clk_autoidle_b_2.6.39', 'remotes/origin/clk_b_2.6.39', 'remotes/origin/clk_clkdm_a_2.6.39', 'remotes/origin/misc_a_2.6.39', 'remotes/origin/for_2.6.39/omap3_hwmod_data' and 'remotes/origin/wdtimer_a_2.6.39' into tmp-integration-2.6.39-20110310-024
This commit is contained in:

@@ -225,7 +225,7 @@ config MMC_OMAP
|
||||
|
||||
config MMC_OMAP_HS
|
||||
tristate "TI OMAP High Speed Multimedia Card Interface support"
|
||||
depends on ARCH_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4
|
||||
depends on SOC_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4
|
||||
help
|
||||
This selects the TI OMAP High Speed Multimedia card Interface.
|
||||
If you have an OMAP2430 or OMAP3 board or OMAP4 board with a
|
||||
|
@@ -118,7 +118,7 @@
|
||||
|
||||
#define MMC_TIMEOUT_MS 20
|
||||
#define OMAP_MMC_MASTER_CLOCK 96000000
|
||||
#define DRIVER_NAME "mmci-omap-hs"
|
||||
#define DRIVER_NAME "omap_hsmmc"
|
||||
|
||||
/* Timeouts for entering power saving states on inactivity, msec */
|
||||
#define OMAP_MMC_DISABLED_TIMEOUT 100
|
||||
@@ -260,7 +260,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
|
||||
static int omap_hsmmc_235_set_power(struct device *dev, int slot, int power_on,
|
||||
int vdd)
|
||||
{
|
||||
struct omap_hsmmc_host *host =
|
||||
@@ -316,6 +316,12 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_4_set_power(struct device *dev, int slot, int power_on,
|
||||
int vdd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
|
||||
int vdd, int cardsleep)
|
||||
{
|
||||
@@ -326,7 +332,7 @@ static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
|
||||
return regulator_set_mode(host->vcc, mode);
|
||||
}
|
||||
|
||||
static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
|
||||
static int omap_hsmmc_235_set_sleep(struct device *dev, int slot, int sleep,
|
||||
int vdd, int cardsleep)
|
||||
{
|
||||
struct omap_hsmmc_host *host =
|
||||
@@ -365,6 +371,12 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
|
||||
return regulator_enable(host->vcc_aux);
|
||||
}
|
||||
|
||||
static int omap_hsmmc_4_set_sleep(struct device *dev, int slot, int sleep,
|
||||
int vdd, int cardsleep)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
|
||||
{
|
||||
struct regulator *reg;
|
||||
@@ -379,10 +391,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
|
||||
break;
|
||||
case OMAP_MMC2_DEVID:
|
||||
case OMAP_MMC3_DEVID:
|
||||
case OMAP_MMC5_DEVID:
|
||||
/* Off-chip level shifting, or none */
|
||||
mmc_slot(host).set_power = omap_hsmmc_23_set_power;
|
||||
mmc_slot(host).set_sleep = omap_hsmmc_23_set_sleep;
|
||||
mmc_slot(host).set_power = omap_hsmmc_235_set_power;
|
||||
mmc_slot(host).set_sleep = omap_hsmmc_235_set_sleep;
|
||||
break;
|
||||
case OMAP_MMC4_DEVID:
|
||||
mmc_slot(host).set_power = omap_hsmmc_4_set_power;
|
||||
mmc_slot(host).set_sleep = omap_hsmmc_4_set_sleep;
|
||||
default:
|
||||
pr_err("MMC%d configuration not supported!\n", host->id);
|
||||
return -EINVAL;
|
||||
@@ -1555,7 +1571,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
break;
|
||||
}
|
||||
|
||||
if (host->id == OMAP_MMC1_DEVID) {
|
||||
if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
|
||||
/* Only MMC1 can interface at 3V without some flavor
|
||||
* of external transceiver; but they all handle 1.8V.
|
||||
*/
|
||||
@@ -1647,7 +1663,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
|
||||
u32 hctl, capa, value;
|
||||
|
||||
/* Only MMC1 supports 3.0V */
|
||||
if (host->id == OMAP_MMC1_DEVID) {
|
||||
if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
|
||||
hctl = SDVS30;
|
||||
capa = VS30 | VS18;
|
||||
} else {
|
||||
@@ -2101,14 +2117,14 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
|
||||
/* we start off in DISABLED state */
|
||||
host->dpm_state = DISABLED;
|
||||
|
||||
if (mmc_host_enable(host->mmc) != 0) {
|
||||
if (clk_enable(host->iclk) != 0) {
|
||||
clk_put(host->iclk);
|
||||
clk_put(host->fclk);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
if (clk_enable(host->iclk) != 0) {
|
||||
mmc_host_disable(host->mmc);
|
||||
if (mmc_host_enable(host->mmc) != 0) {
|
||||
clk_disable(host->iclk);
|
||||
clk_put(host->iclk);
|
||||
clk_put(host->fclk);
|
||||
goto err1;
|
||||
|
Reference in New Issue
Block a user