Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <debug_uart.h> |
| 8 | #include <dm.h> |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 9 | #include <ram.h> |
| 10 | #include <spl.h> |
| 11 | #include <asm/io.h> |
Kever Yang | 15f09a1 | 2019-03-28 11:01:23 +0800 | [diff] [blame] | 12 | #include <asm/arch-rockchip/periph.h> |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 13 | |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 14 | void board_init_f(ulong dummy) |
| 15 | { |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 16 | struct udevice *dev; |
| 17 | int ret; |
| 18 | |
| 19 | ret = spl_early_init(); |
| 20 | if (ret) { |
| 21 | debug("spl_early_init() failed: %d\n", ret); |
| 22 | hang(); |
| 23 | } |
| 24 | |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 25 | preloader_console_init(); |
| 26 | |
| 27 | ret = uclass_get_device(UCLASS_RAM, 0, &dev); |
| 28 | if (ret) { |
| 29 | debug("DRAM init failed: %d\n", ret); |
| 30 | return; |
| 31 | } |
| 32 | } |
| 33 | |
Philipp Tomsich | fbbd380 | 2017-06-12 10:33:20 +0200 | [diff] [blame] | 34 | u32 spl_boot_device(void) |
| 35 | { |
| 36 | return BOOT_DEVICE_MMC1; |
| 37 | } |
| 38 | |
| 39 | #ifdef CONFIG_SPL_LOAD_FIT |
| 40 | int board_fit_config_name_match(const char *name) |
| 41 | { |
| 42 | /* Just empty function now - can't decide what to choose */ |
| 43 | debug("%s: %s\n", __func__, name); |
| 44 | |
| 45 | return 0; |
| 46 | } |
| 47 | #endif |