]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iommu/mediatek-v1: Add def_domain_type
authorYong Wu <yong.wu@mediatek.com>
Fri, 15 May 2020 08:08:43 +0000 (16:08 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 May 2020 13:42:07 +0000 (15:42 +0200)
commit8bbe13f52cb79666ada12033f04bdeb4741b7188
treeec1cc827e7e0b222d737420bd6ef05e0bc827ee5
parent5df362a53f7d36e032668e7e6725d80622b98525
iommu/mediatek-v1: Add def_domain_type

The MediaTek V1 IOMMU is arm32 whose default domain type is
IOMMU_DOMAIN_UNMANAGED. Add this to satisfy the bus_iommu_probe to
enter "probe_finalize".

The iommu framework will create a iommu domain for each a device.
But all the devices share a iommu domain here, thus we skip all the
other domains in the "attach_device" except the domain we create
internally with arm_iommu_create_mapping.

Also a minor change: in the attach_device, "data" always is not null.
Remove "if (!data) return".

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/1589530123-30240-1-git-send-email-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu_v1.c