aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-12-05 17:17:19 -0500
committerSudeep Holla <sudeep.holla@arm.com>2018-02-23 10:13:34 -0500
commit62c60efb63c868c1b1e54a1138c3295deae76eda (patch)
tree827624875666e2bfb599ac2fe4b56fd89855d1ad
parent96fe77b6d4762604ba034d57319ad6c4ef071205 (diff)
firmware: arm_scpi: improve info message for pre-1.0 firmware
On legacy pre-1.0 firmware versions so far the following message is printed which may cause some confusion: SCP Protocol 0.0 Firmware 0.0.0 version Therefore replace the message with the following if firmware doesn't provide usable version information: SCP Protocol legacy pre-1.0 firmware Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r--drivers/firmware/arm_scpi.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index bc7055a6a617..6d7a6c0a5e07 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -1005,12 +1005,21 @@ static int scpi_probe(struct platform_device *pdev)
1005 return ret; 1005 return ret;
1006 } 1006 }
1007 1007
1008 dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", 1008 if (scpi_info->is_legacy && !scpi_info->protocol_version &&
1009 FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), 1009 !scpi_info->firmware_version)
1010 FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version), 1010 dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
1011 FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), 1011 else
1012 FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), 1012 dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
1013 FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); 1013 FIELD_GET(PROTO_REV_MAJOR_MASK,
1014 scpi_info->protocol_version),
1015 FIELD_GET(PROTO_REV_MINOR_MASK,
1016 scpi_info->protocol_version),
1017 FIELD_GET(FW_REV_MAJOR_MASK,
1018 scpi_info->firmware_version),
1019 FIELD_GET(FW_REV_MINOR_MASK,
1020 scpi_info->firmware_version),
1021 FIELD_GET(FW_REV_PATCH_MASK,
1022 scpi_info->firmware_version));
1014 scpi_info->scpi_ops = &scpi_ops; 1023 scpi_info->scpi_ops = &scpi_ops;
1015 1024
1016 ret = devm_device_add_groups(dev, versions_groups); 1025 ret = devm_device_add_groups(dev, versions_groups);