xilinx: zynqmp: Rename pm_api members to use generic name
authorJolly Shah <jollys@xilinx.com>
Mon, 7 Jan 2019 20:51:40 +0000 (12:51 -0800)
committerJolly Shah <jollys@xilinx.com>
Wed, 9 Jan 2019 20:15:29 +0000 (12:15 -0800)
Use generic name for pm_api structure member, so that pm_api
structure can be used other Xilinx platforms.

Structure definition will be moved to common file in upcoming
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>
plat/xilinx/zynqmp/pm_service/pm_common.h
plat/xilinx/zynqmp/pm_service/pm_ipi.c

index 94e0568f6059c2617fbd1f300cc3068a88313c35..10899b885cbf7f11d5eae5d5d6356a5cf4a1f495 100644 (file)
 
 /**
  * pm_ipi - struct for capturing IPI-channel specific info
- * @apu_ipi_id APU IPI agent ID
- * @pmu_ipi_id PMU Agent ID
+ * @local_ipi_id       Local IPI agent ID
+ * @remote_ipi_id      Remote IPI Agent ID
  * @buffer_base        base address for payload buffer
  */
 struct pm_ipi {
-       const uint32_t apu_ipi_id;
-       const uint32_t pmu_ipi_id;
+       const uint32_t local_ipi_id;
+       const uint32_t remote_ipi_id;
        const uintptr_t buffer_base;
 };
 
index a9f0d755328b7f67caa146301bd16b725825a8e0..8aa61353872929dcb830d0285c3e778a9f342615 100644 (file)
@@ -35,8 +35,8 @@
 DEFINE_BAKERY_LOCK(pm_secure_lock);
 
 const struct pm_ipi apu_ipi = {
-       .apu_ipi_id = IPI_ID_APU,
-       .pmu_ipi_id = IPI_ID_PMU0,
+       .local_ipi_id = IPI_ID_APU,
+       .remote_ipi_id = IPI_ID_PMU0,
        .buffer_base = IPI_BUFFER_APU_BASE,
 };
 
@@ -53,7 +53,7 @@ const struct pm_ipi apu_ipi = {
 int pm_ipi_init(const struct pm_proc *proc)
 {
        bakery_lock_init(&pm_secure_lock);
-       ipi_mb_open(proc->ipi->apu_ipi_id, proc->ipi->pmu_ipi_id);
+       ipi_mb_open(proc->ipi->local_ipi_id, proc->ipi->remote_ipi_id);
 
        return 0;
 }
@@ -84,7 +84,7 @@ static enum pm_ret_status pm_ipi_send_common(const struct pm_proc *proc,
        }
 
        /* Generate IPI to PMU */
-       ipi_mb_notify(proc->ipi->apu_ipi_id, proc->ipi->pmu_ipi_id,
+       ipi_mb_notify(proc->ipi->local_ipi_id, proc->ipi->remote_ipi_id,
                      is_blocking);
 
        return PM_RET_SUCCESS;
@@ -226,10 +226,10 @@ unlock:
 
 void pm_ipi_irq_enable(const struct pm_proc *proc)
 {
-       ipi_mb_enable_irq(proc->ipi->apu_ipi_id, proc->ipi->pmu_ipi_id);
+       ipi_mb_enable_irq(proc->ipi->local_ipi_id, proc->ipi->remote_ipi_id);
 }
 
 void pm_ipi_irq_clear(const struct pm_proc *proc)
 {
-       ipi_mb_ack(proc->ipi->apu_ipi_id, proc->ipi->pmu_ipi_id);
+       ipi_mb_ack(proc->ipi->local_ipi_id, proc->ipi->remote_ipi_id);
 }