summaryrefslogtreecommitdiffstats
path: root/include/zynqmp_firmware.h
diff options
context:
space:
mode:
authorIbai Erkiaga <ibai.erkiaga-elorza@xilinx.com>2020-08-04 23:17:26 +0100
committerMichal Simek <michal.simek@xilinx.com>2020-08-20 09:49:20 +0200
commitf6cccbb5f24ff7a19be84fb755d8566aee647244 (patch)
tree26bc4cd681a5332aaa92aff3c88c0e6946d78b4d /include/zynqmp_firmware.h
parente8deb2218509ffe686601b7e51091407fda58fbf (diff)
downloadu-boot-f6cccbb5f24ff7a19be84fb755d8566aee647244.tar.gz
u-boot-f6cccbb5f24ff7a19be84fb755d8566aee647244.tar.xz
u-boot-f6cccbb5f24ff7a19be84fb755d8566aee647244.zip
xilinx: zynqmp: synchronize firmware call return payload
Removes duplicated definition of PAYLOAD_ARG_CNT and define it in the firmware driver. Additionally fixes payload buffer declarations without macro usage Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/zynqmp_firmware.h')
-rw-r--r--include/zynqmp_firmware.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
index 93d771ece2..2c44951f86 100644
--- a/include/zynqmp_firmware.h
+++ b/include/zynqmp_firmware.h
@@ -77,6 +77,15 @@ enum pm_api_id {
#define PMUFW_V1_0 ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0)
+/*
+ * Return payload size
+ * Not every firmware call expects the same amount of return bytes, however the
+ * firmware driver always copies 5 bytes from RX buffer to the ret_payload
+ * buffer. Therefore allocating with this defined value is recommended to avoid
+ * overflows.
+ */
+#define PAYLOAD_ARG_CNT 5U
+
unsigned int zynqmp_firmware_version(void);
void 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,