Joel Hutton | 9463cae | 2018-05-04 15:09:47 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <arch.h> |
| 8 | #include <asm_macros.S> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | #include <common/bl_common.h> |
Joel Hutton | 9463cae | 2018-05-04 15:09:47 +0100 | [diff] [blame] | 10 | #include <cortex_deimos.h> |
| 11 | #include <cpu_macros.S> |
| 12 | #include <plat_macros.S> |
| 13 | |
| 14 | /* --------------------------------------------- |
| 15 | * HW will do the cache maintenance while powering down |
| 16 | * --------------------------------------------- |
| 17 | */ |
| 18 | func cortex_deimos_core_pwr_dwn |
| 19 | /* --------------------------------------------- |
| 20 | * Enable CPU power down bit in power control register |
| 21 | * --------------------------------------------- |
| 22 | */ |
| 23 | mrs x0, CORTEX_DEIMOS_CPUPWRCTLR_EL1 |
| 24 | orr x0, x0, #CORTEX_DEIMOS_CPUPWRCTLR_EL1_CORE_PWRDN_BIT |
| 25 | msr CORTEX_DEIMOS_CPUPWRCTLR_EL1, x0 |
| 26 | isb |
| 27 | ret |
| 28 | endfunc cortex_deimos_core_pwr_dwn |
| 29 | |
Soby Mathew | 0980dce | 2018-09-17 04:34:35 +0100 | [diff] [blame] | 30 | #if REPORT_ERRATA |
| 31 | /* |
| 32 | * Errata printing function for Cortex Deimos. Must follow AAPCS. |
| 33 | */ |
| 34 | func cortex_deimos_errata_report |
| 35 | ret |
| 36 | endfunc cortex_deimos_errata_report |
| 37 | #endif |
| 38 | |
| 39 | |
Joel Hutton | 9463cae | 2018-05-04 15:09:47 +0100 | [diff] [blame] | 40 | /* --------------------------------------------- |
| 41 | * This function provides Cortex-Deimos specific |
| 42 | * register information for crash reporting. |
| 43 | * It needs to return with x6 pointing to |
| 44 | * a list of register names in ascii and |
| 45 | * x8 - x15 having values of registers to be |
| 46 | * reported. |
| 47 | * --------------------------------------------- |
| 48 | */ |
| 49 | .section .rodata.cortex_deimos_regs, "aS" |
| 50 | cortex_deimos_regs: /* The ascii list of register names to be reported */ |
| 51 | .asciz "cpuectlr_el1", "" |
| 52 | |
| 53 | func cortex_deimos_cpu_reg_dump |
| 54 | adr x6, cortex_deimos_regs |
| 55 | mrs x8, CORTEX_DEIMOS_CPUECTLR_EL1 |
| 56 | ret |
| 57 | endfunc cortex_deimos_cpu_reg_dump |
| 58 | |
| 59 | declare_cpu_ops cortex_deimos, CORTEX_DEIMOS_MIDR, \ |
| 60 | CPU_NO_RESET_FUNC, \ |
| 61 | cortex_deimos_core_pwr_dwn |