blob: 3d20cfb2fabe756fb1b8e8d84f5e41db41d1bcc8 [file] [log] [blame]
Konstantin Porotchkin1d6ff1f2021-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 */
Tom Rinibb4dd962022-11-16 13:10:37 -050037 gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
Konstantin Porotchkin1d6ff1f2021-03-16 17:20:57 +010038
39 return 0;
40}
41
42int board_late_init(void)
43{
44 return 0;
45}