1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2015-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 * 7 * Description: 8 * PPU v0 driver module 9 */ 10 11 #ifndef MOD_PPU_V0_H 12 #define MOD_PPU_V0_H 13 14 #include <mod_power_domain.h> 15 16 #include <stdbool.h> 17 #include <stdint.h> 18 19 /*! 20 * \addtogroup GroupModules Modules 21 * \{ 22 */ 23 24 /*! 25 * \defgroup GroupModulePPUv0 PPUv0 Driver 26 * \{ 27 */ 28 29 /*! 30 * \brief Power domain PPU descriptor. 31 */ 32 struct mod_ppu_v0 { 33 /*! Base address of the PPU registers */ 34 uintptr_t reg_base; 35 36 /*! PPU's IRQ number */ 37 unsigned int irq; 38 }; 39 40 /*! 41 * \brief Timer for set_state. 42 * 43 * \details This structure is required to be filled in PPUv0 config file only 44 * when the timeout feature is required. 45 */ 46 struct mod_ppu_v0_timer_config { 47 /*! 48 * \brief Timer identifier. 49 * 50 * \details Used for binding with the timer API and waiting for specified 51 * delay after setting the PPU state. 52 */ 53 fwk_id_t timer_id; 54 55 /*! 56 * PPU state change wait delay in micro seconds. 57 * A valid non-zero value has to be specified when using this feature. 58 */ 59 uint32_t set_state_timeout_us; 60 }; 61 62 /*! 63 * \brief Configuration data of a power domain of the PPU_V0 driver module. 64 */ 65 struct mod_ppu_v0_pd_config { 66 /*! Power domain type */ 67 enum mod_pd_type pd_type; 68 69 /*! PPU descriptor */ 70 struct mod_ppu_v0 ppu; 71 72 /*! Timer descriptor */ 73 struct mod_ppu_v0_timer_config *timer_config; 74 75 /*! 76 * Flag indicating if this domain should be powered on during element init. 77 * Timeout is not provided at this stage. 78 */ 79 bool default_power_on; 80 }; 81 82 /*! 83 * \} 84 */ 85 86 /*! 87 * \} 88 */ 89 90 #endif /* MOD_PPU_V0_H */ 91