1b4315306SDan Handley /* 2e6937287SZelalem * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. 3b4315306SDan Handley * 482cb2c1aSdp-arm * SPDX-License-Identifier: BSD-3-Clause 5b4315306SDan Handley */ 6b4315306SDan Handley 7785fb92bSSoby Mathew #include <assert.h> 809d40e0eSAntonio Nino Diaz 9b4315306SDan Handley #include <platform_def.h> 1009d40e0eSAntonio Nino Diaz 1109d40e0eSAntonio Nino Diaz #include <arch_helpers.h> 1209d40e0eSAntonio Nino Diaz #include <common/debug.h> 132d4135e0SAntonio Nino Diaz #include <drivers/arm/css/css_scp.h> 1409d40e0eSAntonio Nino Diaz #include <lib/cassert.h> 15bd9344f6SAntonio Nino Diaz #include <plat/arm/common/plat_arm.h> 16bd9344f6SAntonio Nino Diaz #include <plat/arm/css/common/css_pm.h> 1709d40e0eSAntonio Nino Diaz 18785fb92bSSoby Mathew /* Allow CSS platforms to override `plat_arm_psci_pm_ops` */ 19785fb92bSSoby Mathew #pragma weak plat_arm_psci_pm_ops 2038dce70fSSoby Mathew 212204afdeSSoby Mathew #if ARM_RECOM_STATE_ID_ENC 222204afdeSSoby Mathew /* 232204afdeSSoby Mathew * The table storing the valid idle power states. Ensure that the 242204afdeSSoby Mathew * array entries are populated in ascending order of state-id to 252204afdeSSoby Mathew * enable us to use binary search during power state validation. 262204afdeSSoby Mathew * The table must be terminated by a NULL entry. 272204afdeSSoby Mathew */ 282204afdeSSoby Mathew const unsigned int arm_pm_idle_states[] = { 295f3a6030SSoby Mathew /* State-id - 0x001 */ 305f3a6030SSoby Mathew arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_RUN, 315f3a6030SSoby Mathew ARM_LOCAL_STATE_RET, ARM_PWR_LVL0, PSTATE_TYPE_STANDBY), 325f3a6030SSoby Mathew /* State-id - 0x002 */ 335f3a6030SSoby Mathew arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_RUN, 345f3a6030SSoby Mathew ARM_LOCAL_STATE_OFF, ARM_PWR_LVL0, PSTATE_TYPE_POWERDOWN), 355f3a6030SSoby Mathew /* State-id - 0x022 */ 365f3a6030SSoby Mathew arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_OFF, 375f3a6030SSoby Mathew ARM_LOCAL_STATE_OFF, ARM_PWR_LVL1, PSTATE_TYPE_POWERDOWN), 385f3a6030SSoby Mathew #if PLAT_MAX_PWR_LVL > ARM_PWR_LVL1 395f3a6030SSoby Mathew /* State-id - 0x222 */ 405f3a6030SSoby Mathew arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_OFF, ARM_LOCAL_STATE_OFF, 415f3a6030SSoby Mathew ARM_LOCAL_STATE_OFF, ARM_PWR_LVL2, PSTATE_TYPE_POWERDOWN), 425f3a6030SSoby Mathew #endif 432204afdeSSoby Mathew 0, 442204afdeSSoby Mathew }; 455f3a6030SSoby Mathew #endif /* __ARM_RECOM_STATE_ID_ENC__ */ 462204afdeSSoby Mathew 47c1bb8a05SSoby Mathew /* 48c1bb8a05SSoby Mathew * All the power management helpers in this file assume at least cluster power 49c1bb8a05SSoby Mathew * level is supported. 50c1bb8a05SSoby Mathew */ 51c1bb8a05SSoby Mathew CASSERT(PLAT_MAX_PWR_LVL >= ARM_PWR_LVL1, 52c1bb8a05SSoby Mathew assert_max_pwr_lvl_supported_mismatch); 53c1bb8a05SSoby Mathew 54abd2aba9SSoby Mathew /* 55abd2aba9SSoby Mathew * Ensure that the PLAT_MAX_PWR_LVL is not greater than CSS_SYSTEM_PWR_DMN_LVL 56abd2aba9SSoby Mathew * assumed by the CSS layer. 57abd2aba9SSoby Mathew */ 58abd2aba9SSoby Mathew CASSERT(PLAT_MAX_PWR_LVL <= CSS_SYSTEM_PWR_DMN_LVL, 59abd2aba9SSoby Mathew assert_max_pwr_lvl_higher_than_css_sys_lvl); 60abd2aba9SSoby Mathew 61b4315306SDan Handley /******************************************************************************* 6238dce70fSSoby Mathew * Handler called when a power domain is about to be turned on. The 63b4315306SDan Handley * level and mpidr determine the affinity instance. 64b4315306SDan Handley ******************************************************************************/ 6538dce70fSSoby Mathew int css_pwr_domain_on(u_register_t mpidr) 66b4315306SDan Handley { 67b12a2b49SSoby Mathew css_scp_on(mpidr); 68b4315306SDan Handley 69b4315306SDan Handley return PSCI_E_SUCCESS; 70b4315306SDan Handley } 71b4315306SDan Handley 72f14d1886SSoby Mathew static void css_pwr_domain_on_finisher_common( 73f14d1886SSoby Mathew const psci_power_state_t *target_state) 74b4315306SDan Handley { 75f14d1886SSoby Mathew assert(CSS_CORE_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF); 76c1bb8a05SSoby Mathew 77b4315306SDan Handley /* 78b4315306SDan Handley * Perform the common cluster specific operations i.e enable coherency 79b4315306SDan Handley * if this cluster was off. 80b4315306SDan Handley */ 81f14d1886SSoby Mathew if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF) 826355f234SVikram Kanigiri plat_arm_interconnect_enter_coherency(); 83c1bb8a05SSoby Mathew } 84c1bb8a05SSoby Mathew 85f14d1886SSoby Mathew /******************************************************************************* 86f14d1886SSoby Mathew * Handler called when a power level has just been powered on after 87f14d1886SSoby Mathew * being turned off earlier. The target_state encodes the low power state that 88f14d1886SSoby Mathew * each level has woken up from. This handler would never be invoked with 89f14d1886SSoby Mathew * the system power domain uninitialized as either the primary would have taken 90f14d1886SSoby Mathew * care of it as part of cold boot or the first core awakened from system 91f14d1886SSoby Mathew * suspend would have already initialized it. 92f14d1886SSoby Mathew ******************************************************************************/ 93f14d1886SSoby Mathew void css_pwr_domain_on_finish(const psci_power_state_t *target_state) 94f14d1886SSoby Mathew { 95f14d1886SSoby Mathew /* Assert that the system power domain need not be initialized */ 969b4c611cSNariman Poushin assert(css_system_pwr_state(target_state) == ARM_LOCAL_STATE_RUN); 97f14d1886SSoby Mathew 986806cd23SMadhukar Pappireddy css_pwr_domain_on_finisher_common(target_state); 996806cd23SMadhukar Pappireddy } 1006806cd23SMadhukar Pappireddy 1016806cd23SMadhukar Pappireddy /******************************************************************************* 1026806cd23SMadhukar Pappireddy * Handler called when a power domain has just been powered on and the cpu 1036806cd23SMadhukar Pappireddy * and its cluster are fully participating in coherent transaction on the 1046806cd23SMadhukar Pappireddy * interconnect. Data cache must be enabled for CPU at this point. 1056806cd23SMadhukar Pappireddy ******************************************************************************/ 1066806cd23SMadhukar Pappireddy void css_pwr_domain_on_finish_late(const psci_power_state_t *target_state) 1076806cd23SMadhukar Pappireddy { 10827573c59SAchin Gupta /* Program the gic per-cpu distributor or re-distributor interface */ 10927573c59SAchin Gupta plat_arm_gic_pcpu_init(); 11027573c59SAchin Gupta 1116806cd23SMadhukar Pappireddy /* Enable the gic cpu interface */ 1126806cd23SMadhukar Pappireddy plat_arm_gic_cpuif_enable(); 113b4315306SDan Handley } 114b4315306SDan Handley 115b4315306SDan Handley /******************************************************************************* 116b4315306SDan Handley * Common function called while turning a cpu off or suspending it. It is called 117b4315306SDan Handley * from css_off() or css_suspend() when these functions in turn are called for 11838dce70fSSoby Mathew * power domain at the highest power level which will be powered down. It 11938dce70fSSoby Mathew * performs the actions common to the OFF and SUSPEND calls. 120b4315306SDan Handley ******************************************************************************/ 12138dce70fSSoby Mathew static void css_power_down_common(const psci_power_state_t *target_state) 122b4315306SDan Handley { 123b4315306SDan Handley /* Prevent interrupts from spuriously waking up this cpu */ 12427573c59SAchin Gupta plat_arm_gic_cpuif_disable(); 125b4315306SDan Handley 126b4315306SDan Handley /* Cluster is to be turned off, so disable coherency */ 127*9cf7f355SMadhukar Pappireddy if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF) { 1286355f234SVikram Kanigiri plat_arm_interconnect_exit_coherency(); 129*9cf7f355SMadhukar Pappireddy 130*9cf7f355SMadhukar Pappireddy #if HW_ASSISTED_COHERENCY 131*9cf7f355SMadhukar Pappireddy uint32_t reg; 132*9cf7f355SMadhukar Pappireddy 133*9cf7f355SMadhukar Pappireddy /* 134*9cf7f355SMadhukar Pappireddy * If we have determined this core to be the last man standing and we 135*9cf7f355SMadhukar Pappireddy * intend to power down the cluster proactively, we provide a hint to 136*9cf7f355SMadhukar Pappireddy * the power controller that cluster power is not required when all 137*9cf7f355SMadhukar Pappireddy * cores are powered down. 138*9cf7f355SMadhukar Pappireddy * Note that this is only an advisory to power controller and is supported 139*9cf7f355SMadhukar Pappireddy * by SoCs with DynamIQ Shared Units only. 140*9cf7f355SMadhukar Pappireddy */ 141*9cf7f355SMadhukar Pappireddy reg = read_clusterpwrdn(); 142*9cf7f355SMadhukar Pappireddy 143*9cf7f355SMadhukar Pappireddy /* Clear and set bit 0 : Cluster power not required */ 144*9cf7f355SMadhukar Pappireddy reg &= ~DSU_CLUSTER_PWR_MASK; 145*9cf7f355SMadhukar Pappireddy reg |= DSU_CLUSTER_PWR_OFF; 146*9cf7f355SMadhukar Pappireddy write_clusterpwrdn(reg); 147*9cf7f355SMadhukar Pappireddy #endif 148*9cf7f355SMadhukar Pappireddy } 149b4315306SDan Handley } 150b4315306SDan Handley 151b4315306SDan Handley /******************************************************************************* 15238dce70fSSoby Mathew * Handler called when a power domain is about to be turned off. The 15338dce70fSSoby Mathew * target_state encodes the power state that each level should transition to. 154b4315306SDan Handley ******************************************************************************/ 155785fb92bSSoby Mathew void css_pwr_domain_off(const psci_power_state_t *target_state) 156b4315306SDan Handley { 157f14d1886SSoby Mathew assert(CSS_CORE_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF); 15838dce70fSSoby Mathew css_power_down_common(target_state); 159b12a2b49SSoby Mathew css_scp_off(target_state); 160b4315306SDan Handley } 161b4315306SDan Handley 162b4315306SDan Handley /******************************************************************************* 16338dce70fSSoby Mathew * Handler called when a power domain is about to be suspended. The 16438dce70fSSoby Mathew * target_state encodes the power state that each level should transition to. 165b4315306SDan Handley ******************************************************************************/ 166785fb92bSSoby Mathew void css_pwr_domain_suspend(const psci_power_state_t *target_state) 167b4315306SDan Handley { 16838dce70fSSoby Mathew /* 169f14d1886SSoby Mathew * CSS currently supports retention only at cpu level. Just return 17038dce70fSSoby Mathew * as nothing is to be done for retention. 17138dce70fSSoby Mathew */ 172f14d1886SSoby Mathew if (CSS_CORE_PWR_STATE(target_state) == ARM_LOCAL_STATE_RET) 173b4315306SDan Handley return; 174b4315306SDan Handley 175e35a3fb5SSoby Mathew 176f14d1886SSoby Mathew assert(CSS_CORE_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF); 17738dce70fSSoby Mathew css_power_down_common(target_state); 178e35a3fb5SSoby Mathew 179e35a3fb5SSoby Mathew /* Perform system domain state saving if issuing system suspend */ 1809b4c611cSNariman Poushin if (css_system_pwr_state(target_state) == ARM_LOCAL_STATE_OFF) { 181e35a3fb5SSoby Mathew arm_system_pwr_domain_save(); 182e35a3fb5SSoby Mathew 183e35a3fb5SSoby Mathew /* Power off the Redistributor after having saved its context */ 184e35a3fb5SSoby Mathew plat_arm_gic_redistif_off(); 185e35a3fb5SSoby Mathew } 186e35a3fb5SSoby Mathew 187b12a2b49SSoby Mathew css_scp_suspend(target_state); 188b4315306SDan Handley } 189b4315306SDan Handley 190b4315306SDan Handley /******************************************************************************* 19138dce70fSSoby Mathew * Handler called when a power domain has just been powered on after 19238dce70fSSoby Mathew * having been suspended earlier. The target_state encodes the low power state 19338dce70fSSoby Mathew * that each level has woken up from. 194b4315306SDan Handley * TODO: At the moment we reuse the on finisher and reinitialize the secure 195b4315306SDan Handley * context. Need to implement a separate suspend finisher. 196b4315306SDan Handley ******************************************************************************/ 197785fb92bSSoby Mathew void css_pwr_domain_suspend_finish( 19838dce70fSSoby Mathew const psci_power_state_t *target_state) 199b4315306SDan Handley { 200f14d1886SSoby Mathew /* Return as nothing is to be done on waking up from retention. */ 201f14d1886SSoby Mathew if (CSS_CORE_PWR_STATE(target_state) == ARM_LOCAL_STATE_RET) 20238dce70fSSoby Mathew return; 20338dce70fSSoby Mathew 204f14d1886SSoby Mathew /* Perform system domain restore if woken up from system suspend */ 2059b4c611cSNariman Poushin if (css_system_pwr_state(target_state) == ARM_LOCAL_STATE_OFF) 206e35a3fb5SSoby Mathew /* 207e35a3fb5SSoby Mathew * At this point, the Distributor must be powered on to be ready 208e35a3fb5SSoby Mathew * to have its state restored. The Redistributor will be powered 209e35a3fb5SSoby Mathew * on as part of gicv3_rdistif_init_restore. 210e35a3fb5SSoby Mathew */ 211f14d1886SSoby Mathew arm_system_pwr_domain_resume(); 212f14d1886SSoby Mathew 213f14d1886SSoby Mathew css_pwr_domain_on_finisher_common(target_state); 2146806cd23SMadhukar Pappireddy 2156806cd23SMadhukar Pappireddy /* Enable the gic cpu interface */ 2166806cd23SMadhukar Pappireddy plat_arm_gic_cpuif_enable(); 217b4315306SDan Handley } 218b4315306SDan Handley 219b4315306SDan Handley /******************************************************************************* 220b4315306SDan Handley * Handlers to shutdown/reboot the system 221b4315306SDan Handley ******************************************************************************/ 222785fb92bSSoby Mathew void __dead2 css_system_off(void) 223b4315306SDan Handley { 224b12a2b49SSoby Mathew css_scp_sys_shutdown(); 225b4315306SDan Handley } 226b4315306SDan Handley 227785fb92bSSoby Mathew void __dead2 css_system_reset(void) 228b4315306SDan Handley { 229b12a2b49SSoby Mathew css_scp_sys_reboot(); 230b4315306SDan Handley } 231b4315306SDan Handley 232b4315306SDan Handley /******************************************************************************* 23338dce70fSSoby Mathew * Handler called when the CPU power domain is about to enter standby. 234b4315306SDan Handley ******************************************************************************/ 23538dce70fSSoby Mathew void css_cpu_standby(plat_local_state_t cpu_state) 236b4315306SDan Handley { 237b4315306SDan Handley unsigned int scr; 238b4315306SDan Handley 23938dce70fSSoby Mathew assert(cpu_state == ARM_LOCAL_STATE_RET); 24038dce70fSSoby Mathew 241b4315306SDan Handley scr = read_scr_el3(); 24268b105aeSDavid Wang /* 24368b105aeSDavid Wang * Enable the Non secure interrupt to wake the CPU. 24468b105aeSDavid Wang * In GICv3 affinity routing mode, the non secure group1 interrupts use 24568b105aeSDavid Wang * the PhysicalFIQ at EL3 whereas in GICv2, it uses the PhysicalIRQ. 24668b105aeSDavid Wang * Enabling both the bits works for both GICv2 mode and GICv3 affinity 24768b105aeSDavid Wang * routing mode. 24868b105aeSDavid Wang */ 24968b105aeSDavid Wang write_scr_el3(scr | SCR_IRQ_BIT | SCR_FIQ_BIT); 250b4315306SDan Handley isb(); 251b4315306SDan Handley dsb(); 252b4315306SDan Handley wfi(); 253b4315306SDan Handley 254b4315306SDan Handley /* 255b4315306SDan Handley * Restore SCR to the original value, synchronisation of scr_el3 is 256b4315306SDan Handley * done by eret while el3_exit to save some execution cycles. 257b4315306SDan Handley */ 258b4315306SDan Handley write_scr_el3(scr); 259b4315306SDan Handley } 260b4315306SDan Handley 261b4315306SDan Handley /******************************************************************************* 262c1bb8a05SSoby Mathew * Handler called to return the 'req_state' for system suspend. 263c1bb8a05SSoby Mathew ******************************************************************************/ 264c1bb8a05SSoby Mathew void css_get_sys_suspend_power_state(psci_power_state_t *req_state) 265c1bb8a05SSoby Mathew { 266c1bb8a05SSoby Mathew unsigned int i; 267c1bb8a05SSoby Mathew 268c1bb8a05SSoby Mathew /* 269c1bb8a05SSoby Mathew * System Suspend is supported only if the system power domain node 270c1bb8a05SSoby Mathew * is implemented. 271c1bb8a05SSoby Mathew */ 272abd2aba9SSoby Mathew assert(PLAT_MAX_PWR_LVL == CSS_SYSTEM_PWR_DMN_LVL); 273c1bb8a05SSoby Mathew 274c1bb8a05SSoby Mathew for (i = ARM_PWR_LVL0; i <= PLAT_MAX_PWR_LVL; i++) 275c1bb8a05SSoby Mathew req_state->pwr_domain_state[i] = ARM_LOCAL_STATE_OFF; 276c1bb8a05SSoby Mathew } 277c1bb8a05SSoby Mathew 278c1bb8a05SSoby Mathew /******************************************************************************* 2793cc17aaeSJeenu Viswambharan * Handler to query CPU/cluster power states from SCP 2803cc17aaeSJeenu Viswambharan ******************************************************************************/ 2813cc17aaeSJeenu Viswambharan int css_node_hw_state(u_register_t mpidr, unsigned int power_level) 2823cc17aaeSJeenu Viswambharan { 283b12a2b49SSoby Mathew return css_scp_get_power_state(mpidr, power_level); 2843cc17aaeSJeenu Viswambharan } 2853cc17aaeSJeenu Viswambharan 286abd2aba9SSoby Mathew /* 287abd2aba9SSoby Mathew * The system power domain suspend is only supported only via 288abd2aba9SSoby Mathew * PSCI SYSTEM_SUSPEND API. PSCI CPU_SUSPEND request to system power domain 289abd2aba9SSoby Mathew * will be downgraded to the lower level. 290abd2aba9SSoby Mathew */ 291abd2aba9SSoby Mathew static int css_validate_power_state(unsigned int power_state, 292abd2aba9SSoby Mathew psci_power_state_t *req_state) 293abd2aba9SSoby Mathew { 294abd2aba9SSoby Mathew int rc; 295abd2aba9SSoby Mathew rc = arm_validate_power_state(power_state, req_state); 296abd2aba9SSoby Mathew 297abd2aba9SSoby Mathew /* 2988e26307dSNariman Poushin * Ensure that we don't overrun the pwr_domain_state array in the case 2998e26307dSNariman Poushin * where the platform supported max power level is less than the system 3008e26307dSNariman Poushin * power level 3018e26307dSNariman Poushin */ 3028e26307dSNariman Poushin 3038e26307dSNariman Poushin #if (PLAT_MAX_PWR_LVL == CSS_SYSTEM_PWR_DMN_LVL) 3048e26307dSNariman Poushin 3058e26307dSNariman Poushin /* 306abd2aba9SSoby Mathew * Ensure that the system power domain level is never suspended 307abd2aba9SSoby Mathew * via PSCI CPU SUSPEND API. Currently system suspend is only 308abd2aba9SSoby Mathew * supported via PSCI SYSTEM SUSPEND API. 309abd2aba9SSoby Mathew */ 3108e26307dSNariman Poushin 3118e26307dSNariman Poushin req_state->pwr_domain_state[CSS_SYSTEM_PWR_DMN_LVL] = 3128e26307dSNariman Poushin ARM_LOCAL_STATE_RUN; 3138e26307dSNariman Poushin #endif 3148e26307dSNariman Poushin 315abd2aba9SSoby Mathew return rc; 316abd2aba9SSoby Mathew } 317abd2aba9SSoby Mathew 318abd2aba9SSoby Mathew /* 319abd2aba9SSoby Mathew * Custom `translate_power_state_by_mpidr` handler for CSS. Unlike in the 320abd2aba9SSoby Mathew * `css_validate_power_state`, we do not downgrade the system power 321abd2aba9SSoby Mathew * domain level request in `power_state` as it will be used to query the 322abd2aba9SSoby Mathew * PSCI_STAT_COUNT/RESIDENCY at the system power domain level. 323abd2aba9SSoby Mathew */ 324abd2aba9SSoby Mathew static int css_translate_power_state_by_mpidr(u_register_t mpidr, 325abd2aba9SSoby Mathew unsigned int power_state, 326abd2aba9SSoby Mathew psci_power_state_t *output_state) 327abd2aba9SSoby Mathew { 328abd2aba9SSoby Mathew return arm_validate_power_state(power_state, output_state); 329abd2aba9SSoby Mathew } 330abd2aba9SSoby Mathew 3313cc17aaeSJeenu Viswambharan /******************************************************************************* 332785fb92bSSoby Mathew * Export the platform handlers via plat_arm_psci_pm_ops. The ARM Standard 333785fb92bSSoby Mathew * platform will take care of registering the handlers with PSCI. 334b4315306SDan Handley ******************************************************************************/ 3355486a965SSoby Mathew plat_psci_ops_t plat_arm_psci_pm_ops = { 33638dce70fSSoby Mathew .pwr_domain_on = css_pwr_domain_on, 33738dce70fSSoby Mathew .pwr_domain_on_finish = css_pwr_domain_on_finish, 3386806cd23SMadhukar Pappireddy .pwr_domain_on_finish_late = css_pwr_domain_on_finish_late, 33938dce70fSSoby Mathew .pwr_domain_off = css_pwr_domain_off, 34038dce70fSSoby Mathew .cpu_standby = css_cpu_standby, 34138dce70fSSoby Mathew .pwr_domain_suspend = css_pwr_domain_suspend, 34238dce70fSSoby Mathew .pwr_domain_suspend_finish = css_pwr_domain_suspend_finish, 343b4315306SDan Handley .system_off = css_system_off, 344b4315306SDan Handley .system_reset = css_system_reset, 345abd2aba9SSoby Mathew .validate_power_state = css_validate_power_state, 34671e7a4e5SJeenu Viswambharan .validate_ns_entrypoint = arm_validate_psci_entrypoint, 347abd2aba9SSoby Mathew .translate_power_state_by_mpidr = css_translate_power_state_by_mpidr, 348abd2aba9SSoby Mathew .get_node_hw_state = css_node_hw_state, 349f145403cSRoberto Vargas .get_sys_suspend_power_state = css_get_sys_suspend_power_state, 350638b034cSRoberto Vargas 351638b034cSRoberto Vargas #if defined(PLAT_ARM_MEM_PROT_ADDR) 352f145403cSRoberto Vargas .mem_protect_chk = arm_psci_mem_protect_chk, 353f145403cSRoberto Vargas .read_mem_protect = arm_psci_read_mem_protect, 354f145403cSRoberto Vargas .write_mem_protect = arm_nor_psci_write_mem_protect, 355f145403cSRoberto Vargas #endif 356b48ae263SRoberto Vargas #if CSS_USE_SCMI_SDS_DRIVER 357b48ae263SRoberto Vargas .system_reset2 = css_system_reset2, 358b48ae263SRoberto Vargas #endif 359b4315306SDan Handley }; 360