diff options
author | Srinivas Kandagatla | 2014-06-02 11:09:06 +0200 |
---|---|---|
committer | Ulf Hansson | 2014-07-09 11:25:54 +0200 |
commit | ff783233cc13eca99a3b59c0609c1ffc6164b7a2 (patch) | |
tree | f1d5a88648b8e03b637e534871c7559b6416ff2d /drivers/mmc | |
parent | mmc: mmci: Add enough delay between writes to CMD register. (diff) | |
download | kernel-qcow2-linux-ff783233cc13eca99a3b59c0609c1ffc6164b7a2.tar.gz kernel-qcow2-linux-ff783233cc13eca99a3b59c0609c1ffc6164b7a2.tar.xz kernel-qcow2-linux-ff783233cc13eca99a3b59c0609c1ffc6164b7a2.zip |
mmc: mmci: Add Qcom datactrl register variant
Instance of this IP on Qualcomm's SOCs has bit different layout for datactrl
register. Bit position datactrl[16:4] hold the true block size instead of power
of 2.
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 6409f31d328c..714b96818196 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -60,6 +60,8 @@ static unsigned int fmax = 515633; * @sdio: variant supports SDIO * @st_clkdiv: true if using a ST-specific clock divider algorithm * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register + * @blksz_datactrl4: true if Block size is at b4..b16 position in datactrl + * register * @pwrreg_powerup: power up value for MMCIPOWER register * @signal_direction: input/out direction of bus signals can be indicated * @pwrreg_clkgate: MMCIPOWER register must be used to gate the clock @@ -75,6 +77,7 @@ struct variant_data { bool sdio; bool st_clkdiv; bool blksz_datactrl16; + bool blksz_datactrl4; u32 pwrreg_powerup; bool signal_direction; bool pwrreg_clkgate; @@ -732,6 +735,8 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) if (variant->blksz_datactrl16) datactrl = MCI_DPSM_ENABLE | (data->blksz << 16); + else if (variant->blksz_datactrl4) + datactrl = MCI_DPSM_ENABLE | (data->blksz << 4); else datactrl = MCI_DPSM_ENABLE | blksz_bits << 4; |