Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272859
b: refs/heads/master
c: 4a9de8a
h: refs/heads/master
i:
  272857: 16610a7
  272855: 4b7e205
v: v3
  • Loading branch information
Ido Yariv authored and Sekhar Nori committed Sep 17, 2011
1 parent b79aed6 commit 5514b1c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6836989c35b285b566b932fdbb8402edf8fcc887
refs/heads/master: 4a9de8ad2cea3c952e8b1cff8aa9289cd9d66c62
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-davinci/include/mach/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ struct davinci_mmc_config {
/* get_cd()/get_wp() may sleep */
int (*get_cd)(int module);
int (*get_ro)(int module);

void (*set_power)(int module, bool on);

/* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
u8 wires;

Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/mmc/host/davinci_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,25 @@ static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios)
static void mmc_davinci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct mmc_davinci_host *host = mmc_priv(mmc);
struct platform_device *pdev = to_platform_device(mmc->parent);
struct davinci_mmc_config *config = pdev->dev.platform_data;

dev_dbg(mmc_dev(host->mmc),
"clock %dHz busmode %d powermode %d Vdd %04x\n",
ios->clock, ios->bus_mode, ios->power_mode,
ios->vdd);

switch (ios->power_mode) {
case MMC_POWER_OFF:
if (config && config->set_power)
config->set_power(pdev->id, false);
break;
case MMC_POWER_UP:
if (config && config->set_power)
config->set_power(pdev->id, true);
break;
}

switch (ios->bus_width) {
case MMC_BUS_WIDTH_8:
dev_dbg(mmc_dev(host->mmc), "Enabling 8 bit mode\n");
Expand Down

0 comments on commit 5514b1c

Please sign in to comment.