Revert "iommu/rockchip: fix bool operation error and probe warning"

This reverts commit e0492807e6.

Same issue fixed by upstream(e04928 "iommu/rockchip: fix bool operation
error and probe warning) which picked as (2e7026 "UPSTREAM: iommu/rockchip:
Fix "is stall active" check).

Conflicts:
	drivers/iommu/rockchip-iommu.c

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Change-Id: I56e61894b1da14bce78ae1b3d08158dfb5b027bb
This commit is contained in:
Jeffy Chen
2016-11-29 11:34:49 +08:00
committed by Huang, Tao
parent e1b2457124
commit dc7e965076

View File

@@ -311,22 +311,24 @@ static void rk_iommu_zap_lines(struct rk_iommu *iommu, dma_addr_t iova_start,
static bool rk_iommu_is_stall_active(struct rk_iommu *iommu)
{
u32 active = RK_MMU_STATUS_STALL_ACTIVE;
bool active = true;
int i;
for (i = 0; i < iommu->num_mmu; i++)
active &= !!rk_iommu_read(iommu->bases[i], RK_MMU_STATUS);
active &= !!(rk_iommu_read(iommu->bases[i], RK_MMU_STATUS) &
RK_MMU_STATUS_STALL_ACTIVE);
return active;
}
static bool rk_iommu_is_paging_enabled(struct rk_iommu *iommu)
{
u32 enable = RK_MMU_STATUS_PAGING_ENABLED;
bool enable = true;
int i;
for (i = 0; i < iommu->num_mmu; i++)
enable &= !!rk_iommu_read(iommu->bases[i], RK_MMU_STATUS);
enable &= !!(rk_iommu_read(iommu->bases[i], RK_MMU_STATUS) &
RK_MMU_STATUS_PAGING_ENABLED);
return enable;
}
@@ -1139,9 +1141,9 @@ static int rk_iommu_probe(struct platform_device *pdev)
for (i = 0; i < num_res; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
if (!res)
continue;
iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(iommu->bases[i]))
continue;
iommu->num_mmu++;
}
if (iommu->num_mmu == 0)