/** * pm_ipi_init() - Initialize IPI peripheral for communication with PMU * * @proc Pointer to the processor who is initiating request * @return On success, the initialization function must return 0. * Any other return value will cause the framework to ignore * the service * * Called from pm_setup initialization function */ 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); return 0; }
/** * pm_ipi_init() - Initialize IPI peripheral for communication with PMU * * @return On success, the initialization function must return 0. * Any other return value will cause the framework to ignore * the service * * Enable interrupts at registered entrance in IPI peripheral * Called from pm_setup initialization function */ int pm_ipi_init(void) { bakery_lock_init(&pm_secure_lock); /* IPI Interrupts Clear & Disable */ mmio_write_32(IPI_APU_ISR, 0xffffffff); mmio_write_32(IPI_APU_IDR, 0xffffffff); return 0; }
/* Nothing else to do here apart from initializing the lock */ int fvp_pwrc_setup(void) { bakery_lock_init(&pwrc_lock); return 0; }
void spm_lock_init(void) { bakery_lock_init(&spm_lock); }