mmc: sdhci: add timeout setting for response busy command
authorKevin Liu <kliu5@marvell.com>
Mon, 23 Mar 2015 22:57:00 +0000 (17:57 -0500)
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>
Tue, 5 May 2015 09:29:42 +0000 (12:29 +0300)
Timeout interrupt also work for response busy command(R1b) like
cmd38/cmd6. So need to set it accordingly. Current code only
set timeout for data command.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
drivers/mmc/sdhci.c

index 5332e61cae6bae2c454182e7d4c75d94ded6beb3..75556a332de216f368612536d4ee5a3c770cf90c 100644 (file)
@@ -213,6 +213,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
                                SDHCI_BLOCK_SIZE);
                sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
                sdhci_writew(host, mode, SDHCI_TRANSFER_MODE);
+       } else if (cmd->resp_type & MMC_RSP_BUSY) {
+               sdhci_writeb(host, 0xe, SDHCI_TIMEOUT_CONTROL);
        }
 
        sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);