diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2014-06-02 10:09:39 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-07-09 11:25:56 +0200 |
commit | ae7b0061f61e7c96884f4080b4e28544a0cedd76 (patch) | |
tree | 1d833f673c19bd69cf0370532c5bf05f5cc514c5 /drivers/mmc | |
parent | e8740644ab5f906e131596d7580701b2ca855210 (diff) | |
download | talos-obmc-linux-ae7b0061f61e7c96884f4080b4e28544a0cedd76.tar.gz talos-obmc-linux-ae7b0061f61e7c96884f4080b4e28544a0cedd76.zip |
mmc: mmci: Add support to data commands via variant structure.
On some SOCs like Qcom there are explicit bits in the command register
to specify if its a data transfer command or not. So this patch adds
support to such bits in variant data, giving more flexibility to the
driver.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mmci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 5228c5de334d..0a8cdac1f59c 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -59,6 +59,7 @@ static unsigned int fmax = 515633; * is asserted (likewise for RX) * @fifohalfsize: number of bytes that can be written when MCI_TXFIFOHALFEMPTY * is asserted (likewise for RX) + * @data_cmd_enable: enable value for data commands. * @sdio: variant supports SDIO * @st_clkdiv: true if using a ST-specific clock divider algorithm * @datactrl_mask_ddrmode: ddr mode mask in datactrl register. @@ -79,6 +80,7 @@ struct variant_data { unsigned int datalength_bits; unsigned int fifosize; unsigned int fifohalfsize; + unsigned int data_cmd_enable; unsigned int datactrl_mask_ddrmode; bool sdio; bool st_clkdiv; @@ -841,6 +843,9 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c) if (/*interrupt*/0) c |= MCI_CPSM_INTERRUPT; + if (mmc_cmd_type(cmd) == MMC_CMD_ADTC) + c |= host->variant->data_cmd_enable; + host->cmd = cmd; writel(cmd->arg, base + MMCIARGUMENT); |