1 /* 2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <lib/psci/psci.h> 8 #include <plat/arm/common/plat_arm.h> 9 #include <platform_def.h> 10 /******************************************************************************* 11 * Export the platform handlers via plat_arm_psci_pm_ops. The ARM Standard 12 * platform layer will take care of registering the handlers with PSCI. 13 ******************************************************************************/ 14 corstone1000_system_reset(void)15static void __dead2 corstone1000_system_reset(void) 16 { 17 18 uint32_t volatile * const watchdog_ctrl_reg = (uint32_t *) SECURE_WATCHDOG_ADDR_CTRL_REG; 19 uint32_t volatile * const watchdog_val_reg = (uint32_t *) SECURE_WATCHDOG_ADDR_VAL_REG; 20 21 *(watchdog_val_reg) = SECURE_WATCHDOG_COUNTDOWN_VAL; 22 *watchdog_ctrl_reg = SECURE_WATCHDOG_MASK_ENABLE; 23 while (1) { 24 wfi(); 25 } 26 } 27 28 plat_psci_ops_t plat_arm_psci_pm_ops = { 29 .system_reset = corstone1000_system_reset, 30 .validate_ns_entrypoint = NULL 31 }; 32 plat_arm_psci_override_pm_ops(plat_psci_ops_t * ops)33const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops) 34 { 35 ops = &plat_arm_psci_pm_ops; 36 return ops; 37 } 38