aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-01 04:03:23 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-04-14 03:18:06 -0400
commit4725f6f17691f4602e3e31d785da5a461a16ccfe (patch)
tree8c4215fda7650ee57eaa26ca9618a2a2b2e82148 /drivers/mmc
parent066fb8472036805e31ee002097f619815e25a127 (diff)
ARM: MXC: mxcmmc: misc cleanups
Be more verbose on error messages and add one debug message. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Volker Ernst <volker.ernst@txtr.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Michał Mirosław <mirqus@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mxcmmc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 2df90412abb5..44a53ee5e212 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -151,6 +151,8 @@ static void mxcmci_softreset(struct mxcmci_host *host)
151{ 151{
152 int i; 152 int i;
153 153
154 dev_dbg(mmc_dev(host->mmc), "mxcmci_softreset\n");
155
154 /* reset sequence */ 156 /* reset sequence */
155 writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK); 157 writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK);
156 writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK, 158 writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
@@ -290,16 +292,25 @@ static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
290 dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", 292 dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",
291 stat); 293 stat);
292 if (stat & STATUS_CRC_READ_ERR) { 294 if (stat & STATUS_CRC_READ_ERR) {
295 dev_err(mmc_dev(host->mmc), "%s: -EILSEQ\n", __func__);
293 data->error = -EILSEQ; 296 data->error = -EILSEQ;
294 } else if (stat & STATUS_CRC_WRITE_ERR) { 297 } else if (stat & STATUS_CRC_WRITE_ERR) {
295 u32 err_code = (stat >> 9) & 0x3; 298 u32 err_code = (stat >> 9) & 0x3;
296 if (err_code == 2) /* No CRC response */ 299 if (err_code == 2) { /* No CRC response */
300 dev_err(mmc_dev(host->mmc),
301 "%s: No CRC -ETIMEDOUT\n", __func__);
297 data->error = -ETIMEDOUT; 302 data->error = -ETIMEDOUT;
298 else 303 } else {
304 dev_err(mmc_dev(host->mmc),
305 "%s: -EILSEQ\n", __func__);
299 data->error = -EILSEQ; 306 data->error = -EILSEQ;
307 }
300 } else if (stat & STATUS_TIME_OUT_READ) { 308 } else if (stat & STATUS_TIME_OUT_READ) {
309 dev_err(mmc_dev(host->mmc),
310 "%s: read -ETIMEDOUT\n", __func__);
301 data->error = -ETIMEDOUT; 311 data->error = -ETIMEDOUT;
302 } else { 312 } else {
313 dev_err(mmc_dev(host->mmc), "%s: -EIO\n", __func__);
303 data->error = -EIO; 314 data->error = -EIO;
304 } 315 }
305 } else { 316 } else {
@@ -433,8 +444,6 @@ static int mxcmci_transfer_data(struct mxcmci_host *host)
433 struct scatterlist *sg; 444 struct scatterlist *sg;
434 int stat, i; 445 int stat, i;
435 446
436 host->datasize = 0;
437
438 host->data = data; 447 host->data = data;
439 host->datasize = 0; 448 host->datasize = 0;
440 449