diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-03-04 15:41:35 +0200 |
---|---|---|
committer | Harshada Kale <hkale@nvidia.com> | 2013-06-10 03:46:46 -0700 |
commit | d140862b4d63a35e3452c880b8d14dbd6c82fb8e (patch) | |
tree | 8df8cb3fcd6d5437a66d78b30ce378a71fdc41a0 /drivers | |
parent | f17c12c9ea1a36deebfdfd17ea270f817fafba3f (diff) |
iommu/tegra: smmu: Remove SKIP_SWGRP_CHECK
Remove obsolete workaround, SKIP_SWGRP_CHECK.
bug 1286500
Change-Id: I2986a33af1304973a2c30e57f7790dd70729f566
(cherry picked from commit 7de038bc039ba1106580fea174a4b74805fea412)
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/234116
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index cb650a21b360..50d51e1ffd52 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -43,9 +43,6 @@ #include <mach/hardware.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 | SZ_4M) @@ -327,25 +324,11 @@ static int __smmu_client_set_hwgrp(struct smmu_client *c, u64 map, int on) offs = HWGRP_ASID_REG(i); val = smmu_read(smmu, offs); - if (on) { -#if !defined(SKIP_SWGRP_CHECK) - if (WARN_ON(val & mask)) { - for_each_set_bit(i, &map, HWGRP_COUNT) { - offs = HWGRP_ASID_REG(i); - val = smmu_read(smmu, offs); - val &= ~mask; - smmu_write(smmu, val, offs); - } - return -EBUSY; - } -#endif + if (on) val |= mask; -#if !defined(SKIP_SWGRP_CHECK) - } else { - WARN_ON((val & mask) == mask); + else val &= ~mask; -#endif - } + smmu_write(smmu, val, offs); } FLUSH_SMMU_REGS(smmu); @@ -795,7 +778,7 @@ static int smmu_iommu_attach_dev(struct iommu_domain *domain, struct smmu_as *as = domain->priv; struct smmu_device *smmu = as->smmu; struct smmu_client *client, *c; - u32 map; + u64 map = smmu->swgids; int err; client = devm_kzalloc(smmu->dev, sizeof(*c), GFP_KERNEL); @@ -804,15 +787,6 @@ static int smmu_iommu_attach_dev(struct iommu_domain *domain, client->dev = dev; client->as = as; -#ifdef SKIP_SWGRP_CHECK - /* Enable all SWGRP blindly by default */ - map = ~0UL; -#else - map = (unsigned long)dev->platform_data; - if (!map) - return -EINVAL; -#endif - err = smmu_client_enable_hwgrp(client, map); if (err) goto err_hwgrp; |