OSDN Git Service

iommu/mediatek: Contain MM IOMMU flow with the MM TYPE
authorYong Wu <yong.wu@mediatek.com>
Tue, 3 May 2022 07:14:08 +0000 (15:14 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 May 2022 08:39:39 +0000 (10:39 +0200)
commitd2e9a1102cfc22c08450875faa667a60f0b1b1f6
tree7b2868983ad2990e40b39d84be9ce01f54d98dcd
parent8cd1e619e79b5bdcd6fc346324a89e25c3325fde
iommu/mediatek: Contain MM IOMMU flow with the MM TYPE

Prepare for supporting INFRA_IOMMU, and APU_IOMMU later.

For Infra IOMMU/APU IOMMU, it doesn't have the "larb""port". thus, Use
the MM flag contain the MM_IOMMU special flow, Also, it moves a big
chunk code about parsing the mediatek,larbs into a function, this is
only needed for MM IOMMU. and all the current SoC are MM_IOMMU.

The device link between iommu consumer device and smi-larb device only
is needed in MM iommu case.

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