diff --git a/bsp/ls2kdev/drivers/drv_rtc.c b/bsp/ls2kdev/drivers/drv_rtc.c index 3a873cc6fcd3d89a28f941ae0b407fe583b94918..ee125122e379896bdf65fb1cbeaeffc5788b4d21 100644 --- a/bsp/ls2kdev/drivers/drv_rtc.c +++ b/bsp/ls2kdev/drivers/drv_rtc.c @@ -17,6 +17,8 @@ #include #include "ls2k1000.h" +#ifdef RT_USING_RTC + struct loongson_rtc { rt_uint32_t sys_toytrim; rt_uint32_t sys_toywrite0; @@ -176,3 +178,5 @@ int rt_hw_rtc_init(void) } INIT_DEVICE_EXPORT(rt_hw_rtc_init); + +#endif /*RT_USING_RTC*/ diff --git a/components/drivers/spi/sfud/inc/sfud_flash_def.h b/components/drivers/spi/sfud/inc/sfud_flash_def.h index 5a7bc8c96aea9be441dba1617940007a01c2e62f..03b95cd008c22e94f7ee7db62f3124183b898b4c 100644 --- a/components/drivers/spi/sfud/inc/sfud_flash_def.h +++ b/components/drivers/spi/sfud/inc/sfud_flash_def.h @@ -87,7 +87,7 @@ typedef struct { #define SFUD_MF_ID_FUDAN 0xA1 #define SFUD_MF_ID_HYUNDAI 0xAD #define SFUD_MF_ID_SST 0xBF -#define SFUD_MF_ID_MICRONIX 0xC2 +#define SFUD_MF_ID_MACRONIX 0xC2 #define SFUD_MF_ID_GIGADEVICE 0xC8 #define SFUD_MF_ID_ISSI 0xD5 #define SFUD_MF_ID_WINBOND 0xEF @@ -110,7 +110,7 @@ typedef struct { {"GigaDevice", SFUD_MF_ID_GIGADEVICE}, \ {"ISSI", SFUD_MF_ID_ISSI}, \ {"Winbond", SFUD_MF_ID_WINBOND}, \ - {"Micronix", SFUD_MF_ID_MICRONIX}, \ + {"Macronix", SFUD_MF_ID_MACRONIX}, \ } #ifdef SFUD_USING_FLASH_INFO_TABLE @@ -144,7 +144,7 @@ typedef struct { #endif /* SFUD_USING_FLASH_INFO_TABLE */ #ifdef SFUD_USING_QSPI -/* This table saves flash read-fast instructions in QSPI mode, +/* This table saves flash read-fast instructions in QSPI mode, * SFUD can use this table to select the most appropriate read instruction for flash. * | mf_id | type_id | capacity_id | qspi_read_mode | */ @@ -173,7 +173,9 @@ typedef struct { /* A25LQ64 */ \ {SFUD_MF_ID_AMIC, 0x40, 0x17, NORMAL_SPI_READ|DUAL_OUTPUT|DUAL_IO|QUAD_IO}, \ /* MX25L3206E and KH25L3206E */ \ - {SFUD_MF_ID_MICRONIX, 0x20, 0x16, NORMAL_SPI_READ|DUAL_OUTPUT}, \ + {SFUD_MF_ID_MACRONIX, 0x20, 0x16, NORMAL_SPI_READ|DUAL_OUTPUT}, \ + /* MX25L51245G */ \ + {SFUD_MF_ID_MACRONIX, 0x20, 0x1A, NORMAL_SPI_READ|DUAL_OUTPUT|DUAL_IO|QUAD_OUTPUT|QUAD_IO}, \ /* GD25Q64B */ \ {SFUD_MF_ID_GIGADEVICE, 0x40, 0x17, NORMAL_SPI_READ|DUAL_OUTPUT}, \ } diff --git a/libcpu/mips/common/asm.h b/libcpu/mips/common/asm.h index 6a5353b8039e4e949387e5e00f954ecdf9cc8d4c..1b39eea05a06b58b94fdc8d0e144c18c52012291 100644 --- a/libcpu/mips/common/asm.h +++ b/libcpu/mips/common/asm.h @@ -261,11 +261,7 @@ symbol = value #define LONG_SRAV srav #define LONG .word -#ifdef ARCH_MIPS64 -#define LONGSIZE 8 -#else #define LONGSIZE 4 -#endif #define LONGMASK 3 #define LONGLOG 2 diff --git a/src/timer.c b/src/timer.c index 4d12c7ec782bd8468cc3f72e8b17a9433547a92a..52707f230668c6a3bb1f51b6c3e8d8a6433ee385 100644 --- a/src/timer.c +++ b/src/timer.c @@ -595,20 +595,19 @@ rt_tick_t rt_timer_next_timeout_tick(void) void rt_soft_timer_check(void) { rt_tick_t current_tick; - rt_list_t *n; struct rt_timer *t; RT_DEBUG_LOG(RT_DEBUG_TIMER, ("software timer check enter\n")); - current_tick = rt_tick_get(); - /* lock scheduler */ rt_enter_critical(); - for (n = rt_soft_timer_list[RT_TIMER_SKIP_LIST_LEVEL - 1].next; - n != &(rt_soft_timer_list[RT_TIMER_SKIP_LIST_LEVEL - 1]);) + while (!rt_list_isempty(&rt_soft_timer_list[RT_TIMER_SKIP_LIST_LEVEL - 1])) { - t = rt_list_entry(n, struct rt_timer, row[RT_TIMER_SKIP_LIST_LEVEL - 1]); + t = rt_list_entry(rt_soft_timer_list[RT_TIMER_SKIP_LIST_LEVEL - 1].next, + struct rt_timer, row[RT_TIMER_SKIP_LIST_LEVEL - 1]); + + current_tick = rt_tick_get(); /* * It supposes that the new tick shall less than the half duration of @@ -618,9 +617,6 @@ void rt_soft_timer_check(void) { RT_OBJECT_HOOK_CALL(rt_timer_enter_hook, (t)); - /* move node to the next */ - n = n->next; - /* remove timer from timer list firstly */ _rt_timer_remove(t); @@ -629,9 +625,6 @@ void rt_soft_timer_check(void) /* call timeout function */ t->timeout_func(t->parameter); - /* re-get tick */ - current_tick = rt_tick_get(); - RT_OBJECT_HOOK_CALL(rt_timer_exit_hook, (t)); RT_DEBUG_LOG(RT_DEBUG_TIMER, ("current tick: %d\n", current_tick));