diff --git a/plat/xilinx/zynqmp/pm_service/pm_ipi.c b/plat/xilinx/zynqmp/pm_service/pm_ipi.c index 8aa6135..c73c92f 100644 --- a/plat/xilinx/zynqmp/pm_service/pm_ipi.c +++ b/plat/xilinx/zynqmp/pm_service/pm_ipi.c @@ -21,8 +21,11 @@ #define IPI_BUFFER_APU_BASE (IPI_BUFFER_BASEADDR + 0x400U) #define IPI_BUFFER_PMU_BASE (IPI_BUFFER_BASEADDR + 0xE00U) -#define IPI_BUFFER_TARGET_APU_OFFSET 0x80U -#define IPI_BUFFER_TARGET_PMU_OFFSET 0x1C0U +#define IPI_BUFFER_LOCAL_BASE IPI_BUFFER_APU_BASE +#define IPI_BUFFER_REMOTE_BASE IPI_BUFFER_PMU_BASE + +#define IPI_BUFFER_TARGET_LOCAL_OFFSET 0x80U +#define IPI_BUFFER_TARGET_REMOTE_OFFSET 0x1C0U #define IPI_BUFFER_MAX_WORDS 8 @@ -41,7 +44,8 @@ }; /** - * pm_ipi_init() - Initialize IPI peripheral for communication with PMU + * pm_ipi_init() - Initialize IPI peripheral for communication with + * remote processor * * @proc Pointer to the processor who is initiating request * @return On success, the initialization function must return 0. @@ -59,7 +63,7 @@ } /** - * pm_ipi_send_common() - Sends IPI request to the PMU + * pm_ipi_send_common() - Sends IPI request to the remote processor * @proc Pointer to the processor who is initiating request * @payload API id and call arguments to be written in IPI buffer * @@ -74,7 +78,7 @@ { unsigned int offset = 0; uintptr_t buffer_base = proc->ipi->buffer_base + - IPI_BUFFER_TARGET_PMU_OFFSET + + IPI_BUFFER_TARGET_REMOTE_OFFSET + IPI_BUFFER_REQ_OFFSET; /* Write payload into IPI buffer */ @@ -83,7 +87,7 @@ offset += PAYLOAD_ARG_SIZE; } - /* Generate IPI to PMU */ + /* Generate IPI to remote processor */ ipi_mb_notify(proc->ipi->local_ipi_id, proc->ipi->remote_ipi_id, is_blocking); @@ -91,8 +95,8 @@ } /** - * pm_ipi_send_non_blocking() - Sends IPI request to the PMU without blocking - * notification + * pm_ipi_send_non_blocking() - Sends IPI request to the remote processor + * without blocking notification * @proc Pointer to the processor who is initiating request * @payload API id and call arguments to be written in IPI buffer * @@ -115,7 +119,7 @@ } /** - * pm_ipi_send() - Sends IPI request to the PMU + * pm_ipi_send() - Sends IPI request to the remote processor * @proc Pointer to the processor who is initiating request * @payload API id and call arguments to be written in IPI buffer * @@ -139,7 +143,8 @@ /** - * pm_ipi_buff_read() - Reads IPI response after PMU has handled interrupt + * pm_ipi_buff_read() - Reads IPI response after remote processor has handled + * interrupt * @proc Pointer to the processor who is waiting and reading response * @value Used to return value from IPI buffer element (optional) * @count Number of values to return in @value @@ -151,7 +156,7 @@ { size_t i; uintptr_t buffer_base = proc->ipi->buffer_base + - IPI_BUFFER_TARGET_PMU_OFFSET + + IPI_BUFFER_TARGET_REMOTE_OFFSET + IPI_BUFFER_RESP_OFFSET; /* @@ -170,7 +175,8 @@ } /** - * pm_ipi_buff_read_callb() - Reads IPI response after PMU has handled interrupt + * pm_ipi_buff_read_callb() - Reads IPI response after remote processor has + * handled interrupt * @value Used to return value from IPI buffer element (optional) * @count Number of values to return in @value * @@ -179,8 +185,8 @@ void pm_ipi_buff_read_callb(unsigned int *value, size_t count) { size_t i; - uintptr_t buffer_base = IPI_BUFFER_PMU_BASE + - IPI_BUFFER_TARGET_APU_OFFSET + + uintptr_t buffer_base = IPI_BUFFER_REMOTE_BASE + + IPI_BUFFER_TARGET_LOCAL_OFFSET + IPI_BUFFER_REQ_OFFSET; if (count > IPI_BUFFER_MAX_WORDS) @@ -193,7 +199,7 @@ } /** - * pm_ipi_send_sync() - Sends IPI request to the PMU + * pm_ipi_send_sync() - Sends IPI request to the remote processor * @proc Pointer to the processor who is initiating request * @payload API id and call arguments to be written in IPI buffer * @value Used to return value from IPI buffer element (optional)