mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
firmware: zynqmp: Change prototype of zynqmp_pmufw_load_config_object()
zynqmp_pmufw_load_config_object() has some error cases and it is better to return those errors. Change prototype of this function to return errors. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20220722084658.30995-2-ashok.reddy.soma@xilinx.com
This commit is contained in:
parent
9dac63b6f4
commit
c9f12ed9bc
2 changed files with 6 additions and 4 deletions
|
@ -227,7 +227,7 @@ int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id)
|
|||
* @cfg_obj: Pointer to the configuration object
|
||||
* @size: Size of @cfg_obj in bytes
|
||||
*/
|
||||
void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
|
||||
int zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
|
||||
{
|
||||
int err;
|
||||
u32 ret_payload[PAYLOAD_ARG_CNT];
|
||||
|
@ -241,12 +241,12 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
|
|||
0, ret_payload);
|
||||
if (err == XST_PM_NO_ACCESS) {
|
||||
printf("PMUFW no permission to change config object\n");
|
||||
return;
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
if (err == XST_PM_ALREADY_CONFIGURED) {
|
||||
debug("PMUFW Node is already configured\n");
|
||||
return;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
@ -257,6 +257,8 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
|
|||
|
||||
if ((err || ret_payload[0]) && IS_ENABLED(CONFIG_SPL_BUILD))
|
||||
panic("PMUFW config object loading failed in EL3\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int zynqmp_power_probe(struct udevice *dev)
|
||||
|
|
|
@ -447,7 +447,7 @@ enum pm_gem_config_type {
|
|||
unsigned int zynqmp_firmware_version(void);
|
||||
int zynqmp_pmufw_node(u32 id);
|
||||
int zynqmp_pmufw_config_close(void);
|
||||
void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size);
|
||||
int zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size);
|
||||
int xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2,
|
||||
u32 arg3, u32 *ret_payload);
|
||||
int zynqmp_pm_set_sd_config(u32 node, enum pm_sd_config_type config, u32 value);
|
||||
|
|
Loading…
Reference in a new issue