blob: a7cce627c74cd533e340dc45544aad1d87bcf289 [file] [log] [blame]
Yann Gautiera3f46382023-06-14 10:40:59 +02001/*
Yann Gautier24e94a62024-01-04 10:58:18 +01002 * Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved
Yann Gautiera3f46382023-06-14 10:40:59 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <cdefs.h>
8#include <stdint.h>
9
Yann Gautiera585d762024-01-03 14:28:23 +010010#include <common/debug.h>
Yann Gautier24e94a62024-01-04 10:58:18 +010011#include <plat/common/platform.h>
12
Yann Gautiera585d762024-01-03 14:28:23 +010013#include <platform_def.h>
Yann Gautiereb91af52023-06-14 18:05:47 +020014#include <stm32mp_common.h>
15
Yann Gautiera3f46382023-06-14 10:40:59 +020016void 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 Gautiereb91af52023-06-14 18:05:47 +020021 stm32mp_setup_early_console();
Yann Gautiera3f46382023-06-14 10:40:59 +020022}
23
24void bl2_platform_setup(void)
25{
26}
27
28void bl2_el3_plat_arch_setup(void)
29{
Yann Gautiera585d762024-01-03 14:28:23 +010030 if (stm32_otp_probe() != 0U) {
31 ERROR("OTP probe failed\n");
32 panic();
33 }
Yann Gautiera3f46382023-06-14 10:40:59 +020034}