ARM: uniphier: make boot_is_swapped() code optional
[oweals/u-boot.git] / arch / arm / mach-rockchip / rk3328-board-spl.c
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>
10 #include <dm/pinctrl.h>
11 #include <ram.h>
12 #include <spl.h>
13 #include <asm/io.h>
14
15 DECLARE_GLOBAL_DATA_PTR;
16
17 void board_debug_uart_init(void)
18 {
19 }
20
21 void 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
41 u32 spl_boot_mode(const u32 boot_device)
42 {
43         return MMCSD_MODE_RAW;
44 }
45
46 u32 spl_boot_device(void)
47 {
48         return BOOT_DEVICE_MMC1;
49 }
50
51 #ifdef CONFIG_SPL_LOAD_FIT
52 int 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