Commit 62c60efb authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Sudeep Holla

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: default avatarKevin Hilman <khilman@baylibre.com>
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 96fe77b6
...@@ -1005,12 +1005,21 @@ static int scpi_probe(struct platform_device *pdev) ...@@ -1005,12 +1005,21 @@ static int scpi_probe(struct platform_device *pdev)
return ret; return ret;
} }
dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", if (scpi_info->is_legacy && !scpi_info->protocol_version &&
FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), !scpi_info->firmware_version)
FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version), dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), else
FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); FIELD_GET(PROTO_REV_MAJOR_MASK,
scpi_info->protocol_version),
FIELD_GET(PROTO_REV_MINOR_MASK,
scpi_info->protocol_version),
FIELD_GET(FW_REV_MAJOR_MASK,
scpi_info->firmware_version),
FIELD_GET(FW_REV_MINOR_MASK,
scpi_info->firmware_version),
FIELD_GET(FW_REV_PATCH_MASK,
scpi_info->firmware_version));
scpi_info->scpi_ops = &scpi_ops; scpi_info->scpi_ops = &scpi_ops;
ret = devm_device_add_groups(dev, versions_groups); ret = devm_device_add_groups(dev, versions_groups);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment