X-Git-Url: https://git.librecmc.org/?p=oweals%2Fu-boot.git;a=blobdiff_plain;f=arch%2Farm%2Fmach-rockchip%2Fspl.c;h=cddf4fd3d572d75d327daba2241849155207a3c1;hp=33137cc5ef4af3fbc9a56734ac1454641c50afe1;hb=c27178ba3649f539c9f1890ea147f4c5415f63b5;hpb=49105fb7ed1c4e91409307a33363fc2a2c7aa711 diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 33137cc5ef..cddf4fd3d5 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -6,17 +6,24 @@ #include #include #include +#include +#include +#include +#include #include #include #include -#include #include +#include DECLARE_GLOBAL_DATA_PTR; -void board_return_to_bootrom(void) +int board_return_to_bootrom(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { back_to_bootrom(BROM_BOOT_NEXTSTAGE); + + return 0; } __weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { @@ -46,7 +53,8 @@ u32 spl_boot_device(void) #if defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \ defined(CONFIG_TARGET_CHROMEBIT_MICKEY) || \ - defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) + defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) || \ + defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY) return BOOT_DEVICE_SPI; #endif if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)) @@ -55,7 +63,7 @@ u32 spl_boot_device(void) return boot_device; } -u32 spl_boot_mode(const u32 boot_device) +u32 spl_mmc_boot_mode(const u32 boot_device) { return MMCSD_MODE_RAW; } @@ -100,9 +108,6 @@ __weak int arch_cpu_init(void) void board_init_f(ulong dummy) { int ret; -#if !defined(CONFIG_SUPPORT_TPL) || defined(CONFIG_SPL_OS_BOOT) - struct udevice *dev; -#endif #ifdef CONFIG_DEBUG_UART /* @@ -125,26 +130,28 @@ void board_init_f(ulong dummy) hang(); } arch_cpu_init(); -#if !defined(CONFIG_SUPPORT_TPL) || defined(CONFIG_SPL_OS_BOOT) - debug("\nspl:init dram\n"); - ret = uclass_get_device(UCLASS_RAM, 0, &dev); - if (ret) { - printf("DRAM init failed: %d\n", ret); - return; - } -#endif #if !defined(CONFIG_ROCKCHIP_RK3188) rockchip_stimer_init(); #endif #ifdef CONFIG_SYS_ARCH_TIMER /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init(); +#endif +#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_RAM) + debug("\nspl:init dram\n"); + ret = dram_init(); + if (ret) { + printf("DRAM init failed: %d\n", ret); + return; + } + gd->ram_top = gd->ram_base + get_effective_memsize(); + gd->ram_top = board_get_usable_ram_top(gd->ram_size); #endif preloader_console_init(); } #ifdef CONFIG_SPL_LOAD_FIT -int board_fit_config_name_match(const char *name) +int __weak board_fit_config_name_match(const char *name) { /* Just empty function now - can't decide what to choose */ debug("%s: %s\n", __func__, name);