Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311055
b: refs/heads/master
c: 2a0fe91
h: refs/heads/master
i:
  311053: e9f0162
  311051: f6af9d5
  311047: e78d0f4
  311039: b07b455
v: v3
  • Loading branch information
Yong Ding authored and Chris Ball committed Jun 6, 2012
1 parent ff39043 commit d4cb31c
Show file tree
Hide file tree
Showing 3 changed files with 9 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: 693e5e2025278d90e1427f037e5ec8ea1ec7d5c4
refs/heads/master: 2a0fe914a38745f5b03534c4e4f4056cbd6978b8
6 changes: 6 additions & 0 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ static int sdio_enable_wide(struct mmc_card *card)
if (ret)
return ret;

if ((ctrl & SDIO_BUS_WIDTH_MASK) == SDIO_BUS_WIDTH_RESERVED)
pr_warning("%s: SDIO_CCCR_IF is invalid: 0x%02x\n",
mmc_hostname(card->host), ctrl);

/* set as 4-bit bus width */
ctrl &= ~SDIO_BUS_WIDTH_MASK;
ctrl |= SDIO_BUS_WIDTH_4BIT;

ret = mmc_io_rw_direct(card, 1, 0, SDIO_CCCR_IF, ctrl, NULL);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mmc/sdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@

#define SDIO_CCCR_IF 0x07 /* bus interface controls */

#define SDIO_BUS_WIDTH_MASK 0x03 /* data bus width setting */
#define SDIO_BUS_WIDTH_1BIT 0x00
#define SDIO_BUS_WIDTH_RESERVED 0x01
#define SDIO_BUS_WIDTH_4BIT 0x02
#define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */
#define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */
Expand Down

0 comments on commit d4cb31c

Please sign in to comment.