xilinx: pm_service: Rename macros to use generic macro names
ZynqMP pm_service ipi file uses platform specific macros names. pm_service ipi functions can be used by other Xilinx platforms also. Make rename macros to use generic names so that it can be used by common file. pm_service ipi functions will be moved to common file in next patch. Signed-off-by: Tejas Patel <tejas.patel@xilinx.com> Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Jolly Shah <jollys@xilinx.com>
This commit is contained in:
parent
28e4d37093
commit
5bd029bcfe
|
@ -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 @@ const struct pm_ipi apu_ipi = {
|
|||
};
|
||||
|
||||
/**
|
||||
* 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 @@ int pm_ipi_init(const struct pm_proc *proc)
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 @@ static enum pm_ret_status pm_ipi_send_common(const struct pm_proc *proc,
|
|||
{
|
||||
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 @@ static enum pm_ret_status pm_ipi_send_common(const struct pm_proc *proc,
|
|||
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 @@ static enum pm_ret_status pm_ipi_send_common(const struct pm_proc *proc,
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 @@ enum pm_ret_status pm_ipi_send_non_blocking(const struct pm_proc *proc,
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 @@ enum pm_ret_status pm_ipi_send(const struct pm_proc *proc,
|
|||
|
||||
|
||||
/**
|
||||
* 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 @@ static enum pm_ret_status pm_ipi_buff_read(const struct pm_proc *proc,
|
|||
{
|
||||
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 @@ static enum pm_ret_status pm_ipi_buff_read(const struct pm_proc *proc,
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 @@ static enum pm_ret_status pm_ipi_buff_read(const struct pm_proc *proc,
|
|||
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 @@ void pm_ipi_buff_read_callb(unsigned int *value, size_t count)
|
|||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
|
|
Loading…
Reference in New Issue