iommu/mediatek: Set dma_mask for the master devices
authorYong Wu <yong.wu@mediatek.com>
Tue, 11 Apr 2023 09:31:39 +0000 (17:31 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 13 Apr 2023 09:59:27 +0000 (11:59 +0200)
commitf7da2da8675b061f9397f2701c6cc21cb908291b
tree1da8dad196822c2d9de8350cf3d9a5c89da6b6f4
parent3df9bdd4ae8e41b526906f2f6e9fa2470a9bbbe0
iommu/mediatek: Set dma_mask for the master devices

MediaTek iommu arranges dma ranges for all the masters, this patch is to
help them set dma mask. This is to avoid each master setting their own
mask, but also to avoid a real issue, such as JPEG uses
"mediatek,mtk-jpgenc" for 2701/8183/8186/8188, then JPEG could ignore its
different dma_mask in different SoC to achieve common code.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230411093144.2690-10-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu.c