Anson Huang | 4c28fc3 | 2018-06-05 16:12:27 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef PLAT_IMX8_H |
| 8 | #define PLAT_IMX8_H |
Anson Huang | 4c28fc3 | 2018-06-05 16:12:27 +0800 | [diff] [blame] | 9 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <drivers/arm/gicv3.h> |
| 11 | #include <lib/psci/psci.h> |
Anson Huang | 4c28fc3 | 2018-06-05 16:12:27 +0800 | [diff] [blame] | 12 | |
Anson Huang | ad192dc | 2019-01-24 16:09:52 +0800 | [diff] [blame] | 13 | struct plat_gic_ctx { |
| 14 | gicv3_redist_ctx_t rdist_ctx[PLATFORM_CORE_COUNT]; |
| 15 | gicv3_dist_ctx_t dist_ctx; |
| 16 | }; |
| 17 | |
Anson Huang | 4c28fc3 | 2018-06-05 16:12:27 +0800 | [diff] [blame] | 18 | unsigned int plat_calc_core_pos(uint64_t mpidr); |
| 19 | void imx_mailbox_init(uintptr_t base_addr); |
| 20 | void plat_gic_driver_init(void); |
| 21 | void plat_gic_init(void); |
| 22 | void plat_gic_cpuif_enable(void); |
| 23 | void plat_gic_cpuif_disable(void); |
| 24 | void plat_gic_pcpu_init(void); |
| 25 | |
Anson Huang | d2b9055 | 2018-07-12 10:52:55 +0800 | [diff] [blame] | 26 | void __dead2 imx_system_off(void); |
Anson Huang | 0da07d2 | 2018-07-12 11:04:15 +0800 | [diff] [blame] | 27 | void __dead2 imx_system_reset(void); |
Anson Huang | 10cd817 | 2018-07-12 14:17:19 +0800 | [diff] [blame] | 28 | int imx_validate_power_state(unsigned int power_state, |
| 29 | psci_power_state_t *req_state); |
| 30 | void imx_get_sys_suspend_power_state(psci_power_state_t *req_state); |
Anson Huang | e1d418c | 2019-01-18 10:01:50 +0800 | [diff] [blame] | 31 | bool imx_is_wakeup_src_irqsteer(void); |
Anson Huang | ad192dc | 2019-01-24 16:09:52 +0800 | [diff] [blame] | 32 | void plat_gic_save(unsigned int proc_num, struct plat_gic_ctx *ctx); |
| 33 | void plat_gic_restore(unsigned int proc_num, struct plat_gic_ctx *ctx); |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 34 | |
| 35 | #endif /* PLAT_IMX8_H */ |