Commits
Suman Anna committed 94e892d43ff
iommu/omap: add support to program multiple iommus A client user instantiates and attaches to an iommu_domain to program the IOMMU associated with the domain. The iommus programmed by a client user are bound with the iommu_domain through the user's device archdata. The OMAP IOMMU driver currently supports only one IOMMU per IOMMU domain per user. The OMAP IOMMU driver has been enhanced to support allowing multiple IOMMUs to be programmed by a single client user. This support is being added mainly to handle the DSP subsystems in the DRA7xx SoCs, which have two MMUs within the same subsystem. These MMUs provide translations to a processor core port and an EDMA port. This support allows both the MMUs to be programmed together, but with each one retaining it's own internal state objects. The multiple iommus are expected to be provided through a sentinel terminated array of omap_iommu_archdata objects through the client user's device archdata. The OMAP driver core is enhanced to loop through the array of attached iommus and program them for all common operations. NOTE: 1. The dev_to_omap_iommu() macro which operates on a device's archdata is not adjusted, as its current users can work without any additional changes. The OMAP iommu debug code relies on operating on each individual iommu object. 2. OMAP IOMMU driver no longer supports non-DT devices or users. The reliance on omap_iommu_archdata structure can be simplified as the dependence on IOMMU names vanishes with non-DT support. The conversion to sentinel-terminated form is done automatically for now for DT-based devices that still leverage the IOMMU device name. Signed-off-by: Suman Anna <s-anna@ti.com>