hc
2023-11-06 9df731a176aab8e03b984b681b1bea01ccff6644
u-boot/arch/arm/mach-rockchip/spl.c
....@@ -19,6 +19,7 @@
1919 #ifdef CONFIG_ROCKCHIP_PRELOADER_ATAGS
2020 #include <asm/arch/rk_atags.h>
2121 #endif
22
+#include <asm/arch/pcie_ep_boot.h>
2223 #include <asm/arch/sdram.h>
2324 #include <asm/arch/boot_mode.h>
2425 #include <asm/arch-rockchip/sys_proto.h>
....@@ -175,6 +176,9 @@
175176 printascii("U-Boot SPL board init");
176177 #endif
177178 gd->sys_start_tick = get_ticks();
179
+#ifdef CONFIG_SPL_PCIE_EP_SUPPORT
180
+ rockchip_pcie_ep_init();
181
+#endif
178182 #ifdef CONFIG_SPL_FRAMEWORK
179183 ret = spl_early_init();
180184 if (ret) {
....@@ -197,6 +201,9 @@
197201
198202 arch_cpu_init();
199203 rk_board_init_f();
204
+#ifdef CONFIG_SPL_RAM_DEVICE
205
+ rockchip_pcie_ep_get_firmware();
206
+#endif
200207 #if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
201208 back_to_bootrom(BROM_BOOT_NEXTSTAGE);
202209 #endif
....@@ -368,7 +375,10 @@
368375 spl->next_stage = SPL_NEXT_STAGE_KERNEL;
369376 break;
370377 default:
371
- spl->next_stage = SPL_NEXT_STAGE_UBOOT;
378
+ if ((reg_boot_mode & REBOOT_FLAG) != REBOOT_FLAG)
379
+ spl->next_stage = SPL_NEXT_STAGE_KERNEL;
380
+ else
381
+ spl->next_stage = SPL_NEXT_STAGE_UBOOT;
372382 }
373383 }
374384 #endif