Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270267
b: refs/heads/master
c: 4466903
h: refs/heads/master
i:
  270265: 4304a01
  270263: d33a08f
v: v3
  • Loading branch information
Stefan Nilsson XK authored and Chris Ball committed Oct 26, 2011
1 parent 9a41f98 commit df39b7a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a0da648ff3a5020406ac7784eb3b519014f66f6
refs/heads/master: 44669034815a7ad263542ac605c581a10b22d146
8 changes: 3 additions & 5 deletions trunk/drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,13 +1160,11 @@ static void mmc_power_up(struct mmc_host *host)
bit = fls(host->ocr_avail) - 1;

host->ios.vdd = bit;
if (mmc_host_is_spi(host)) {
if (mmc_host_is_spi(host))
host->ios.chip_select = MMC_CS_HIGH;
host->ios.bus_mode = MMC_BUSMODE_PUSHPULL;
} else {
else
host->ios.chip_select = MMC_CS_DONTCARE;
host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
}
host->ios.bus_mode = MMC_BUSMODE_PUSHPULL;
host->ios.power_mode = MMC_POWER_UP;
host->ios.bus_width = MMC_BUS_WIDTH_1;
host->ios.timing = MMC_TIMING_LEGACY;
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
BUG_ON(!host);
WARN_ON(!host->claimed);

/* Set correct bus mode for MMC before attempting init */
if (!mmc_host_is_spi(host))
mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);

/*
* Since we're changing the OCR value, we seem to
* need to tell some cards to go back to the idle
Expand Down Expand Up @@ -1022,6 +1026,10 @@ int mmc_attach_mmc(struct mmc_host *host)
BUG_ON(!host);
WARN_ON(!host->claimed);

/* Set correct bus mode for MMC before attempting attach */
if (!mmc_host_is_spi(host))
mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);

err = mmc_send_op_cond(host, 0, &ocr);
if (err)
return err;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,6 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
err = mmc_send_relative_addr(host, &card->rca);
if (err)
return err;

mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
}

if (!oldcard) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
*/
if (oldcard)
oldcard->rca = card->rca;

mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
}

/*
Expand Down

0 comments on commit df39b7a

Please sign in to comment.