blob: c6511937123bc7807ec6432e304f196a8a443c71 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Philipp Tomsichfbbd3802017-06-12 10:33:20 +02002/*
3 * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
Philipp Tomsichfbbd3802017-06-12 10:33:20 +02004 */
5
6#include <common.h>
7#include <debug_uart.h>
8#include <dm.h>
Philipp Tomsichfbbd3802017-06-12 10:33:20 +02009#include <ram.h>
10#include <spl.h>
11#include <asm/io.h>
Kever Yang15f09a12019-03-28 11:01:23 +080012#include <asm/arch-rockchip/periph.h>
Philipp Tomsichfbbd3802017-06-12 10:33:20 +020013
Philipp Tomsichfbbd3802017-06-12 10:33:20 +020014void board_init_f(ulong dummy)
15{
Philipp Tomsichfbbd3802017-06-12 10:33:20 +020016 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 Tomsichfbbd3802017-06-12 10:33:20 +020025 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 Tomsichfbbd3802017-06-12 10:33:20 +020034u32 spl_boot_device(void)
35{
36 return BOOT_DEVICE_MMC1;
37}
38
39#ifdef CONFIG_SPL_LOAD_FIT
40int 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