Skip to content

Commit e8415a8

Browse files
ronakj89michalsimek
authored andcommitted
firmware: xilinx: add a warning print for unsupported feature
As per the current code base, feature check API is used to check the version in zynqmp_pm_pinctrl_set_config() before requesting the firmware, and if the expected version is not found then it will return an error. So now when the latest kernel tries to access the tri-state functionality with older firmware, observe failure prints during booting. The failure prints, [ 1.204850] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: failed to set: pin 37 param 2 value 0 [ 2.699455] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: failed to set: pin 44 param 2 value 0 [ 2.708424] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: failed to set: pin 46 param 2 value 0 [ 2.717387] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: failed to set: pin 48 param 2 value 0 Now, these error prints mislead the user whether it is an actual failure or the feature itself is not there in the firmware. So, just to avoid confusion around this, add some debug prints before returning an error code. With that, it is easier to know whether it is an actual failure or the feature is unsupported. Signed-off-by: Ronak Jain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
1 parent f33d609 commit e8415a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/firmware/xilinx/zynqmp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,11 @@ int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
11181118
if (pm_family_code == ZYNQMP_FAMILY_CODE &&
11191119
param == PM_PINCTRL_CONFIG_TRI_STATE) {
11201120
ret = zynqmp_pm_feature(PM_PINCTRL_CONFIG_PARAM_SET);
1121-
if (ret < PM_PINCTRL_PARAM_SET_VERSION)
1121+
if (ret < PM_PINCTRL_PARAM_SET_VERSION) {
1122+
pr_warn("The requested pinctrl feature is not supported in the current firmware.\n"
1123+
"Expected firmware version is 2023.1 and above for this feature to work.\r\n");
11221124
return -EOPNOTSUPP;
1125+
}
11231126
}
11241127

11251128
return zynqmp_pm_invoke_fn(PM_PINCTRL_CONFIG_PARAM_SET, NULL, 3, pin, param, value);

0 commit comments

Comments
 (0)