iommu/mediatek: Merge 2 M4U HWs into one iommu domain
authorYong Wu <yong.wu@mediatek.com>
Mon, 21 Aug 2017 11:00:17 +0000 (19:00 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 22 Aug 2017 14:37:59 +0000 (16:37 +0200)
commit7c3a2ec02806a6f83270f34f8ab4e501e7d8ea69
tree883982558e8cc0ae2e19ae29dc3b7f92f33459cb
parente6dec92308628cff5f1f8bd1bcdf87581c9dc676
iommu/mediatek: Merge 2 M4U HWs into one iommu domain

In theory, If there are 2 M4U HWs, there should be 2 IOMMU domains.
But one IOMMU domain(4GB iova range) is enough for us currently,
It's unnecessary to maintain 2 pagetables.

Besides, This patch can simplify our consumer code largely. They don't
need map a iova range from one domain into another, They can share the
iova address easily.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu.c
drivers/iommu/mtk_iommu.h