1*edcece15Srutigl@gmail.com /* 2*edcece15Srutigl@gmail.com * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. 3*edcece15Srutigl@gmail.com * 4*edcece15Srutigl@gmail.com * Copyright (c) 2017-2023 Nuvoton Technology Corp. 5*edcece15Srutigl@gmail.com * 6*edcece15Srutigl@gmail.com * SPDX-License-Identifier: BSD-3-Clause 7*edcece15Srutigl@gmail.com */ 8*edcece15Srutigl@gmail.com 9*edcece15Srutigl@gmail.com #ifndef PLAT_NPCM845X_H 10*edcece15Srutigl@gmail.com #define PLAT_NPCM845X_H 11*edcece15Srutigl@gmail.com 12*edcece15Srutigl@gmail.com #include <drivers/arm/gicv2.h> 13*edcece15Srutigl@gmail.com #include <lib/psci/psci.h> 14*edcece15Srutigl@gmail.com 15*edcece15Srutigl@gmail.com unsigned int plat_calc_core_pos(uint64_t mpidr); 16*edcece15Srutigl@gmail.com void npcm845x_mailbox_init(uintptr_t base_addr); 17*edcece15Srutigl@gmail.com void plat_gic_driver_init(void); 18*edcece15Srutigl@gmail.com void plat_gic_init(void); 19*edcece15Srutigl@gmail.com void plat_gic_cpuif_enable(void); 20*edcece15Srutigl@gmail.com void plat_gic_cpuif_disable(void); 21*edcece15Srutigl@gmail.com void plat_gic_pcpu_init(void); 22*edcece15Srutigl@gmail.com 23*edcece15Srutigl@gmail.com void __dead2 npcm845x_system_off(void); 24*edcece15Srutigl@gmail.com void __dead2 npcm845x_system_reset(void); 25*edcece15Srutigl@gmail.com void npcm845x_pwr_domain_on_finish(const psci_power_state_t *target_state); 26*edcece15Srutigl@gmail.com bool npcm845x_is_wakeup_src_irqsteer(void); 27*edcece15Srutigl@gmail.com void __dead2 npcm845x_pwr_down_wfi(const psci_power_state_t *target_state); 28*edcece15Srutigl@gmail.com void npcm845x_cpu_standby(plat_local_state_t cpu_state); 29*edcece15Srutigl@gmail.com int npcm845x_validate_ns_entrypoint(uintptr_t entrypoint); 30*edcece15Srutigl@gmail.com int npcm845x_pwr_domain_on(u_register_t mpidr); 31*edcece15Srutigl@gmail.com int npcm845x_validate_power_state(unsigned int power_state, 32*edcece15Srutigl@gmail.com psci_power_state_t *req_state); 33*edcece15Srutigl@gmail.com 34*edcece15Srutigl@gmail.com #if !ARM_BL31_IN_DRAM 35*edcece15Srutigl@gmail.com void npcm845x_get_sys_suspend_power_state(psci_power_state_t *req_state); 36*edcece15Srutigl@gmail.com #endif 37*edcece15Srutigl@gmail.com 38*edcece15Srutigl@gmail.com void __dead2 npcm845x_pwr_domain_pwr_down_wfi( 39*edcece15Srutigl@gmail.com const psci_power_state_t *target_state); 40*edcece15Srutigl@gmail.com void npcm845x_pwr_domain_suspend_finish(const psci_power_state_t *target_state); 41*edcece15Srutigl@gmail.com void npcm845x_pwr_domain_suspend(const psci_power_state_t *target_state); 42*edcece15Srutigl@gmail.com void npcm845x_pwr_domain_off(const psci_power_state_t *target_state); 43*edcece15Srutigl@gmail.com void __init npcm845x_bl31_plat_arch_setup(void); 44*edcece15Srutigl@gmail.com 45*edcece15Srutigl@gmail.com #endif /* PLAT_NPCM845X_H */ 46