Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198448
b: refs/heads/master
c: 4725f6f
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Sascha Hauer committed Apr 14, 2010
1 parent 33b8e34 commit 01838fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: 066fb8472036805e31ee002097f619815e25a127
refs/heads/master: 4725f6f17691f4602e3e31d785da5a461a16ccfe
17 changes: 13 additions & 4 deletions trunk/drivers/mmc/host/mxcmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ static void mxcmci_softreset(struct mxcmci_host *host)
{
int i;

dev_dbg(mmc_dev(host->mmc), "mxcmci_softreset\n");

/* reset sequence */
writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK);
writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
Expand Down Expand Up @@ -290,16 +292,25 @@ static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",
stat);
if (stat & STATUS_CRC_READ_ERR) {
dev_err(mmc_dev(host->mmc), "%s: -EILSEQ\n", __func__);
data->error = -EILSEQ;
} else if (stat & STATUS_CRC_WRITE_ERR) {
u32 err_code = (stat >> 9) & 0x3;
if (err_code == 2) /* No CRC response */
if (err_code == 2) { /* No CRC response */
dev_err(mmc_dev(host->mmc),
"%s: No CRC -ETIMEDOUT\n", __func__);
data->error = -ETIMEDOUT;
else
} else {
dev_err(mmc_dev(host->mmc),
"%s: -EILSEQ\n", __func__);
data->error = -EILSEQ;
}
} else if (stat & STATUS_TIME_OUT_READ) {
dev_err(mmc_dev(host->mmc),
"%s: read -ETIMEDOUT\n", __func__);
data->error = -ETIMEDOUT;
} else {
dev_err(mmc_dev(host->mmc), "%s: -EIO\n", __func__);
data->error = -EIO;
}
} else {
Expand Down Expand Up @@ -433,8 +444,6 @@ static int mxcmci_transfer_data(struct mxcmci_host *host)
struct scatterlist *sg;
int stat, i;

host->datasize = 0;

host->data = data;
host->datasize = 0;

Expand Down

0 comments on commit 01838fc

Please sign in to comment.