blob: e73e89f73843c7605170030d4ca23bf684ac3af0 [file] [log] [blame]
Joel Hutton9463cae2018-05-04 15:09:47 +01001/*
John Tsichritzisfe6df392019-03-19 17:20:52 +00002 * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
Joel Hutton9463cae2018-05-04 15:09:47 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <asm_macros.S>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00009#include <common/bl_common.h>
Joel Hutton9463cae2018-05-04 15:09:47 +010010#include <cortex_deimos.h>
11#include <cpu_macros.S>
12#include <plat_macros.S>
13
John Tsichritzisfe6df392019-03-19 17:20:52 +000014/* Hardware handled coherency */
15#if HW_ASSISTED_COHERENCY == 0
16#error "Deimos must be compiled with HW_ASSISTED_COHERENCY enabled"
17#endif
18
Joel Hutton9463cae2018-05-04 15:09:47 +010019 /* ---------------------------------------------
20 * HW will do the cache maintenance while powering down
21 * ---------------------------------------------
22 */
23func cortex_deimos_core_pwr_dwn
24 /* ---------------------------------------------
25 * Enable CPU power down bit in power control register
26 * ---------------------------------------------
27 */
28 mrs x0, CORTEX_DEIMOS_CPUPWRCTLR_EL1
29 orr x0, x0, #CORTEX_DEIMOS_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
30 msr CORTEX_DEIMOS_CPUPWRCTLR_EL1, x0
31 isb
32 ret
33endfunc cortex_deimos_core_pwr_dwn
34
Soby Mathew0980dce2018-09-17 04:34:35 +010035#if REPORT_ERRATA
36/*
37 * Errata printing function for Cortex Deimos. Must follow AAPCS.
38 */
39func cortex_deimos_errata_report
40 ret
41endfunc cortex_deimos_errata_report
42#endif
43
44
Joel Hutton9463cae2018-05-04 15:09:47 +010045 /* ---------------------------------------------
46 * This function provides Cortex-Deimos specific
47 * register information for crash reporting.
48 * It needs to return with x6 pointing to
49 * a list of register names in ascii and
50 * x8 - x15 having values of registers to be
51 * reported.
52 * ---------------------------------------------
53 */
54.section .rodata.cortex_deimos_regs, "aS"
55cortex_deimos_regs: /* The ascii list of register names to be reported */
56 .asciz "cpuectlr_el1", ""
57
58func cortex_deimos_cpu_reg_dump
59 adr x6, cortex_deimos_regs
60 mrs x8, CORTEX_DEIMOS_CPUECTLR_EL1
61 ret
62endfunc cortex_deimos_cpu_reg_dump
63
64declare_cpu_ops cortex_deimos, CORTEX_DEIMOS_MIDR, \
65 CPU_NO_RESET_FUNC, \
66 cortex_deimos_core_pwr_dwn