summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2019-09-04 08:08:01 -0400
committerJoerg Roedel <jroedel@suse.de>2019-09-05 07:03:04 -0400
commit5ca54fdc9b1e6a8b3c03eaa8d1b6b4f406e90ad8 (patch)
tree12ed0ef0e98b28fe6a1721ac6b22a23e04f5cf29
parent089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff)
iommu/ipmmu-vmsa: Move IMTTBCR_SL0_TWOBIT_* to restore sort order
Move the recently added IMTTBCR_SL0_TWOBIT_* definitions up, to make sure all IMTTBCR register bit definitions are sorted by decreasing bit index. Add comments to make it clear that they exist on R-Car Gen3 only. Fixes: c295f504fb5a38ab ("iommu/ipmmu-vmsa: Allow two bit SL0") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/ipmmu-vmsa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index ad0098c0c87c..7a7318955859 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -145,15 +145,14 @@ static struct ipmmu_vmsa_device *to_ipmmu(struct device *dev)
145#define IMTTBCR_IRGN0_WT (2 << 8) 145#define IMTTBCR_IRGN0_WT (2 << 8)
146#define IMTTBCR_IRGN0_WB (3 << 8) 146#define IMTTBCR_IRGN0_WB (3 << 8)
147#define IMTTBCR_IRGN0_MASK (3 << 8) 147#define IMTTBCR_IRGN0_MASK (3 << 8)
148#define IMTTBCR_SL0_TWOBIT_LVL_3 (0 << 6) /* R-Car Gen3 only */
149#define IMTTBCR_SL0_TWOBIT_LVL_2 (1 << 6) /* R-Car Gen3 only */
150#define IMTTBCR_SL0_TWOBIT_LVL_1 (2 << 6) /* R-Car Gen3 only */
148#define IMTTBCR_SL0_LVL_2 (0 << 4) 151#define IMTTBCR_SL0_LVL_2 (0 << 4)
149#define IMTTBCR_SL0_LVL_1 (1 << 4) 152#define IMTTBCR_SL0_LVL_1 (1 << 4)
150#define IMTTBCR_TSZ0_MASK (7 << 0) 153#define IMTTBCR_TSZ0_MASK (7 << 0)
151#define IMTTBCR_TSZ0_SHIFT O 154#define IMTTBCR_TSZ0_SHIFT O
152 155
153#define IMTTBCR_SL0_TWOBIT_LVL_3 (0 << 6)
154#define IMTTBCR_SL0_TWOBIT_LVL_2 (1 << 6)
155#define IMTTBCR_SL0_TWOBIT_LVL_1 (2 << 6)
156
157#define IMBUSCR 0x000c 156#define IMBUSCR 0x000c
158#define IMBUSCR_DVM (1 << 2) 157#define IMBUSCR_DVM (1 << 2)
159#define IMBUSCR_BUSSEL_SYS (0 << 0) 158#define IMBUSCR_BUSSEL_SYS (0 << 0)