iommu: rockchip: Add internal ops to handle variants
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Fri, 4 Jun 2021 16:44:40 +0000 (18:44 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 9 Jun 2021 07:48:36 +0000 (09:48 +0200)
commit227014b33f62f93a462f8125038ef6609d7a1572
treea982697ba7602bf3abab88f47833d19b67d03a3d
parent9e6f3cd589cb711b5949cfbeb84e5440906195bd
iommu: rockchip: Add internal ops to handle variants

Add internal ops to be able to handle incoming variant v2.
The goal is to keep the overall structure of the framework but
to allow to add the evolution of this hardware block.

The ops are global for a SoC because iommu domains are not
attached to a specific devices if they are for a virtuel device like
drm. Use a global variable shouldn't be since SoC usually doesn't
embedded different versions of the iommu hardware block.
If that happen one day a WARN_ON will be displayed at probe time.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210604164441.798362-4-benjamin.gaignard@collabora.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/rockchip-iommu.c