• Hanjun Guo's avatar
    ACPI/IORT: Look up IORT node through struct fwnode_handle pointer · 0a71d8b9
    Hanjun Guo authored
    Current IORT code provides a function (ie iort_get_fwnode())
    which looks up a struct fwnode_handle pointer through a
    struct acpi_iort_node pointer for SMMU components but it
    lacks a function that implements the reverse look-up, namely
    struct fwnode_handle* -> struct acpi_iort_node*.
    
    Devices that are not IORT named components cannot be retrieved through
    their associated IORT named component scan interface because they just
    are not represented in the ACPI namespace; the reverse look-up is
    therefore required for all platform devices that represent IORT nodes
    (eg SMMUs) so that the struct acpi_iort_node* can be retrieved from the
    struct device->fwnode pointer.
    Signed-off-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
    [lorenzo.pieralisi@arm.com: re-indented/rewrote the commit log]
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    0a71d8b9
iort.c 31.1 KB