diff options
author | kenny liang <kenny.liang@mediatek.com> | 2019-04-10 21:09:26 +0800 |
---|---|---|
committer | kenny liang <kenny.liang@mediatek.com> | 2019-05-10 10:30:17 +0800 |
commit | 3fa9dec43dbf1d8862d2e6c16dfac5fe6d8d317c (patch) | |
tree | a4b141fb8c99b0897a00f3d373191b3e0fa29665 /plat/mediatek/mt8183/plat_pm.c | |
parent | f2f0846598909cb905de5d4380bac5b1d4c89d09 (diff) | |
download | arm-trusted-firmware-3fa9dec43dbf1d8862d2e6c16dfac5fe6d8d317c.tar.gz |
Initialize platform for MediaTek mt8183
- Add basic platform setup
- Add generic CPU helper functions
- Add delay timer platform implementation
- Use TI 16550 uart driver
Change-Id: I1c29569c68fe9fca5e10e88a22a29690bab7141f
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
Diffstat (limited to 'plat/mediatek/mt8183/plat_pm.c')
-rw-r--r-- | plat/mediatek/mt8183/plat_pm.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/plat/mediatek/mt8183/plat_pm.c b/plat/mediatek/mt8183/plat_pm.c new file mode 100644 index 000000000..dd54d7040 --- /dev/null +++ b/plat/mediatek/mt8183/plat_pm.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/* common headers */ +#include <arch_helpers.h> +#include <assert.h> +#include <common/debug.h> +#include <lib/mmio.h> +#include <lib/psci/psci.h> +#include <errno.h> + +/* mediatek platform specific headers */ +#include <platform_def.h> +#include <scu.h> +#include <mtk_plat_common.h> +#include <power_tracer.h> +#include <plat_private.h> + +/******************************************************************************* + * MTK_platform handler called when an affinity instance is about to be turned + * on. The level and mpidr determine the affinity instance. + ******************************************************************************/ +static uintptr_t secure_entrypoint; + +static const plat_psci_ops_t plat_plat_pm_ops = { + .cpu_standby = NULL, + .pwr_domain_on = NULL, + .pwr_domain_on_finish = NULL, + .pwr_domain_off = NULL, + .pwr_domain_suspend = NULL, + .pwr_domain_suspend_finish = NULL, + .system_off = NULL, + .system_reset = NULL, + .validate_power_state = NULL, + .get_sys_suspend_power_state = NULL, +}; + +int plat_setup_psci_ops(uintptr_t sec_entrypoint, + const plat_psci_ops_t **psci_ops) +{ + *psci_ops = &plat_plat_pm_ops; + secure_entrypoint = sec_entrypoint; + return 0; +} |