aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-02-20 14:07:48 +0900
committerRyo Kataoka <ryo.kataoka.wt@renesas.com>2019-03-22 20:50:20 +0900
commit0533172faca88bd946493f719bca659f9a4cc525 (patch)
tree422af25290656347005b177e2ed6a75ae3f9c80d
parent5c71e29dfff3192e2babf91c48827a7a95663b10 (diff)
downloadrenesas-bsp-0533172faca88bd946493f719bca659f9a4cc525.tar.gz
mmc: tmio: No memory size limitation if runs on IOMMU
This patch adds a condition to avoid memory size limitaion of swiotlb if the driver runs on IOMMU. Tested-by: Takeshi Saito <takeshi.saito.xv@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com>
-rw-r--r--drivers/mmc/host/tmio_mmc_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index a46e7e052e960..0e7ac27b4809e 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1386,9 +1386,10 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
* Since swiotlb has memory size limitation, this will calculate
* the maximum size locally (because we don't have any APIs for it now)
* and check the current max_req_size. And then, this will update
- * the max_req_size if needed as a workaround.
+ * the max_req_size if needed as a workaround. However, if the driver
+ * runs on IOMMU, this workaround doesn't need.
*/
- if (swiotlb_max_segment()) {
+ if (swiotlb_max_segment() && !pdev->dev.iommu_group) {
unsigned int max_size = (1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
if (mmc->max_req_size > max_size)