Skip to content

Commit 33b91d6

Browse files
[sw] BootROM default is SPI bootstrap
This is a better default because on FPGA the LEDs will show activity when the bitstream is first flashed and both DRAM and SRAM are disabled. Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
1 parent 6122cb1 commit 33b91d6

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

sw/device/bootrom/bootrom.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <stdint.h>
1616

1717
#define MAJOR "00"
18-
#define MINOR "01"
18+
#define MINOR "02"
1919
#define PATCH "00"
2020

2121
const uintptr_t boot_slots[] = { 0x10000000, 0x80000000 };
@@ -56,19 +56,15 @@ int boot_main(void)
5656

5757
timer_init(boot_ctx.timer);
5858
timer_enable_write(boot_ctx.timer, true);
59-
if (bootstrap_requested(&boot_ctx)) {
59+
60+
uint32_t boot_addr;
61+
if (bootstrap_requested(&boot_ctx) || !get_boot_addr(&boot_addr)) {
6062
uprintf(boot_ctx.console, "Entering SPI bootstrap\n");
6163
clear_slots(); // Cleaning slots from previeous boot.
6264
// Spin polling the spi_dev and processing incoming data until a reset command is received.
6365
spi_boot_strap(&boot_ctx);
6466
}
6567

66-
uint32_t boot_addr;
67-
if (!get_boot_addr(&boot_addr)) {
68-
uprintf(boot_ctx.console, "No valid slot found, default to DRAM\n");
69-
boot_addr = dram_base;
70-
}
71-
7268
uprintf(boot_ctx.console, "\nJumping to: 0x%x\n", boot_addr);
7369
boot(boot_addr);
7470
uprintf(boot_ctx.console, "\nFailed to boot?\n");

0 commit comments

Comments
 (0)