Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694413

[PATCH V3 3/3] iommu/rockchip: ignore isp mmu reset operation

From Simon Xue <xxm@rock-chips.com>
Newsgroups linux.kernel
Subject [PATCH V3 3/3] iommu/rockchip: ignore isp mmu reset operation
Date 2017-07-24 04:40 +0200
Message-ID <u6BrP-7h2-13@gated-at.bofh.it> (permalink)
References <u6BrP-7h2-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


ISP mmu can't support reset operation, it won't get the
expected result when reset, but rest functions work normally.
Add this patch as a WA for this issue.

Signed-off-by: Simon Xue <xxm@rock-chips.com>
---
changes since V2:
use rockchip,disable-mmu-reset instead of rk-iommu,disable-reset-quirk

 drivers/iommu/rockchip-iommu.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index e2852b0..78ea341 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -92,6 +92,7 @@ struct rk_iommu {
 	int num_mmu;
 	int *irq;
 	int num_irq;
+	bool reset_disabled;
 	struct iommu_device iommu;
 	struct list_head node; /* entry in rk_iommu_domain.iommus */
 	struct iommu_domain *domain; /* domain to which iommu is attached */
@@ -415,6 +416,9 @@ static int rk_iommu_force_reset(struct rk_iommu *iommu)
 	int ret, i;
 	u32 dte_addr;
 
+	if (iommu->reset_disabled)
+		return 0;
+
 	/*
 	 * Check if register DTE_ADDR is working by writing DTE_ADDR_DUMMY
 	 * and verifying that upper 5 nybbles are read back.
@@ -1180,6 +1184,9 @@ static int rk_iommu_probe(struct platform_device *pdev)
 		}
 	}
 
+	iommu->reset_disabled = device_property_read_bool(dev,
+					"rockchip,disable-mmu-reset");
+
 	err = iommu_device_sysfs_add(&iommu->iommu, dev, NULL, dev_name(dev));
 	if (err)
 		return err;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 1/3] Docs: dt: rockchip: add rockchip,disable-mmu-reset property Simon Xue <xxm@rock-chips.com> - 2017-07-24 04:40 +0200
  [PATCH V3 2/3] iommu/rockchip: add multi irqs support Simon Xue <xxm@rock-chips.com> - 2017-07-24 04:40 +0200
  [PATCH V3 3/3] iommu/rockchip: ignore isp mmu reset operation Simon Xue <xxm@rock-chips.com> - 2017-07-24 04:40 +0200
  Re: [PATCH V3 1/3] Docs: dt: rockchip: add  rockchip,disable-mmu-reset property Joerg Roedel <joro@8bytes.org> - 2017-07-26 13:00 +0200

csiph-web