diff options
author | Yong Wu <yong.wu@mediatek.com> | 2022-05-03 15:14:03 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-05-04 10:39:39 +0200 |
commit | d265a4addc9c118d2467177b77a78a9956ddb2d5 (patch) | |
tree | f7112eb239615bd1101a0b2cbeac05858ccf0b13 /drivers/iommu/mtk_iommu.c | |
parent | 9a87005ed9c2a2135e15e03d97de849577d29437 (diff) | |
download | linux-stable-d265a4addc9c118d2467177b77a78a9956ddb2d5.tar.gz linux-stable-d265a4addc9c118d2467177b77a78a9956ddb2d5.tar.bz2 linux-stable-d265a4addc9c118d2467177b77a78a9956ddb2d5.zip |
iommu/mediatek: Add a flag STD_AXI_MODE
Add a new flag STD_AXI_MODE which is prepared for infra and apu iommu
which use the standard axi mode. All the current SoC don't use this flag.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20220503071427.2285-13-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/mtk_iommu.c')
-rw-r--r-- | drivers/iommu/mtk_iommu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 92f172a772d1..22e2b104e3ee 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -122,6 +122,7 @@ #define IOVA_34_EN BIT(8) #define SHARE_PGTABLE BIT(9) /* 2 HW share pgtable */ #define DCM_DISABLE BIT(10) +#define STD_AXI_MODE BIT(11) /* For non MM iommu */ #define MTK_IOMMU_HAS_FLAG(pdata, _x) \ ((((pdata)->flags) & (_x)) == (_x)) @@ -785,7 +786,8 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data) regval = 0; } else { regval = readl_relaxed(data->base + REG_MMU_MISC_CTRL); - regval &= ~F_MMU_STANDARD_AXI_MODE_MASK; + if (!MTK_IOMMU_HAS_FLAG(data->plat_data, STD_AXI_MODE)) + regval &= ~F_MMU_STANDARD_AXI_MODE_MASK; if (MTK_IOMMU_HAS_FLAG(data->plat_data, OUT_ORDER_WR_EN)) regval &= ~F_MMU_IN_ORDER_WR_EN_MASK; } |