diff --git a/bsp/freedom-e310-arty/metal-inline.h b/bsp/freedom-e310-arty/metal-inline.h index 2e312e6df..58c984d3e 100644 --- a/bsp/freedom-e310-arty/metal-inline.h +++ b/bsp/freedom-e310-arty/metal-inline.h @@ -124,6 +124,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ diff --git a/bsp/freedom-e310-arty/metal.h b/bsp/freedom-e310-arty/metal.h index a32204528..b372c55ce 100644 --- a/bsp/freedom-e310-arty/metal.h +++ b/bsp/freedom-e310-arty/metal.h @@ -77,6 +77,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -91,39 +93,39 @@ #include /* From clock@0 */ -struct __metal_driver_fixed_clock __metal_dt_clock_0; +extern struct __metal_driver_fixed_clock __metal_dt_clock_0; -struct metal_memory __metal_dt_mem_dtim_80000000; +extern struct metal_memory __metal_dt_mem_dtim_80000000; -struct metal_memory __metal_dt_mem_itim_8000000; +extern struct metal_memory __metal_dt_mem_itim_8000000; -struct metal_memory __metal_dt_mem_spi_10014000; +extern struct metal_memory __metal_dt_mem_spi_10014000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; /* From local_external_interrupts_0 */ -struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; +extern struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; /* From gpio@10012000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; /* From pwm@10015000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; /* From spi@10014000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; /* From serial@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; @@ -807,6 +809,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -910,6 +915,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 0 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/qemu-sifive-e31/metal-inline.h b/bsp/qemu-sifive-e31/metal-inline.h index b345de641..5863f1018 100644 --- a/bsp/qemu-sifive-e31/metal-inline.h +++ b/bsp/qemu-sifive-e31/metal-inline.h @@ -134,6 +134,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog); extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_size(const struct metal_watchdog *const watchdog); diff --git a/bsp/qemu-sifive-e31/metal.h b/bsp/qemu-sifive-e31/metal.h index 210a32b21..f970c6680 100644 --- a/bsp/qemu-sifive-e31/metal.h +++ b/bsp/qemu-sifive-e31/metal.h @@ -77,6 +77,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -100,76 +102,76 @@ #include /* From clock@0 */ -struct __metal_driver_fixed_clock __metal_dt_clock_0; +extern struct __metal_driver_fixed_clock __metal_dt_clock_0; /* From clock@2 */ -struct __metal_driver_fixed_clock __metal_dt_clock_2; +extern struct __metal_driver_fixed_clock __metal_dt_clock_2; /* From clock@5 */ -struct __metal_driver_fixed_clock __metal_dt_clock_5; +extern struct __metal_driver_fixed_clock __metal_dt_clock_5; -struct metal_memory __metal_dt_mem_dtim_80000000; +extern struct metal_memory __metal_dt_mem_dtim_80000000; -struct metal_memory __metal_dt_mem_spi_10014000; +extern struct metal_memory __metal_dt_mem_spi_10014000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; /* From local_external_interrupts_0 */ -struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; +extern struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; /* From gpio@10012000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; /* From led@0 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_0; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_0; /* From led@1 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_1; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_1; /* From led@2 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_2; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_2; /* From pwm@10015000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; /* From aon@10000000 */ -struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; +extern struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; /* From spi@10014000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; /* From test@100000 */ -struct __metal_driver_sifive_test0 __metal_dt_test_100000; +extern struct __metal_driver_sifive_test0 __metal_dt_test_100000; /* From serial@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; /* From aon@10000000 */ -struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; +extern struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; /* From clock@3 */ -struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; +extern struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; /* From clock@1 */ -struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; +extern struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; /* From clock@6 */ -struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; +extern struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; /* From clock@4 */ -struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; +extern struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; /* From prci@10008000 */ -struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; +extern struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; @@ -977,6 +979,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ static __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog) { @@ -1263,6 +1268,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 1 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/qemu-sifive-s51/metal-inline.h b/bsp/qemu-sifive-s51/metal-inline.h index b345de641..5863f1018 100644 --- a/bsp/qemu-sifive-s51/metal-inline.h +++ b/bsp/qemu-sifive-s51/metal-inline.h @@ -134,6 +134,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog); extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_size(const struct metal_watchdog *const watchdog); diff --git a/bsp/qemu-sifive-s51/metal.h b/bsp/qemu-sifive-s51/metal.h index d9f9ab878..6c8499d09 100644 --- a/bsp/qemu-sifive-s51/metal.h +++ b/bsp/qemu-sifive-s51/metal.h @@ -77,6 +77,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -100,76 +102,76 @@ #include /* From clock@0 */ -struct __metal_driver_fixed_clock __metal_dt_clock_0; +extern struct __metal_driver_fixed_clock __metal_dt_clock_0; /* From clock@2 */ -struct __metal_driver_fixed_clock __metal_dt_clock_2; +extern struct __metal_driver_fixed_clock __metal_dt_clock_2; /* From clock@5 */ -struct __metal_driver_fixed_clock __metal_dt_clock_5; +extern struct __metal_driver_fixed_clock __metal_dt_clock_5; -struct metal_memory __metal_dt_mem_dtim_80000000; +extern struct metal_memory __metal_dt_mem_dtim_80000000; -struct metal_memory __metal_dt_mem_spi_10014000; +extern struct metal_memory __metal_dt_mem_spi_10014000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; /* From local_external_interrupts_0 */ -struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; +extern struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; /* From gpio@10012000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; /* From led@0 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_0; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_0; /* From led@1 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_1; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_1; /* From led@2 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_2; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_2; /* From pwm@10015000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; /* From aon@10000000 */ -struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; +extern struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; /* From spi@10014000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; /* From test@100000 */ -struct __metal_driver_sifive_test0 __metal_dt_test_100000; +extern struct __metal_driver_sifive_test0 __metal_dt_test_100000; /* From serial@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; /* From aon@10000000 */ -struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; +extern struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; /* From clock@3 */ -struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; +extern struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; /* From clock@1 */ -struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; +extern struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; /* From clock@6 */ -struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; +extern struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; /* From clock@4 */ -struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; +extern struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; /* From prci@10008000 */ -struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; +extern struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; @@ -977,6 +979,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ static __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog) { @@ -1263,6 +1268,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 1 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/qemu-sifive-u54/metal-inline.h b/bsp/qemu-sifive-u54/metal-inline.h index d996600e6..1ec9cb450 100644 --- a/bsp/qemu-sifive-u54/metal-inline.h +++ b/bsp/qemu-sifive-u54/metal-inline.h @@ -99,6 +99,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -155,6 +158,8 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = { .init_done = 0, }; +struct metal_pmp __metal_dt_pmp; + /* From test@100000 */ struct __metal_driver_sifive_test0 __metal_dt_test_100000 = { .shutdown.vtable = &__metal_driver_vtable_sifive_test0.shutdown, diff --git a/bsp/qemu-sifive-u54/metal.h b/bsp/qemu-sifive-u54/metal.h index 8a511e065..576c02834 100644 --- a/bsp/qemu-sifive-u54/metal.h +++ b/bsp/qemu-sifive-u54/metal.h @@ -71,6 +71,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -81,26 +83,26 @@ #include #include -struct metal_memory __metal_dt_mem_memory_80000000; +extern struct metal_memory __metal_dt_mem_memory_80000000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; -struct metal_pmp __metal_dt_pmp; +extern struct metal_pmp __metal_dt_pmp; /* From test@100000 */ -struct __metal_driver_sifive_test0 __metal_dt_test_100000; +extern struct __metal_driver_sifive_test0 __metal_dt_test_100000; /* From uart@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_uart_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_uart_10013000; @@ -456,6 +458,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -559,6 +564,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_uart_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 0 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/qemu-sifive-u54mc/metal-inline.h b/bsp/qemu-sifive-u54mc/metal-inline.h index b17ac1c52..f80a6aa5d 100644 --- a/bsp/qemu-sifive-u54mc/metal-inline.h +++ b/bsp/qemu-sifive-u54mc/metal-inline.h @@ -102,6 +102,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -199,6 +202,8 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = { .init_done = 0, }; +struct metal_pmp __metal_dt_pmp; + /* From test@100000 */ struct __metal_driver_sifive_test0 __metal_dt_test_100000 = { .shutdown.vtable = &__metal_driver_vtable_sifive_test0.shutdown, diff --git a/bsp/qemu-sifive-u54mc/metal.h b/bsp/qemu-sifive-u54mc/metal.h index 97c039a38..f13fedaec 100644 --- a/bsp/qemu-sifive-u54mc/metal.h +++ b/bsp/qemu-sifive-u54mc/metal.h @@ -71,6 +71,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -82,43 +84,43 @@ #include /* From ethclk */ -struct __metal_driver_fixed_clock __metal_dt_ethclk; +extern struct __metal_driver_fixed_clock __metal_dt_ethclk; -struct metal_memory __metal_dt_mem_memory_80000000; +extern struct metal_memory __metal_dt_mem_memory_80000000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; /* From cpu@1 */ -struct __metal_driver_cpu __metal_dt_cpu_1; +extern struct __metal_driver_cpu __metal_dt_cpu_1; /* From cpu@2 */ -struct __metal_driver_cpu __metal_dt_cpu_2; +extern struct __metal_driver_cpu __metal_dt_cpu_2; /* From cpu@3 */ -struct __metal_driver_cpu __metal_dt_cpu_3; +extern struct __metal_driver_cpu __metal_dt_cpu_3; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_1_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_1_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_2_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_2_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_3_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_3_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; -struct metal_pmp __metal_dt_pmp; +extern struct metal_pmp __metal_dt_pmp; /* From test@100000 */ -struct __metal_driver_sifive_test0 __metal_dt_test_100000; +extern struct __metal_driver_sifive_test0 __metal_dt_test_100000; /* From uart@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_uart_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_uart_10013000; @@ -610,6 +612,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -716,6 +721,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_uart_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 0 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/sifive-hifive-unleashed/metal-inline.h b/bsp/sifive-hifive-unleashed/metal-inline.h index d083b6834..0d3c2f55d 100644 --- a/bsp/sifive-hifive-unleashed/metal-inline.h +++ b/bsp/sifive-hifive-unleashed/metal-inline.h @@ -135,6 +135,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -347,6 +350,8 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = { .init_done = 0, }; +struct metal_pmp __metal_dt_pmp; + /* From gpio@10060000 */ struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000 = { .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio, diff --git a/bsp/sifive-hifive-unleashed/metal.h b/bsp/sifive-hifive-unleashed/metal.h index 416cdd081..b19e097be 100644 --- a/bsp/sifive-hifive-unleashed/metal.h +++ b/bsp/sifive-hifive-unleashed/metal.h @@ -81,6 +81,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -98,96 +100,96 @@ #include /* From refclk */ -struct __metal_driver_fixed_clock __metal_dt_refclk; +extern struct __metal_driver_fixed_clock __metal_dt_refclk; /* From tlclk */ -struct __metal_driver_fixed_factor_clock __metal_dt_tlclk; +extern struct __metal_driver_fixed_factor_clock __metal_dt_tlclk; -struct metal_memory __metal_dt_mem_dtim_1000000; +extern struct metal_memory __metal_dt_mem_dtim_1000000; -struct metal_memory __metal_dt_mem_itim_1800000; +extern struct metal_memory __metal_dt_mem_itim_1800000; -struct metal_memory __metal_dt_mem_itim_1808000; +extern struct metal_memory __metal_dt_mem_itim_1808000; -struct metal_memory __metal_dt_mem_itim_1810000; +extern struct metal_memory __metal_dt_mem_itim_1810000; -struct metal_memory __metal_dt_mem_itim_1818000; +extern struct metal_memory __metal_dt_mem_itim_1818000; -struct metal_memory __metal_dt_mem_itim_1820000; +extern struct metal_memory __metal_dt_mem_itim_1820000; -struct metal_memory __metal_dt_mem_memory_80000000; +extern struct metal_memory __metal_dt_mem_memory_80000000; -struct metal_memory __metal_dt_mem_spi_10040000; +extern struct metal_memory __metal_dt_mem_spi_10040000; -struct metal_memory __metal_dt_mem_spi_10041000; +extern struct metal_memory __metal_dt_mem_spi_10041000; -struct metal_memory __metal_dt_mem_spi_10050000; +extern struct metal_memory __metal_dt_mem_spi_10050000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; /* From cpu@1 */ -struct __metal_driver_cpu __metal_dt_cpu_1; +extern struct __metal_driver_cpu __metal_dt_cpu_1; /* From cpu@2 */ -struct __metal_driver_cpu __metal_dt_cpu_2; +extern struct __metal_driver_cpu __metal_dt_cpu_2; /* From cpu@3 */ -struct __metal_driver_cpu __metal_dt_cpu_3; +extern struct __metal_driver_cpu __metal_dt_cpu_3; /* From cpu@4 */ -struct __metal_driver_cpu __metal_dt_cpu_4; +extern struct __metal_driver_cpu __metal_dt_cpu_4; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_1_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_1_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_2_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_2_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_3_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_3_interrupt_controller; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_4_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_4_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; -struct metal_pmp __metal_dt_pmp; +extern struct metal_pmp __metal_dt_pmp; /* From gpio@10060000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000; /* From i2c@10030000 */ -struct __metal_driver_sifive_i2c0 __metal_dt_i2c_10030000; +extern struct __metal_driver_sifive_i2c0 __metal_dt_i2c_10030000; /* From pwm@10020000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10020000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10020000; /* From pwm@10021000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10021000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10021000; /* From spi@10040000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10040000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10040000; /* From spi@10041000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10041000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10041000; /* From spi@10050000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10050000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10050000; /* From teststatus@4000 */ -struct __metal_driver_sifive_test0 __metal_dt_teststatus_4000; +extern struct __metal_driver_sifive_test0 __metal_dt_teststatus_4000; /* From serial@10010000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10010000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10010000; /* From serial@10011000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10011000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10011000; /* From cache_controller@2010000 */ -struct __metal_driver_sifive_fu540_c000_l2 __metal_dt_cache_controller_2010000; +extern struct __metal_driver_sifive_fu540_c000_l2 __metal_dt_cache_controller_2010000; @@ -1196,6 +1198,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -1347,6 +1352,11 @@ struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10010000, &__metal_dt_serial_10011000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 0 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/sifive-hifive1-revb/metal-inline.h b/bsp/sifive-hifive1-revb/metal-inline.h index 0fc1e7821..c13c09d20 100644 --- a/bsp/sifive-hifive1-revb/metal-inline.h +++ b/bsp/sifive-hifive1-revb/metal-inline.h @@ -138,6 +138,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog); extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_size(const struct metal_watchdog *const watchdog); @@ -280,6 +283,8 @@ struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000 = { .init_done = 0, }; +struct metal_pmp __metal_dt_pmp; + /* From gpio@10012000 */ struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000 = { .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio, diff --git a/bsp/sifive-hifive1-revb/metal.h b/bsp/sifive-hifive1-revb/metal.h index c9fdc1a11..62db17a4e 100644 --- a/bsp/sifive-hifive1-revb/metal.h +++ b/bsp/sifive-hifive1-revb/metal.h @@ -83,6 +83,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -105,99 +107,99 @@ #include /* From clock@0 */ -struct __metal_driver_fixed_clock __metal_dt_clock_0; +extern struct __metal_driver_fixed_clock __metal_dt_clock_0; /* From clock@2 */ -struct __metal_driver_fixed_clock __metal_dt_clock_2; +extern struct __metal_driver_fixed_clock __metal_dt_clock_2; /* From clock@5 */ -struct __metal_driver_fixed_clock __metal_dt_clock_5; +extern struct __metal_driver_fixed_clock __metal_dt_clock_5; /* From clock@6 */ -struct __metal_driver_fixed_clock __metal_dt_clock_6; +extern struct __metal_driver_fixed_clock __metal_dt_clock_6; -struct metal_memory __metal_dt_mem_dtim_80000000; +extern struct metal_memory __metal_dt_mem_dtim_80000000; -struct metal_memory __metal_dt_mem_itim_8000000; +extern struct metal_memory __metal_dt_mem_itim_8000000; -struct metal_memory __metal_dt_mem_spi_10014000; +extern struct metal_memory __metal_dt_mem_spi_10014000; -struct metal_memory __metal_dt_mem_spi_10024000; +extern struct metal_memory __metal_dt_mem_spi_10024000; -struct metal_memory __metal_dt_mem_spi_10034000; +extern struct metal_memory __metal_dt_mem_spi_10034000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; -struct metal_pmp __metal_dt_pmp; +extern struct metal_pmp __metal_dt_pmp; /* From gpio@10012000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; /* From led@0 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_0; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_0; /* From led@1 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_1; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_1; /* From led@2 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_2; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_2; /* From i2c@10016000 */ -struct __metal_driver_sifive_i2c0 __metal_dt_i2c_10016000; +extern struct __metal_driver_sifive_i2c0 __metal_dt_i2c_10016000; /* From pwm@10015000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; /* From pwm@10025000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10025000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10025000; /* From pwm@10035000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10035000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10035000; /* From aon@10000000 */ -struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; +extern struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; /* From spi@10014000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; /* From spi@10024000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10024000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10024000; /* From spi@10034000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10034000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10034000; /* From serial@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; /* From serial@10023000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10023000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10023000; /* From aon@10000000 */ -struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; +extern struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; /* From clock@3 */ -struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; +extern struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; /* From clock@1 */ -struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; +extern struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; /* From clock@7 */ -struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_7; +extern struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_7; /* From clock@4 */ -struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; +extern struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; /* From prci@10008000 */ -struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; +extern struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; @@ -1182,6 +1184,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ static __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog) { @@ -1472,6 +1477,11 @@ struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10013000, &__metal_dt_serial_10023000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 1 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/sifive-hifive1/metal-inline.h b/bsp/sifive-hifive1/metal-inline.h index 4a07385f9..6f83c0dd5 100644 --- a/bsp/sifive-hifive1/metal-inline.h +++ b/bsp/sifive-hifive1/metal-inline.h @@ -132,6 +132,9 @@ extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_output_select extern __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_selector(struct metal_uart *uart); +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog); extern __inline__ unsigned long __metal_driver_sifive_wdog0_control_size(const struct metal_watchdog *const watchdog); diff --git a/bsp/sifive-hifive1/metal.h b/bsp/sifive-hifive1/metal.h index 50e0dd7e4..d5fa32282 100644 --- a/bsp/sifive-hifive1/metal.h +++ b/bsp/sifive-hifive1/metal.h @@ -81,6 +81,8 @@ #define METAL_MAX_UART_INTERRUPTS 1 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -103,79 +105,79 @@ #include /* From clock@0 */ -struct __metal_driver_fixed_clock __metal_dt_clock_0; +extern struct __metal_driver_fixed_clock __metal_dt_clock_0; /* From clock@2 */ -struct __metal_driver_fixed_clock __metal_dt_clock_2; +extern struct __metal_driver_fixed_clock __metal_dt_clock_2; /* From clock@5 */ -struct __metal_driver_fixed_clock __metal_dt_clock_5; +extern struct __metal_driver_fixed_clock __metal_dt_clock_5; -struct metal_memory __metal_dt_mem_dtim_80000000; +extern struct metal_memory __metal_dt_mem_dtim_80000000; -struct metal_memory __metal_dt_mem_spi_10014000; +extern struct metal_memory __metal_dt_mem_spi_10014000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From interrupt_controller@c000000 */ -struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; +extern struct __metal_driver_riscv_plic0 __metal_dt_interrupt_controller_c000000; /* From local_external_interrupts_0 */ -struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; +extern struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_external_interrupts_0; /* From gpio@10012000 */ -struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; +extern struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000; /* From led@0 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_0; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_0; /* From led@1 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_1; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_1; /* From led@2 */ -struct __metal_driver_sifive_gpio_led __metal_dt_led_2; +extern struct __metal_driver_sifive_gpio_led __metal_dt_led_2; /* From pwm@10015000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10015000; /* From pwm@10025000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10025000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10025000; /* From pwm@10035000 */ -struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10035000; +extern struct __metal_driver_sifive_pwm0 __metal_dt_pwm_10035000; /* From aon@10000000 */ -struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; +extern struct __metal_driver_sifive_rtc0 __metal_dt_rtc_10000000; /* From spi@10014000 */ -struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; +extern struct __metal_driver_sifive_spi0 __metal_dt_spi_10014000; /* From serial@10013000 */ -struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; +extern struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000; /* From aon@10000000 */ -struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; +extern struct __metal_driver_sifive_wdog0 __metal_dt_aon_10000000; /* From clock@3 */ -struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; +extern struct __metal_driver_sifive_fe310_g000_hfrosc __metal_dt_clock_3; /* From clock@1 */ -struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; +extern struct __metal_driver_sifive_fe310_g000_hfxosc __metal_dt_clock_1; /* From clock@6 */ -struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; +extern struct __metal_driver_sifive_fe310_g000_lfrosc __metal_dt_clock_6; /* From clock@4 */ -struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; +extern struct __metal_driver_sifive_fe310_g000_pll __metal_dt_clock_4; /* From prci@10008000 */ -struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; +extern struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000; @@ -1041,6 +1043,9 @@ static __inline__ unsigned long __metal_driver_sifive_uart0_pinmux_source_select +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ static __inline__ unsigned long __metal_driver_sifive_wdog0_control_base(const struct metal_watchdog *const watchdog) { @@ -1324,6 +1329,11 @@ __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { &__metal_dt_serial_10013000}; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 1 __asm__ (".weak __metal_wdog_table"); diff --git a/bsp/spike/metal-inline.h b/bsp/spike/metal-inline.h index 6cc7f1b6c..b79bb63dc 100644 --- a/bsp/spike/metal-inline.h +++ b/bsp/spike/metal-inline.h @@ -83,6 +83,9 @@ extern __inline__ struct metal_buserror * __metal_driver_cpu_buserror(struct met /* --------------------- sifive_uart0 ------------ */ +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ diff --git a/bsp/spike/metal.h b/bsp/spike/metal.h index f864f71a6..821adb334 100644 --- a/bsp/spike/metal.h +++ b/bsp/spike/metal.h @@ -62,6 +62,8 @@ #define METAL_MAX_UART_INTERRUPTS 0 +#define METAL_MAX_SIMUART_INTERRUPTS 0 + #include #include @@ -70,21 +72,21 @@ #include #include -struct metal_memory __metal_dt_mem_memory_80000000; +extern struct metal_memory __metal_dt_mem_memory_80000000; /* From clint@2000000 */ -struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; +extern struct __metal_driver_riscv_clint0 __metal_dt_clint_2000000; /* From cpu@0 */ -struct __metal_driver_cpu __metal_dt_cpu_0; +extern struct __metal_driver_cpu __metal_dt_cpu_0; -struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; +extern struct __metal_driver_riscv_cpu_intc __metal_dt_cpu_0_interrupt_controller; /* From htif */ -struct __metal_driver_ucb_htif0_shutdown __metal_dt_htif_shutdown; +extern struct __metal_driver_ucb_htif0_shutdown __metal_dt_htif_shutdown; /* From htif */ -struct __metal_driver_ucb_htif0_uart __metal_dt_htif_uart; +extern struct __metal_driver_ucb_htif0_uart __metal_dt_htif_uart; @@ -254,6 +256,9 @@ static __inline__ struct metal_buserror * __metal_driver_cpu_buserror(struct met /* --------------------- sifive_uart0 ------------ */ +/* --------------------- sifive_simuart0 ------------ */ + + /* --------------------- sifive_wdog0 ------------ */ @@ -342,6 +347,11 @@ struct __metal_driver_sifive_spi0 *__metal_spi_table[] = { __asm__ (".weak __metal_uart_table"); struct __metal_driver_sifive_uart0 *__metal_uart_table[] = { NULL }; +#define __METAL_DT_MAX_SIMUARTS 0 + +__asm__ (".weak __metal_simuart_table"); +struct __metal_driver_sifive_simuart0 *__metal_simuart_table[] = { + NULL }; #define __METAL_DT_MAX_WDOGS 0 __asm__ (".weak __metal_wdog_table"); diff --git a/freedom-devicetree-tools b/freedom-devicetree-tools index db4ba0f4a..3670edbb3 160000 --- a/freedom-devicetree-tools +++ b/freedom-devicetree-tools @@ -1 +1 @@ -Subproject commit db4ba0f4a25cee3f892e48c4fe3b58570f148290 +Subproject commit 3670edbb341df75008f51bb7813df1951206802f diff --git a/wit-manifest.json b/wit-manifest.json index d92ee0329..2c3b17efc 100644 --- a/wit-manifest.json +++ b/wit-manifest.json @@ -1,6 +1,6 @@ [ { - "commit": "db4ba0f4a25cee3f892e48c4fe3b58570f148290", + "commit": "3670edbb341df75008f51bb7813df1951206802f", "name": "freedom-devicetree-tools", "source": "git@github.com:sifive/freedom-devicetree-tools.git" },