Kever Yang | 89659f8 | 2019-06-09 00:27:13 +0300 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2016 Rockchip Electronics Co., Ltd |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <debug_uart.h> |
| 9 | #include <dm.h> |
Kever Yang | 89659f8 | 2019-06-09 00:27:13 +0300 | [diff] [blame] | 10 | #include <ram.h> |
| 11 | #include <spl.h> |
| 12 | #include <asm/io.h> |
| 13 | |
| 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
| 16 | void board_debug_uart_init(void) |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | void board_init_f(ulong dummy) |
| 21 | { |
| 22 | struct udevice *dev; |
| 23 | int ret; |
| 24 | |
| 25 | ret = spl_early_init(); |
| 26 | if (ret) { |
| 27 | debug("spl_early_init() failed: %d\n", ret); |
| 28 | hang(); |
| 29 | } |
| 30 | |
| 31 | preloader_console_init(); |
| 32 | |
| 33 | ret = uclass_get_device(UCLASS_RAM, 0, &dev); |
| 34 | if (ret) { |
| 35 | debug("DRAM init failed: %d\n", ret); |
| 36 | return; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | u32 spl_boot_mode(const u32 boot_device) |
| 41 | { |
| 42 | return MMCSD_MODE_RAW; |
| 43 | } |
| 44 | |
| 45 | u32 spl_boot_device(void) |
| 46 | { |
| 47 | return BOOT_DEVICE_MMC1; |
| 48 | } |
| 49 | |
| 50 | #ifdef CONFIG_SPL_LOAD_FIT |
| 51 | int board_fit_config_name_match(const char *name) |
| 52 | { |
| 53 | /* Just empty function now - can't decide what to choose */ |
| 54 | debug("%s: %s\n", __func__, name); |
| 55 | |
| 56 | return 0; |
| 57 | } |
| 58 | #endif |