blob: 7f49d056a07eb54f9cceb35297766890a62ce1ea [file] [log] [blame]
Kever Yang89659f82019-06-09 00:27:13 +03001/*
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>
10#include <dm/pinctrl.h>
11#include <ram.h>
12#include <spl.h>
13#include <asm/io.h>
14
15DECLARE_GLOBAL_DATA_PTR;
16
17void board_debug_uart_init(void)
18{
19}
20
21void board_init_f(ulong dummy)
22{
23 struct udevice *dev;
24 int ret;
25
26 ret = spl_early_init();
27 if (ret) {
28 debug("spl_early_init() failed: %d\n", ret);
29 hang();
30 }
31
32 preloader_console_init();
33
34 ret = uclass_get_device(UCLASS_RAM, 0, &dev);
35 if (ret) {
36 debug("DRAM init failed: %d\n", ret);
37 return;
38 }
39}
40
41u32 spl_boot_mode(const u32 boot_device)
42{
43 return MMCSD_MODE_RAW;
44}
45
46u32 spl_boot_device(void)
47{
48 return BOOT_DEVICE_MMC1;
49}
50
51#ifdef CONFIG_SPL_LOAD_FIT
52int board_fit_config_name_match(const char *name)
53{
54 /* Just empty function now - can't decide what to choose */
55 debug("%s: %s\n", __func__, name);
56
57 return 0;
58}
59#endif