developer | 1033ea1 | 2019-04-10 21:09:26 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | /* common headers */ |
| 8 | #include <arch_helpers.h> |
| 9 | #include <assert.h> |
| 10 | #include <common/debug.h> |
| 11 | #include <lib/mmio.h> |
| 12 | #include <lib/psci/psci.h> |
| 13 | #include <errno.h> |
| 14 | |
| 15 | /* mediatek platform specific headers */ |
| 16 | #include <platform_def.h> |
| 17 | #include <scu.h> |
| 18 | #include <mtk_plat_common.h> |
| 19 | #include <power_tracer.h> |
| 20 | #include <plat_private.h> |
| 21 | |
| 22 | /******************************************************************************* |
| 23 | * MTK_platform handler called when an affinity instance is about to be turned |
| 24 | * on. The level and mpidr determine the affinity instance. |
| 25 | ******************************************************************************/ |
| 26 | static uintptr_t secure_entrypoint; |
| 27 | |
| 28 | static const plat_psci_ops_t plat_plat_pm_ops = { |
| 29 | .cpu_standby = NULL, |
| 30 | .pwr_domain_on = NULL, |
| 31 | .pwr_domain_on_finish = NULL, |
| 32 | .pwr_domain_off = NULL, |
| 33 | .pwr_domain_suspend = NULL, |
| 34 | .pwr_domain_suspend_finish = NULL, |
| 35 | .system_off = NULL, |
| 36 | .system_reset = NULL, |
| 37 | .validate_power_state = NULL, |
| 38 | .get_sys_suspend_power_state = NULL, |
| 39 | }; |
| 40 | |
| 41 | int plat_setup_psci_ops(uintptr_t sec_entrypoint, |
| 42 | const plat_psci_ops_t **psci_ops) |
| 43 | { |
| 44 | *psci_ops = &plat_plat_pm_ops; |
| 45 | secure_entrypoint = sec_entrypoint; |
| 46 | return 0; |
| 47 | } |