summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.h
diff options
context:
space:
mode:
authorChris Brandt2016-09-12 16:15:06 +0200
committerUlf Hansson2016-11-29 09:00:53 +0100
commit8185e51f358a8dd4801b67e8c66f03eb9eeaba75 (patch)
treebe239a93fd696bfe128f0fc23c996e8215c397d1 /drivers/mmc/host/tmio_mmc.h
parentmmc: sh_mobile_sdhi: add ocr_mask option (diff)
downloadkernel-qcow2-linux-8185e51f358a8dd4801b67e8c66f03eb9eeaba75.tar.gz
kernel-qcow2-linux-8185e51f358a8dd4801b67e8c66f03eb9eeaba75.tar.xz
kernel-qcow2-linux-8185e51f358a8dd4801b67e8c66f03eb9eeaba75.zip
mmc: tmio-mmc: add support for 32bit data port
For the r7s72100 SOC, the DATA_PORT register was changed to 32-bits wide. Therefore a new flag has been created that will allow 32-bit reads/writes to the DATA_PORT register instead of 16-bit (because 16-bits accesses are not supported). Signed-off-by: Chris Brandt <chris.brandt@renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r--drivers/mmc/host/tmio_mmc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 8e126afd988c..839755c7f2b0 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -245,6 +245,12 @@ static inline u32 sd_ctrl_read16_and_16_as_32(struct tmio_mmc_host *host, int ad
readw(host->ctl + ((addr + 2) << host->bus_shift)) << 16;
}
+static inline void sd_ctrl_read32_rep(struct tmio_mmc_host *host, int addr,
+ u32 *buf, int count)
+{
+ readsl(host->ctl + (addr << host->bus_shift), buf, count);
+}
+
static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val)
{
/* If there is a hook and it returns non-zero then there
@@ -267,4 +273,10 @@ static inline void sd_ctrl_write32_as_16_and_16(struct tmio_mmc_host *host, int
writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift));
}
+static inline void sd_ctrl_write32_rep(struct tmio_mmc_host *host, int addr,
+ const u32 *buf, int count)
+{
+ writesl(host->ctl + (addr << host->bus_shift), buf, count);
+}
+
#endif