rockchip: back-to-bootrom: allow passing a cmd to the bootrom
[oweals/u-boot.git] / arch / arm / mach-rockchip / rk322x-board-spl.c
index 15216c74b06fc14a40f061b510b60fc5aedede7b..35f4f978c4e37dfbf57ef4d78b43047aec3d0c63 100644 (file)
@@ -41,6 +41,8 @@ static struct rk322x_grf * const grf = (void *)GRF_BASE;
                     CON_IOMUX_UART2SEL_MASK,
                     CON_IOMUX_UART2SEL_21 << CON_IOMUX_UART2SEL_SHIFT);
 }
+
+#define SGRF_DDR_CON0 0x10150000
 void board_init_f(ulong dummy)
 {
        struct udevice *dev;
@@ -71,7 +73,9 @@ void board_init_f(ulong dummy)
                return;
        }
 
+       /* Disable the ddr secure region setting to make it non-secure */
+       rk_clrreg(SGRF_DDR_CON0, 0x4000);
 #if defined(CONFIG_ROCKCHIP_SPL_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
-       back_to_bootrom();
+       back_to_bootrom(BROM_BOOT_NEXTSTAGE);
 #endif
 }