Commit f621d5fb authored by Rajan Vaja's avatar Rajan Vaja
Browse files

plat: xilinx: versal: Remove code duplication



Some switch cases uses same operation. So, club switch cases
which uses same operation and remove duplicate code.
Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
Change-Id: I260b474c0ff3f2ca102c32d4af2e4abba2b8f57c
parent f03c4ea8
...@@ -832,6 +832,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version) ...@@ -832,6 +832,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
switch (api_id) { switch (api_id) {
case PM_GET_CALLBACK_DATA: case PM_GET_CALLBACK_DATA:
case PM_GET_TRUSTZONE_VERSION: case PM_GET_TRUSTZONE_VERSION:
case PM_LOAD_PDI:
*version = (PM_API_BASE_VERSION << 16); *version = (PM_API_BASE_VERSION << 16);
return PM_RET_SUCCESS; return PM_RET_SUCCESS;
case PM_GET_API_VERSION: case PM_GET_API_VERSION:
...@@ -857,11 +858,6 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version) ...@@ -857,11 +858,6 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
case PM_PINCTRL_CONFIG_PARAM_GET: case PM_PINCTRL_CONFIG_PARAM_GET:
case PM_PINCTRL_CONFIG_PARAM_SET: case PM_PINCTRL_CONFIG_PARAM_SET:
case PM_IOCTL: case PM_IOCTL:
*version = (PM_API_BASE_VERSION << 16);
break;
case PM_QUERY_DATA:
*version = (PM_API_QUERY_DATA_VERSION << 16);
break;
case PM_CLOCK_ENABLE: case PM_CLOCK_ENABLE:
case PM_CLOCK_DISABLE: case PM_CLOCK_DISABLE:
case PM_CLOCK_GETSTATE: case PM_CLOCK_GETSTATE:
...@@ -880,9 +876,9 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version) ...@@ -880,9 +876,9 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
case PM_REGISTER_NOTIFIER: case PM_REGISTER_NOTIFIER:
*version = (PM_API_BASE_VERSION << 16); *version = (PM_API_BASE_VERSION << 16);
break; break;
case PM_LOAD_PDI: case PM_QUERY_DATA:
*version = (PM_API_BASE_VERSION << 16); *version = (PM_API_QUERY_DATA_VERSION << 16);
return PM_RET_SUCCESS; break;
default: default:
*version = 0U; *version = 0U;
return PM_RET_ERROR_NOFEATURE; return PM_RET_ERROR_NOFEATURE;
......
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