Konstantin Porotchkin | 1d6ff1f | 2021-03-16 17:20:57 +0100 | [diff] [blame] | 1 | // 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 | |
| 10 | DECLARE_GLOBAL_DATA_PTR; |
| 11 | |
| 12 | __weak int soc_early_init_f(void) |
| 13 | { |
| 14 | return 0; |
| 15 | } |
| 16 | |
| 17 | int board_early_init_f(void) |
| 18 | { |
| 19 | soc_early_init_f(); |
| 20 | |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | int 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 | |
| 34 | int board_init(void) |
| 35 | { |
| 36 | /* address of boot parameters */ |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 37 | gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100; |
Konstantin Porotchkin | 1d6ff1f | 2021-03-16 17:20:57 +0100 | [diff] [blame] | 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | |
| 42 | int board_late_init(void) |
| 43 | { |
| 44 | return 0; |
| 45 | } |