Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / arm / mach-rockchip / spl.c
index ec2f66d18872c71872387d33b7439d8fbf7615f9..cddf4fd3d572d75d327daba2241849155207a3c1 100644 (file)
@@ -53,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))
@@ -107,9 +108,6 @@ __weak int arch_cpu_init(void)
 void board_init_f(ulong dummy)
 {
        int ret;
-#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_OS_BOOT)
-       struct udevice *dev;
-#endif
 
 #ifdef CONFIG_DEBUG_UART
        /*
@@ -139,13 +137,15 @@ void board_init_f(ulong dummy)
        /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */
        timer_init();
 #endif
-#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_OS_BOOT)
+#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_RAM)
        debug("\nspl:init dram\n");
-       ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+       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();
 }