From fcd844f982a483f8cf354ff038843c5d61c6cf0f Mon Sep 17 00:00:00 2001 From: thread-liu Date: Sat, 15 Aug 2020 14:31:01 +0800 Subject: [PATCH 1/4] update error SFUD support manufacturer (Micronix -> Macronix) and add MX25L51245G sfud flash info. --- components/drivers/spi/sfud/inc/sfud_flash_def.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/drivers/spi/sfud/inc/sfud_flash_def.h b/components/drivers/spi/sfud/inc/sfud_flash_def.h index 5a7bc8c96a..03b95cd008 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}, \ } -- Gitee From 76d1651a7463eb4bdf1215bd28dd289647fd11eb Mon Sep 17 00:00:00 2001 From: xieyangrun Date: Sat, 15 Aug 2020 20:15:29 +0800 Subject: [PATCH 2/4] fixed the iterator failure for softtimer list timeout check. --- src/timer.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/timer.c b/src/timer.c index 4d12c7ec78..52707f2306 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)); -- Gitee From 90789be189413ad881950cb593839c94124e3ace Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 19 Aug 2020 10:03:52 +0800 Subject: [PATCH 3/4] MIPS:remove redundant #ifdef ARCH_MIPS64 there exist redundant #ifdef ARCH_MIPS64 in asm.h, remove it --- libcpu/mips/common/asm.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libcpu/mips/common/asm.h b/libcpu/mips/common/asm.h index 6a5353b803..1b39eea05a 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 -- Gitee From fdaea7fee634313cfcfb49d1867fd7a6ec26831c Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 20 Aug 2020 17:34:04 +0800 Subject: [PATCH 4/4] bsp:ls2k:make rtc driver to adapter Kconfig rtc driver can not configured through Kconfig --- bsp/ls2kdev/drivers/drv_rtc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bsp/ls2kdev/drivers/drv_rtc.c b/bsp/ls2kdev/drivers/drv_rtc.c index 3a873cc6fc..ee125122e3 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*/ -- Gitee