Skip to content

Commit 709e0d5

Browse files
committed
add bsp/raspi4 gicv2
1 parent a120c91 commit 709e0d5

File tree

6 files changed

+299
-333
lines changed

6 files changed

+299
-333
lines changed

bsp/raspberry-pi/raspi4/driver/board.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ void rt_hw_board_init(void)
7575
rt_hw_interrupt_init(); // in libcpu/interrupt.c. Set some data structures, no operation on device
7676
rt_hw_vector_init(); // in libcpu/interrupt.c. == rt_cpu_vector_set_base((rt_ubase_t)&system_vectors);
7777

78-
/* initialize timer for os tick */
79-
rt_hw_timer_init();
80-
rt_thread_idle_sethook(idle_wfi);
81-
8278
/* initialize uart */
8379
rt_hw_uart_init(); // driver/drv_uart.c
8480
#ifdef RT_USING_CONSOLE
@@ -91,6 +87,9 @@ void rt_hw_board_init(void)
9187
rt_kprintf("heap: 0x%08x - 0x%08x\n", RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
9288
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
9389
#endif
90+
/* initialize timer for os tick */
91+
rt_hw_timer_init();
92+
rt_thread_idle_sethook(idle_wfi);
9493

9594
#ifdef RT_USING_COMPONENTS_INIT
9695
rt_components_board_init();

bsp/raspberry-pi/raspi4/driver/iomap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef __RASPI4_H__
22
#define __RASPI4_H__
33

4+
#define ARM_GIC_NR_IRQS 512
45
#define INTC_BASE 0xff800000
56
#define GIC_V2_DISTRIBUTOR_BASE (INTC_BASE + 0x00041000)
67
#define GIC_V2_CPU_INTERFACE_BASE (INTC_BASE + 0x00042000)

bsp/raspberry-pi/raspi4/rtconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
OBJDUMP = PREFIX + 'objdump'
3333
OBJCPY = PREFIX + 'objcopy'
3434

35-
DEVICE = ' -march=armv8-a -mtune=cortex-a57'
35+
DEVICE = ' -march=armv8-a -mtune=cortex-a72'
3636
CFLAGS = DEVICE + ' -Wall'
3737
AFLAGS = ' -c' + ' -x assembler-with-cpp -D__ASSEMBLY__'
3838
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds'

0 commit comments

Comments
 (0)