summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/arm_scpi.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2021-06-12 08:42:27 -0700
committerOlof Johansson <olof@lixom.net>2021-06-12 08:42:29 -0700
commit959cd8f125bdafc0af197252554b662b5e18967b (patch)
tree00f57ec37c8544d59be01014898915ea4bf480d2 /drivers/firmware/arm_scpi.c
parentadbb411b97d4b72ef9be48ac9a21823ed43cabfa (diff)
parent61832b35b4d953b2b4f6c668a3ad2a3013f40532 (diff)
downloadlinux-stable-959cd8f125bdafc0af197252554b662b5e18967b.tar.gz
linux-stable-959cd8f125bdafc0af197252554b662b5e18967b.tar.bz2
linux-stable-959cd8f125bdafc0af197252554b662b5e18967b.zip
Merge tag 'scmi-updates-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers
ARM SCMI updates for v5.14 - Support for SCMI clocks from the SCMI power domains - Addition of checks for correct compatibles for shmem devicetree nodes that were found missing in the process of YAML schema conversion - Kconfig and associated build fix found when optee transport are being worked on - Couple of fixes and cleanups found as with work-in-progress virtio transport support The new transports(optee and virtio) themselves are still being worked on with ongoing reviews, they are not part of this yet * tag 'scmi-updates-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Avoid multiple initialisations of hdr->protocol_id firmware: arm_scmi: Move reinit_completion from scmi_xfer_get to do_xfer firmware: arm_scmi: Add delayed response status check firmware: arm_scmi: Add compatibility checks for shmem node firmware: arm_scpi: Add compatibility checks for shmem node firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected firmware: arm_scmi: Reset Rx buffer to max size during async commands firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig firmware: arm_scmi: Add clock management to the SCMI power domain Link: https://lore.kernel.org/r/20210611075722.2813550-1-sudeep.holla@arm.com Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/firmware/arm_scpi.c')
-rw-r--r--drivers/firmware/arm_scpi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 4ceba5ef7895..ddf0b9ff9e15 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -899,6 +899,14 @@ static const struct of_device_id legacy_scpi_of_match[] = {
{},
};
+static const struct of_device_id shmem_of_match[] __maybe_unused = {
+ { .compatible = "amlogic,meson-gxbb-scp-shmem", },
+ { .compatible = "amlogic,meson-axg-scp-shmem", },
+ { .compatible = "arm,juno-scp-shmem", },
+ { .compatible = "arm,scp-shmem", },
+ { }
+};
+
static int scpi_probe(struct platform_device *pdev)
{
int count, idx, ret;
@@ -935,6 +943,9 @@ static int scpi_probe(struct platform_device *pdev)
struct mbox_client *cl = &pchan->cl;
struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
+ if (!of_match_node(shmem_of_match, shmem))
+ return -ENXIO;
+
ret = of_address_to_resource(shmem, 0, &res);
of_node_put(shmem);
if (ret) {