Yann Gautier | a3f4638 | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 1 | /* |
Yann Gautier | 24e94a6 | 2024-01-04 10:58:18 +0100 | [diff] [blame] | 2 | * Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved |
Yann Gautier | a3f4638 | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <cdefs.h> |
| 8 | #include <stdint.h> |
| 9 | |
Yann Gautier | a585d76 | 2024-01-03 14:28:23 +0100 | [diff] [blame] | 10 | #include <common/debug.h> |
Yann Gautier | 24e94a6 | 2024-01-04 10:58:18 +0100 | [diff] [blame] | 11 | #include <plat/common/platform.h> |
| 12 | |
Yann Gautier | a585d76 | 2024-01-03 14:28:23 +0100 | [diff] [blame] | 13 | #include <platform_def.h> |
Yann Gautier | eb91af5 | 2023-06-14 18:05:47 +0200 | [diff] [blame] | 14 | #include <stm32mp_common.h> |
| 15 | |
Yann Gautier | a3f4638 | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 16 | void bl2_el3_early_platform_setup(u_register_t arg0 __unused, |
| 17 | u_register_t arg1 __unused, |
| 18 | u_register_t arg2 __unused, |
| 19 | u_register_t arg3 __unused) |
| 20 | { |
Yann Gautier | eb91af5 | 2023-06-14 18:05:47 +0200 | [diff] [blame] | 21 | stm32mp_setup_early_console(); |
Yann Gautier | a3f4638 | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | void bl2_platform_setup(void) |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | void bl2_el3_plat_arch_setup(void) |
| 29 | { |
Yann Gautier | a585d76 | 2024-01-03 14:28:23 +0100 | [diff] [blame] | 30 | if (stm32_otp_probe() != 0U) { |
| 31 | ERROR("OTP probe failed\n"); |
| 32 | panic(); |
| 33 | } |
Yann Gautier | a3f4638 | 2023-06-14 10:40:59 +0200 | [diff] [blame] | 34 | } |