Skip to content

Commit 6592d3d

Browse files
committed
rockchip: rk3328: add spl board file support
rk3328 spl is locate at dram, so do not have strict size limit, suppose to enable storage media controller driver, load ATF and U-Boot, then boot into ATF. Change-Id: I60d0e2b278dc09b04bd098f682c06bd5fb6cecf7 Signed-off-by: Kever Yang <[email protected]>
1 parent 6b5409b commit 6592d3d

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

arch/arm/mach-rockchip/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o
2020
obj-spl-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-spl.o
2121
obj-spl-$(CONFIG_ROCKCHIP_RK322X) += rk322x-board-spl.o spl-boot-order.o
2222
obj-spl-$(CONFIG_ROCKCHIP_RK3288) += rk3288-board-spl.o
23+
obj-spl-$(CONFIG_ROCKCHIP_RK3328) += rk3328-board-spl.o
2324
obj-spl-$(CONFIG_ROCKCHIP_RK3368) += rk3368-board-spl.o spl-boot-order.o
2425
obj-spl-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board-spl.o spl-boot-order.o
2526

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
#include <asm/arch/cru_rk3328.h>
15+
#include <asm/arch/grf_rk3328.h>
16+
#include <asm/arch/hardware.h>
17+
#include <asm/arch/periph.h>
18+
#include <asm/arch/timer.h>
19+
20+
DECLARE_GLOBAL_DATA_PTR;
21+
22+
void board_debug_uart_init(void)
23+
{
24+
}
25+
26+
void board_init_f(ulong dummy)
27+
{
28+
struct udevice *dev;
29+
int ret;
30+
31+
ret = spl_early_init();
32+
if (ret) {
33+
debug("spl_early_init() failed: %d\n", ret);
34+
hang();
35+
}
36+
37+
preloader_console_init();
38+
39+
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
40+
if (ret) {
41+
debug("DRAM init failed: %d\n", ret);
42+
return;
43+
}
44+
}
45+
46+
u32 spl_boot_mode(const u32 boot_device)
47+
{
48+
return MMCSD_MODE_RAW;
49+
}
50+
51+
u32 spl_boot_device(void)
52+
{
53+
return BOOT_DEVICE_MMC1;
54+
}
55+
56+
#ifdef CONFIG_SPL_LOAD_FIT
57+
int board_fit_config_name_match(const char *name)
58+
{
59+
/* Just empty function now - can't decide what to choose */
60+
debug("%s: %s\n", __func__, name);
61+
62+
return 0;
63+
}
64+
#endif

0 commit comments

Comments
 (0)