Skip to content

Commit 0943608

Browse files
committed
riscv: openisa_rv32m1: Fix booting of rv32m1_vega
rv32m1_vega don't boot due to device init ordering and changes with the device model. The soc code is looking for a device pointer for the intmux. Change to using DEVICE_DT_GET here as that will ensure we get a valid pointer and by the time we need to utilize the pointer the intmux driver will have been initialized and thus the device pointer will be ready. Also set BUILD_OUTPUT_HEX since we utilize openocd to flash and west flash is looking for a hex file for openocd targets. Signed-off-by: Kumar Gala <[email protected]>
1 parent 3c56e0d commit 0943608

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

soc/riscv/openisa_rv32m1/Kconfig.soc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config SOC_OPENISA_RV32M1_RISCV32
1717
select CLOCK_CONTROL
1818
select HAS_RV32M1_FTFX
1919
select HAS_FLASH_LOAD_OFFSET
20+
select BUILD_OUTPUT_HEX
2021
help
2122
Enable support for OpenISA RV32M1 RISC-V processors. Choose
2223
this option to target the RI5CY or ZERO-RISCY core. This

soc/riscv/openisa_rv32m1/soc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ void soc_interrupt_init(void)
146146
(void)(EVENT_UNIT->EVTPENDCLEAR); /* Ensures write has finished. */
147147

148148
if (IS_ENABLED(CONFIG_MULTI_LEVEL_INTERRUPTS)) {
149-
dev_intmux = device_get_binding(
150-
DT_LABEL(DT_INST(0, openisa_rv32m1_intmux)));
151-
__ASSERT(dev_intmux, "no INTMUX device found");
149+
dev_intmux = DEVICE_DT_GET(DT_INST(0, openisa_rv32m1_intmux));
152150
}
153151
}
154152

0 commit comments

Comments
 (0)