Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Balaji T K and committed by
Chris Ball
bf129e1c 9d025334

+17 -4
+17 -4
drivers/mmc/host/omap_hsmmc.c
··· 202 202 u8 controller_flags; 203 203 }; 204 204 205 + static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host); 206 + 205 207 static int omap_hsmmc_card_detect(struct device *dev, int slot) 206 208 { 207 209 struct omap_hsmmc_host *host = dev_get_drvdata(dev); ··· 890 888 else 891 889 data->bytes_xfered = 0; 892 890 893 - if (!data->stop) { 891 + if (data->stop && (data->error || !host->mrq->sbc)) 892 + omap_hsmmc_start_command(host, data->stop, NULL); 893 + else 894 894 omap_hsmmc_request_done(host, data->mrq); 895 - return; 896 - } 897 - omap_hsmmc_start_command(host, data->stop, NULL); 898 895 } 899 896 900 897 /* ··· 903 902 omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) 904 903 { 905 904 host->cmd = NULL; 905 + 906 + if (host->mrq->sbc && (host->cmd == host->mrq->sbc) && 907 + !host->mrq->sbc->error) { 908 + omap_hsmmc_start_dma_transfer(host); 909 + omap_hsmmc_start_command(host, host->mrq->cmd, 910 + host->mrq->data); 911 + return; 912 + } 906 913 907 914 if (cmd->flags & MMC_RSP_PRESENT) { 908 915 if (cmd->flags & MMC_RSP_136) { ··· 1511 1502 req->data->error = err; 1512 1503 host->mrq = NULL; 1513 1504 mmc_request_done(mmc, req); 1505 + return; 1506 + } 1507 + if (req->sbc) { 1508 + omap_hsmmc_start_command(host, req->sbc, NULL); 1514 1509 return; 1515 1510 } 1516 1511