diff options
author | Balaji T K <balajitk@ti.com> | 2014-01-21 09:24:42 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-03-04 11:46:48 -0500 |
commit | bf129e1ca19f973731d56478297be3de3181efcb (patch) | |
tree | 50820d1e763447c6c46e2b0945e8ae57337bf3fa /drivers | |
parent | 9d0253341b4ef89cf9471656d0990774bc8ab95c (diff) |
mmc: omap_hsmmc: add cmd23 support
Add set block count command support for close ended multiblock read/write.
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index cdeca5e6fae4..476c6a632bfc 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -202,6 +202,8 @@ struct omap_mmc_of_data { | |||
202 | u8 controller_flags; | 202 | u8 controller_flags; |
203 | }; | 203 | }; |
204 | 204 | ||
205 | static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host); | ||
206 | |||
205 | static int omap_hsmmc_card_detect(struct device *dev, int slot) | 207 | static int omap_hsmmc_card_detect(struct device *dev, int slot) |
206 | { | 208 | { |
207 | struct omap_hsmmc_host *host = dev_get_drvdata(dev); | 209 | struct omap_hsmmc_host *host = dev_get_drvdata(dev); |
@@ -888,11 +890,10 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) | |||
888 | else | 890 | else |
889 | data->bytes_xfered = 0; | 891 | data->bytes_xfered = 0; |
890 | 892 | ||
891 | if (!data->stop) { | 893 | if (data->stop && (data->error || !host->mrq->sbc)) |
894 | omap_hsmmc_start_command(host, data->stop, NULL); | ||
895 | else | ||
892 | omap_hsmmc_request_done(host, data->mrq); | 896 | omap_hsmmc_request_done(host, data->mrq); |
893 | return; | ||
894 | } | ||
895 | omap_hsmmc_start_command(host, data->stop, NULL); | ||
896 | } | 897 | } |
897 | 898 | ||
898 | /* | 899 | /* |
@@ -903,6 +904,14 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) | |||
903 | { | 904 | { |
904 | host->cmd = NULL; | 905 | host->cmd = NULL; |
905 | 906 | ||
907 | if (host->mrq->sbc && (host->cmd == host->mrq->sbc) && | ||
908 | !host->mrq->sbc->error) { | ||
909 | omap_hsmmc_start_dma_transfer(host); | ||
910 | omap_hsmmc_start_command(host, host->mrq->cmd, | ||
911 | host->mrq->data); | ||
912 | return; | ||
913 | } | ||
914 | |||
906 | if (cmd->flags & MMC_RSP_PRESENT) { | 915 | if (cmd->flags & MMC_RSP_PRESENT) { |
907 | if (cmd->flags & MMC_RSP_136) { | 916 | if (cmd->flags & MMC_RSP_136) { |
908 | /* response type 2 */ | 917 | /* response type 2 */ |
@@ -1504,6 +1513,10 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) | |||
1504 | mmc_request_done(mmc, req); | 1513 | mmc_request_done(mmc, req); |
1505 | return; | 1514 | return; |
1506 | } | 1515 | } |
1516 | if (req->sbc) { | ||
1517 | omap_hsmmc_start_command(host, req->sbc, NULL); | ||
1518 | return; | ||
1519 | } | ||
1507 | 1520 | ||
1508 | omap_hsmmc_start_dma_transfer(host); | 1521 | omap_hsmmc_start_dma_transfer(host); |
1509 | omap_hsmmc_start_command(host, req->cmd, req->data); | 1522 | omap_hsmmc_start_command(host, req->cmd, req->data); |