hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
u-boot/common/spl/spl.c
....@@ -17,6 +17,7 @@
1717 #include <version.h>
1818 #include <image.h>
1919 #include <malloc.h>
20
+#include <mp_boot.h>
2021 #include <dm/root.h>
2122 #include <linux/compiler.h>
2223 #include <fdt_support.h>
....@@ -547,6 +548,10 @@
547548
548549 memset(&spl_image, '\0', sizeof(spl_image));
549550
551
+#ifdef CONFIG_MP_BOOT
552
+ mpb_init_x(0);
553
+#endif
554
+
550555 #if CONFIG_IS_ENABLED(ATF)
551556 /*
552557 * Bl32 ep is optional, initial it as an invalid value.
....@@ -574,6 +579,10 @@
574579 }
575580
576581 spl_perform_fixups(&spl_image);
582
+
583
+#ifdef CONFIG_MP_BOOT
584
+ mpb_init_x(2);
585
+#endif
577586
578587 #ifdef CONFIG_CPU_V7M
579588 spl_image.entry_point |= 0x1;
....@@ -710,7 +719,7 @@
710719 /* cleanup before jump to next stage */
711720 void spl_cleanup_before_jump(struct spl_image_info *spl_image)
712721 {
713
- ulong us;
722
+ ulong us, tt_us;
714723
715724 spl_board_prepare_for_jump(spl_image);
716725
....@@ -738,5 +747,6 @@
738747 isb();
739748
740749 us = (get_ticks() - gd->sys_start_tick) / 24UL;
741
- printf("Total: %ld.%ld ms\n\n", us / 1000, us % 1000);
750
+ tt_us = get_ticks() / (COUNTER_FREQUENCY / 1000000);
751
+ printf("Total: %ld.%ld/%ld.%ld ms\n\n", us / 1000, us % 1000, tt_us / 1000, tt_us % 1000);
742752 }