iommu/mediatek: Add mtk_iommu_bank_data structure
authorYong Wu <yong.wu@mediatek.com>
Tue, 3 May 2022 07:14:20 +0000 (15:14 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 May 2022 08:39:40 +0000 (10:39 +0200)
commit99ca02281332957e0ee7e3702c4713dfae4a6046
treeb15cafdaba9a22d8cea5710547ccb81cc189bf65
parentad9b10e533f6fb3fa74afdc2341774b1305c176f
iommu/mediatek: Add mtk_iommu_bank_data structure

Prepare for supporting multi-banks for the IOMMU HW, No functional change.

Add a new structure(mtk_iommu_bank_data) for each a bank. Each a bank have
the independent HW base/IRQ/tlb-range ops, and each a bank has its special
iommu-domain(independent pgtable), thus, also move the domain information
into it.

In previous SoC, we have only one bank which could be treated as bank0(
bankid always is 0 for the previous SoC).

After adding this structure, the tlb operations and irq could use
bank_data as parameter.

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-30-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu.c