bios/main: Add CONFIG_NO_BOOT support to allow disabling Boot sequence and minor cleanups.

This commit is contained in:
Florent Kermarrec 2022-06-06 18:28:39 +02:00
parent c299a82968
commit d537e30c5a
1 changed files with 12 additions and 4 deletions

View File

@ -176,27 +176,35 @@ __attribute__((__used__)) int main(int i, char **c)
if (sdr_ok != 1)
printf("Memory initialization failed\n");
#endif
/* Initialize and test SPIFLASH */
#ifdef CSR_SPIFLASH_CORE_BASE
spiflash_init();
#endif
printf("\n");
#ifdef CSR_VIDEO_FRAMEBUFFER_BASE
/* Initialize Video Framebuffer FIXME: Move */
#ifdef CSR_VIDEO_FRAMEBUFFER_BASE
video_framebuffer_vtg_enable_write(0);
video_framebuffer_dma_enable_write(0);
video_framebuffer_vtg_enable_write(1);
video_framebuffer_dma_enable_write(1);
#endif
/* Execute initialization functions */
init_dispatcher();
/* Execute Boot sequence */
#ifndef CONFIG_BIOS_NO_BOOT
if(sdr_ok) {
printf("--============== \e[1mBoot\e[0m ==================--\n");
boot_sequence();
printf("\n");
}
#endif
/* Console */
printf("--============= \e[1mConsole\e[0m ================--\n");
#if !defined(TERM_MINI) && !defined(TERM_NO_HIST)
hist_init();