Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218999
b: refs/heads/master
c: 49e3b5a
h: refs/heads/master
i:
  218997: cd8b724
  218995: 235d4c4
  218991: 1ebc48c
v: v3
  • Loading branch information
Adrian Hunter authored and Chris Ball committed Oct 23, 2010
1 parent 3ac4f5f commit 105710a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 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: 0f8d8ea64ec7c77ca5beb59534d386fe0235961a
refs/heads/master: 49e3b5a44f8abd33c8693edc575c6d06a210d778
7 changes: 4 additions & 3 deletions trunk/drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,11 @@ void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode)
/*
* Change data bus width and DDR mode of a host.
*/
void mmc_set_bus_width_ddr(struct mmc_host *host, unsigned int width, int ddr)
void mmc_set_bus_width_ddr(struct mmc_host *host, unsigned int width,
unsigned int ddr)
{
host->ios.bus_width = width;
host->ios.ddr = ddr ? MMC_DDR_MODE : MMC_SDR_MODE;
host->ios.ddr = ddr;
mmc_set_ios(host);
}

Expand All @@ -665,7 +666,7 @@ void mmc_set_bus_width_ddr(struct mmc_host *host, unsigned int width, int ddr)
*/
void mmc_set_bus_width(struct mmc_host *host, unsigned int width)
{
mmc_set_bus_width_ddr(host, width, 0);
mmc_set_bus_width_ddr(host, width, MMC_SDR_MODE);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/mmc/core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ void mmc_set_chip_select(struct mmc_host *host, int mode);
void mmc_set_clock(struct mmc_host *host, unsigned int hz);
void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
void mmc_set_bus_width(struct mmc_host *host, unsigned int width);
void mmc_set_bus_width_ddr(struct mmc_host *host, unsigned int width, int ddr);
void mmc_set_bus_width_ddr(struct mmc_host *host, unsigned int width,
unsigned int ddr);
u32 mmc_select_voltage(struct mmc_host *host, u32 ocr);
void mmc_set_timing(struct mmc_host *host, unsigned int timing);

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
struct mmc_card *oldcard)
{
struct mmc_card *card;
int err, ddr = 0;
int err, ddr = MMC_SDR_MODE;
u32 cid[4];
unsigned int max_dtr;

Expand Down Expand Up @@ -523,10 +523,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
if (mmc_card_highspeed(card)) {
if ((card->ext_csd.card_type & EXT_CSD_CARD_TYPE_DDR_1_8V)
&& (host->caps & (MMC_CAP_1_8V_DDR)))
ddr = 1;
ddr = MMC_1_8V_DDR_MODE;
else if ((card->ext_csd.card_type & EXT_CSD_CARD_TYPE_DDR_1_2V)
&& (host->caps & (MMC_CAP_1_2V_DDR)))
ddr = 1;
ddr = MMC_1_2V_DDR_MODE;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/mmc/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ struct mmc_ios {
unsigned char ddr; /* dual data rate used */

#define MMC_SDR_MODE 0
#define MMC_DDR_MODE 1
#define MMC_1_2V_DDR_MODE 1
#define MMC_1_8V_DDR_MODE 2
};

struct mmc_host_ops {
Expand Down

0 comments on commit 105710a

Please sign in to comment.