blob: 953e9db9c8e83e43d5647e9285191d8a3004688f [file] [log] [blame]
Konstantin Porotchkinc4052262021-03-16 17:20:57 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2016 Stefan Roese <sr@denx.de>
4 * Copyright (C) 2020 Marvell International Ltd.
5 */
6
7#include <dm.h>
8#include <power/regulator.h>
9
10DECLARE_GLOBAL_DATA_PTR;
11
12__weak int soc_early_init_f(void)
13{
14 return 0;
15}
16
17int board_early_init_f(void)
18{
19 soc_early_init_f();
20
21 return 0;
22}
23
24int board_early_init_r(void)
25{
26 if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
27 /* Check if any existing regulator should be turned down */
28 regulators_enable_boot_off(false);
29 }
30
31 return 0;
32}
33
34int board_init(void)
35{
36 /* address of boot parameters */
37 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
38
39 return 0;
40}
41
42int board_late_init(void)
43{
44 return 0;
45}