diff options
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index bf33c0302257..4484459601b4 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -38,6 +38,9 @@ #include <mach/smmu.h> #include <mach/tegra_smmu.h> +/* REVISIT: With new configurations for t114/124/148 passed from DT */ +#define SKIP_SWGRP_CHECK + /* bitmap of the page sizes currently supported */ #define SMMU_IOMMU_PGSIZES (SZ_4K) @@ -316,11 +319,15 @@ static int __smmu_client_set_hwgrp(struct smmu_client *c, offs = HWGRP_ASID_REG(i); val = smmu_read(smmu, offs); if (on) { +#if !defined(SKIP_SWGRP_CHECK) if (WARN_ON(val & mask)) goto err_hw_busy; +#endif val |= mask; } else { +#if !defined(SKIP_SWGRP_CHECK) WARN_ON((val & mask) == mask); +#endif val &= ~mask; } smmu_write(smmu, val, offs); @@ -701,9 +708,15 @@ static int smmu_iommu_attach_dev(struct iommu_domain *domain, return -ENOMEM; client->dev = dev; client->as = as; + +#ifdef SKIP_SWGRP_CHECK + /* Enable all SWGRP blindly by default */ + map = (1 << HWGRP_COUNT) - 1; +#else map = (unsigned long)dev->platform_data; if (!map) return -EINVAL; +#endif err = smmu_client_enable_hwgrp(client, map); if (err) |