Skip to content

Commit 927c70c

Browse files
jernejskjoergroedel
authored andcommitted
iommu: sun50i: clear bypass register
The Allwinner H6 IOMMU has a bypass register, which allows to circumvent the page tables for each possible master. The reset value for this register is 0, which disables the bypass. The Allwinner H616 IOMMU resets this register to 0x7f, which activates the bypass for all masters, which is not what we want. Always clear this register to 0, to enforce the usage of page tables, and make this driver compatible with the H616 in this respect. Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 83a7eef commit 927c70c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iommu/sun50i-iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ static int sun50i_iommu_enable(struct sun50i_iommu *iommu)
452452
IOMMU_TLB_PREFETCH_MASTER_ENABLE(3) |
453453
IOMMU_TLB_PREFETCH_MASTER_ENABLE(4) |
454454
IOMMU_TLB_PREFETCH_MASTER_ENABLE(5));
455+
iommu_write(iommu, IOMMU_BYPASS_REG, 0);
455456
iommu_write(iommu, IOMMU_INT_ENABLE_REG, IOMMU_INT_MASK);
456457
iommu_write(iommu, IOMMU_DM_AUT_CTRL_REG(SUN50I_IOMMU_ACI_NONE),
457458
IOMMU_DM_AUT_CTRL_RD_UNAVAIL(SUN50I_IOMMU_ACI_NONE, 0) |

0 commit comments

Comments
 (0)