iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 18 Apr 2014 02:20:48 +0000 (10:20 +0800)
committerWill Deacon <will.deacon@arm.com>
Fri, 2 May 2014 15:49:37 +0000 (16:49 +0100)
There is already S2CR_TYPE_SHIFT in S2CR_TYPE_TRANS macro, so drop the
second shift. Note that, since S2CR_TYPE_SHIFT is 0x0, there is no
functional change introduced by this patch.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c

index afcb0e3..1599354 100644 (file)
@@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
        for (i = 0; i < master->num_streamids; ++i) {
                u32 idx, s2cr;
                idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
-               s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
+               s2cr = S2CR_TYPE_TRANS |
                       (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
                writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
        }