Skip to content

Commit 5ca54fd

Browse files
geertujoergroedel
authored andcommitted
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: c295f50 ("iommu/ipmmu-vmsa: Allow two bit SL0") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 089cf7f commit 5ca54fd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/iommu/ipmmu-vmsa.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,14 @@ static struct ipmmu_vmsa_device *to_ipmmu(struct device *dev)
145145
#define IMTTBCR_IRGN0_WT (2 << 8)
146146
#define IMTTBCR_IRGN0_WB (3 << 8)
147147
#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 */
148151
#define IMTTBCR_SL0_LVL_2 (0 << 4)
149152
#define IMTTBCR_SL0_LVL_1 (1 << 4)
150153
#define IMTTBCR_TSZ0_MASK (7 << 0)
151154
#define IMTTBCR_TSZ0_SHIFT O
152155

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-
157156
#define IMBUSCR 0x000c
158157
#define IMBUSCR_DVM (1 << 2)
159158
#define IMBUSCR_BUSSEL_SYS (0 << 0)

0 commit comments

Comments
 (0)