• Oleksandr Tyshchenko's avatar
    iommu/arm: Introduce iommu_add_dt_device API · 3e27f7d4
    Oleksandr Tyshchenko authored
    The main puprose of this patch is to add a way to register DT device
    (which is behind the IOMMU) using the generic IOMMU DT bindings [1]
    before assigning that device to a domain.
    
    So, this patch adds new "iommu_add_dt_device" API for adding DT device
    to the IOMMU using generic IOMMU DT bindings and previously added
    "iommu_fwspec" support. As devices can be assigned to the hardware domain
    and other domains this function is called from two places: handle_device()
    and iommu_do_dt_domctl().
    
    Besides that, this patch adds new "dt_xlate" callback (borrowed from
    Linux "of_xlate") for providing the driver with DT IOMMU specifier
    which describes the IOMMU master interfaces of that device (device IDs, etc).
    According to the generic IOMMU DT bindings the context of required
    properties for IOMMU device/master node (#iommu-cells, iommus) depends
    on many factors and is really driver depended thing.
    
    Please note, all IOMMU drivers which support generic IOMMU DT bindings
    should use "dt_xlate" and "add_device" callbacks.
    
    [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/iommu/iommu.txt
    
    Signed-off-by: default avatarOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    Acked-by: default avatarJulien Grall <julien.grall@arm.com>
    Acked-by: default avatarJan Beulich <jbeulich@suse.com>
    3e27f7d4
device_tree.c 7.26 KB