Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 7 | #include <common/bl_common.h> |
| 8 | #include <common/debug.h> |
Antonio Nino Diaz | bd7b740 | 2019-01-25 14:30:04 +0000 | [diff] [blame] | 9 | #include <plat/arm/common/plat_arm.h> |
| 10 | #include <plat/arm/soc/common/soc_css.h> |
Aditya Angadi | 20b4841 | 2019-04-16 11:29:14 +0530 | [diff] [blame] | 11 | #include <plat/arm/common/arm_def.h> |
| 12 | #include <drivers/arm/sp805.h> |
Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 13 | #include <sgm_plat_config.h> |
Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 14 | |
| 15 | void bl1_early_platform_setup(void) |
| 16 | { |
Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 17 | |
Girish Pathak | 66dd23c | 2018-10-02 15:18:34 +0100 | [diff] [blame] | 18 | /* Initialize the console before anything else */ |
Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 19 | arm_bl1_early_platform_setup(); |
| 20 | |
Girish Pathak | 66dd23c | 2018-10-02 15:18:34 +0100 | [diff] [blame] | 21 | /* Initialize the platform configuration structure */ |
| 22 | plat_config_init(); |
| 23 | |
Nariman Poushin | c703f90 | 2018-03-07 10:29:57 +0000 | [diff] [blame] | 24 | #if !HW_ASSISTED_COHERENCY |
| 25 | /* |
| 26 | * Initialize Interconnect for this cluster during cold boot. |
| 27 | * No need for locks as no other CPU is active. |
| 28 | */ |
| 29 | plat_arm_interconnect_init(); |
| 30 | /* |
| 31 | * Enable Interconnect coherency for the primary CPU's cluster. |
| 32 | */ |
| 33 | plat_arm_interconnect_enter_coherency(); |
| 34 | #endif |
| 35 | } |
Aditya Angadi | 20b4841 | 2019-04-16 11:29:14 +0530 | [diff] [blame] | 36 | |
| 37 | void plat_arm_secure_wdt_start(void) |
| 38 | { |
| 39 | sp805_start(ARM_SP805_TWDG_BASE, ARM_TWDG_LOAD_VAL); |
| 40 | } |
| 41 | |
| 42 | void plat_arm_secure_wdt_stop(void) |
| 43 | { |
| 44 | sp805_stop(ARM_SP805_TWDG_BASE); |
| 45 | } |