firmware: arm_scmi: Introduce setup_shmem_iomap
authorPeng Fan <peng.fan@nxp.com>
Mon, 12 Aug 2024 17:33:33 +0000 (18:33 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 13 Aug 2024 11:15:12 +0000 (12:15 +0100)
commit1ebc28e9357cc1064c5ae79a4c87c6b424b10b6e
tree498dc20645f2b38b2ad909501d27e8ab3830c6e9
parente98dba934b2fc587eafb83f47ad64d9053b18ae0
firmware: arm_scmi: Introduce setup_shmem_iomap

To get the address of shmem could be generalized by introducing
setup_shmem_iomap. Then the duplicated code in mailbox.c, optee.c
and smc.c could be dropped.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
[ Cristian: use OF __free and make use of the new helper also in smc.c ]
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 19x19 EVK
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20240812173340.3912830-3-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/common.h
drivers/firmware/arm_scmi/mailbox.c
drivers/firmware/arm_scmi/optee.c
drivers/firmware/arm_scmi/shmem.c
drivers/firmware/arm_scmi/smc.c