]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ACPI/IORT: Introduce iort_node_map_platform_id() to retrieve dev id
authorHanjun Guo <hanjun.guo@linaro.org>
Tue, 7 Mar 2017 12:40:04 +0000 (20:40 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 29 Mar 2017 09:47:10 +0000 (10:47 +0100)
commit8ca4f1d3fbb85d8d87ca293500a69c3dc901beb9
treefd98839443531e848901d5b16fbf6694e9f504e3
parent697f609358685f20a798e0af2dc869b8c40bda32
ACPI/IORT: Introduce iort_node_map_platform_id() to retrieve dev id

To retrieve dev id for IORT named components nodes there are
two steps involved (second is optional):

(1) Retrieve the initial id (this may well provide the final mapping)
(2) Map the id (optional if (1) represents the map type we need), this
    is needed for use cases such as NC (named component) -> SMMU -> ITS
    mappings.

the iort_node_get_id() function was created for step (1) above and
iort_node_map_rid() for step (2).

Create a wrapper, named iort_node_map_platform_id(), that encompasses
the two steps at once to retrieve the dev id to provide steps (1)-(2)
functionality.

iort_node_map_platform_id() will handle the parent type so type handling
in iort_node_get_id() is duplicated, remove it and update current
iort_node_get_id() users to move them over to iort_node_map_platform_id().

Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Suggested-by: Tomasz Nowicki <tn@semihalf.com>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
[lorenzo.pieralisi@arm.com: rewrote commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Ming Lei <ming.lei@canonical.com>
Tested-by: Wei Xu <xuwei5@hisilicon.com>
Tested-by: Sinan Kaya <okaya@codeaurora.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Tomasz Nowicki <tn@semihalf.com>
drivers/acpi/arm64/iort.c