summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_spi.c
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2011-04-19 03:48:32 +0000
committerAndy Fleming <afleming@freescale.com>2011-05-18 14:30:34 -0500
commited018b21d61614e0431f6bf514bec6e4bf64fe31 (patch)
tree846bc03655befabcbc79c0b95baf2d205c6d5ad1 /drivers/mmc/mmc_spi.c
parent0ea91423f47461bf7eaed2d4aff198076dd07fd5 (diff)
downloadu-boot-imx-ed018b21d61614e0431f6bf514bec6e4bf64fe31.zip
u-boot-imx-ed018b21d61614e0431f6bf514bec6e4bf64fe31.tar.gz
u-boot-imx-ed018b21d61614e0431f6bf514bec6e4bf64fe31.tar.bz2
mmc_spi: generate response for send status command
A "send status" command is added with the commit "mmc: checking status after commands with R1b response". But the status register returned from send status command of SPI protocol is different from that of MMC/SD protocol. We do a simple test and generate a response in stead of full bit-by-bit translation. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Diffstat (limited to 'drivers/mmc/mmc_spi.c')
-rw-r--r--drivers/mmc/mmc_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index dc7574c..49fb9e0 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -208,6 +208,11 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
cmd->response[0] = swab32(cmd->response[0]);
debug("r32 %x\n", cmd->response[0]);
break;
+ case MMC_CMD_SEND_STATUS:
+ spi_xfer(spi, 1 * 8, NULL, cmd->response, 0);
+ cmd->response[0] = (cmd->response[0] & 0xff) ?
+ MMC_STATUS_ERROR : MMC_STATUS_RDY_FOR_DATA;
+ break;
}
} else {
debug("%s:data %x %x %x\n", __func__,