From 501b22aabede2d4e179bfc47f3b75522e5933da4 Mon Sep 17 00:00:00 2001
From: 7YZ7 <82019212+7YZ7@users.noreply.github.com>
Date: Tue, 18 Apr 2023 10:26:23 +0800
Subject: [PATCH] [HUST CSE] Fix many abnormal symbols in annotations and
format code
---
.../CMSIS/Vango/V85xx/Include/target.h | 2 +-
.../FT32F0xx_Driver/Src/ft32f0xx_flash.c | 4 +-
.../FT32F0xx_Driver/Src/ft32f0xx_rtc.c | 2 +-
.../Source/gd32f4xx_rtc.c | 6 +-
.../Source/gd32f4xx_rtc.c | 6 +-
.../hpm_sdk/soc/HPM6360/HPM6360_svd.xml | 48 +-
.../hpm_sdk/soc/HPM6750/HPM6750_svd.xml | 48 +-
.../libraries/hpm_sdk/soc/ip/hpm_dma_regs.h | 6 +-
bsp/imxrt/libraries/drivers/drv_eth.c | 2 +-
bsp/simulator/drivers/uart_console.c | 8 +-
.../board/ports/drv_ov2640.h | 4 +-
components/drivers/audio/audio.c | 2 +-
components/drivers/audio/audio_pipe.c | 2 +-
components/drivers/audio/audio_pipe.h | 2 +-
components/drivers/can/can.c | 2 +-
components/drivers/cputime/cputime.c | 2 +-
components/drivers/cputime/cputime_cortexm.c | 2 +-
components/drivers/fdt/libfdt/fdt.c | 256 +++---
components/drivers/fdt/libfdt/fdt.h | 2 +-
.../drivers/fdt/libfdt/fdt_empty_tree.c | 34 +-
components/drivers/fdt/libfdt/fdt_ro.c | 808 +++++++++---------
components/drivers/fdt/libfdt/fdt_rw.c | 562 ++++++------
components/drivers/fdt/libfdt/fdt_strerror.c | 60 +-
components/drivers/fdt/libfdt/fdt_sw.c | 292 +++----
components/drivers/fdt/libfdt/fdt_wip.c | 90 +-
components/drivers/fdt/libfdt/libfdt_env.h | 22 +-
.../drivers/fdt/libfdt/libfdt_internal.h | 30 +-
components/drivers/fdt/src/dtb_base.c | 10 +-
components/drivers/fdt/src/dtb_get.c | 2 +-
components/drivers/fdt/src/dtb_head.c | 4 +-
components/drivers/fdt/src/dtb_load.c | 2 +-
components/drivers/fdt/src/dtb_set.c | 2 +-
components/drivers/hwcrypto/hw_bignum.c | 2 +-
components/drivers/hwcrypto/hw_bignum.h | 2 +-
components/drivers/hwcrypto/hw_crc.c | 2 +-
components/drivers/hwcrypto/hw_crc.h | 2 +-
components/drivers/hwcrypto/hw_gcm.c | 2 +-
components/drivers/hwcrypto/hw_gcm.h | 2 +-
components/drivers/hwcrypto/hw_hash.c | 2 +-
components/drivers/hwcrypto/hw_hash.h | 2 +-
components/drivers/hwcrypto/hw_rng.c | 2 +-
components/drivers/hwcrypto/hw_rng.h | 2 +-
components/drivers/hwcrypto/hw_symmetric.c | 2 +-
components/drivers/hwcrypto/hw_symmetric.h | 2 +-
components/drivers/hwcrypto/hwcrypto.c | 2 +-
components/drivers/hwcrypto/hwcrypto.h | 2 +-
components/drivers/hwtimer/hwtimer.c | 2 +-
components/drivers/i2c/i2c-bit-ops.c | 2 +-
components/drivers/i2c/i2c_core.c | 2 +-
components/drivers/i2c/i2c_dev.c | 2 +-
components/drivers/include/drivers/adc.h | 2 +-
components/drivers/include/drivers/alarm.h | 2 +-
components/drivers/include/drivers/audio.h | 2 +-
components/drivers/include/drivers/can.h | 2 +-
components/drivers/include/drivers/cputime.h | 2 +-
components/drivers/include/drivers/crypto.h | 2 +-
components/drivers/include/drivers/dac.h | 2 +-
components/drivers/include/drivers/gpt.h | 2 +-
components/drivers/include/drivers/hwtimer.h | 2 +-
.../drivers/include/drivers/i2c-bit-ops.h | 2 +-
components/drivers/include/drivers/i2c.h | 2 +-
components/drivers/include/drivers/i2c_dev.h | 2 +-
components/drivers/include/drivers/lcd.h | 4 +-
components/drivers/include/drivers/lptimer.h | 2 +-
components/drivers/include/drivers/mmc.h | 2 +-
.../drivers/include/drivers/mmcsd_card.h | 2 +-
.../drivers/include/drivers/mmcsd_cmd.h | 2 +-
.../drivers/include/drivers/mmcsd_core.h | 2 +-
.../drivers/include/drivers/mmcsd_host.h | 2 +-
components/drivers/include/drivers/mtd_nand.h | 2 +-
components/drivers/include/drivers/phy.h | 2 +-
components/drivers/include/drivers/phy_mdio.h | 2 +-
components/drivers/include/drivers/pin.h | 2 +-
components/drivers/include/drivers/pm.h | 2 +-
.../drivers/include/drivers/pulse_encoder.h | 2 +-
.../drivers/include/drivers/rt_dev_bus.h | 2 +-
.../drivers/include/drivers/rt_drv_pwm.h | 2 +-
.../drivers/include/drivers/rt_inputcapture.h | 2 +-
components/drivers/include/drivers/rtc.h | 2 +-
components/drivers/include/drivers/sd.h | 2 +-
components/drivers/include/drivers/sdio.h | 2 +-
.../drivers/include/drivers/sdio_func_ids.h | 2 +-
components/drivers/include/drivers/sensor.h | 2 +-
components/drivers/include/drivers/serial.h | 2 +-
.../drivers/include/drivers/serial_v2.h | 2 +-
components/drivers/include/drivers/touch.h | 2 +-
.../drivers/include/drivers/usb_common.h | 2 +-
.../drivers/include/drivers/usb_device.h | 2 +-
components/drivers/include/drivers/usb_host.h | 2 +-
components/drivers/include/drivers/watchdog.h | 2 +-
components/drivers/include/drivers/wlan.h | 2 +-
components/drivers/include/ipc/completion.h | 2 +-
components/drivers/include/ipc/dataqueue.h | 2 +-
components/drivers/include/ipc/pipe.h | 2 +-
components/drivers/include/ipc/poll.h | 2 +-
components/drivers/include/ipc/ringblk_buf.h | 2 +-
components/drivers/include/ipc/ringbuffer.h | 2 +-
components/drivers/include/ipc/waitqueue.h | 2 +-
components/drivers/include/ipc/workqueue.h | 2 +-
components/drivers/include/rtdevice.h | 2 +-
components/drivers/ipc/completion.c | 2 +-
components/drivers/ipc/dataqueue.c | 2 +-
components/drivers/ipc/pipe.c | 2 +-
components/drivers/ipc/ringblk_buf.c | 2 +-
components/drivers/ipc/waitqueue.c | 2 +-
components/drivers/ipc/workqueue.c | 2 +-
components/drivers/misc/adc.c | 2 +-
components/drivers/misc/dac.c | 2 +-
components/drivers/misc/pin.c | 2 +-
components/drivers/misc/pulse_encoder.c | 2 +-
components/drivers/misc/rt_dev_bus.c | 2 +-
components/drivers/misc/rt_drv_pwm.c | 2 +-
components/drivers/misc/rt_inputcapture.c | 2 +-
components/drivers/misc/rt_null.c | 2 +-
components/drivers/misc/rt_random.c | 2 +-
components/drivers/misc/rt_zero.c | 2 +-
components/drivers/mtd/mtd_nand.c | 2 +-
components/drivers/phy/phy.c | 2 +-
components/drivers/pm/lptimer.c | 2 +-
components/drivers/pm/pm.c | 2 +-
components/drivers/rtc/alarm.c | 2 +-
components/drivers/rtc/rtc.c | 2 +-
components/drivers/rtc/soft_rtc.c | 2 +-
components/drivers/sdio/block_dev.c | 2 +-
components/drivers/sdio/gpt.c | 10 +-
components/drivers/sdio/mmc.c | 2 +-
components/drivers/sdio/mmcsd_core.c | 2 +-
components/drivers/sdio/sd.c | 2 +-
components/drivers/sdio/sdio.c | 2 +-
components/drivers/sensor/sensor.c | 2 +-
components/drivers/sensor/sensor_cmd.c | 2 +-
components/drivers/serial/serial.c | 2 +-
components/drivers/serial/serial_v2.c | 2 +-
components/drivers/spi/enc28j60.c | 2 +-
components/drivers/spi/enc28j60.h | 2 +-
components/drivers/spi/qspi_core.c | 2 +-
components/drivers/spi/spi-bit-ops.h | 2 +-
components/drivers/spi/spi_dev.c | 2 +-
components/drivers/spi/spi_flash.h | 2 +-
components/drivers/spi/spi_flash_sfud.c | 2 +-
components/drivers/spi/spi_flash_sfud.h | 2 +-
components/drivers/spi/spi_msd.c | 2 +-
components/drivers/spi/spi_msd.h | 2 +-
components/drivers/spi/spi_wifi_rw009.c | 2 +-
components/drivers/spi/spi_wifi_rw009.h | 2 +-
components/drivers/touch/touch.c | 2 +-
components/drivers/tty/console.c | 2 +-
components/drivers/tty/include/console.h | 2 +-
components/drivers/tty/include/tty.h | 2 +-
components/drivers/tty/include/tty_ldisc.h | 2 +-
components/drivers/tty/n_tty.c | 2 +-
components/drivers/tty/pty.c | 2 +-
components/drivers/tty/tty.c | 2 +-
components/drivers/tty/tty_ioctl.c | 4 +-
components/drivers/tty/tty_ldisc.c | 2 +-
.../drivers/usb/usbdevice/class/audio_mic.c | 2 +-
.../usb/usbdevice/class/audio_speaker.c | 2 +-
components/drivers/usb/usbdevice/class/cdc.h | 2 +-
.../drivers/usb/usbdevice/class/cdc_vcom.c | 2 +-
components/drivers/usb/usbdevice/class/ecm.c | 2 +-
components/drivers/usb/usbdevice/class/hid.h | 2 +-
.../drivers/usb/usbdevice/class/mstorage.c | 2 +-
.../drivers/usb/usbdevice/class/mstorage.h | 2 +-
components/drivers/usb/usbdevice/class/ndis.h | 2 +-
.../drivers/usb/usbdevice/class/rndis.c | 2 +-
.../drivers/usb/usbdevice/class/rndis.h | 2 +-
.../drivers/usb/usbdevice/class/winusb.c | 2 +-
.../drivers/usb/usbdevice/class/winusb.h | 2 +-
.../usb/usbdevice/core/usbdevice_core.c | 2 +-
components/drivers/usb/usbhost/class/adk.c | 2 +-
components/drivers/usb/usbhost/class/adk.h | 2 +-
components/drivers/usb/usbhost/class/hid.c | 2 +-
components/drivers/usb/usbhost/class/hid.h | 2 +-
components/drivers/usb/usbhost/class/mass.c | 2 +-
components/drivers/usb/usbhost/class/mass.h | 2 +-
components/drivers/usb/usbhost/class/udisk.c | 2 +-
components/drivers/usb/usbhost/class/ukbd.c | 2 +-
components/drivers/usb/usbhost/class/umouse.c | 2 +-
components/drivers/usb/usbhost/core/driver.c | 2 +-
components/drivers/usb/usbhost/core/hub.c | 2 +-
components/drivers/usb/usbhost/core/usbhost.c | 2 +-
.../drivers/usb/usbhost/core/usbhost_core.c | 2 +-
components/drivers/virtio/virtio.c | 2 +-
components/drivers/virtio/virtio.h | 2 +-
components/drivers/virtio/virtio_blk.c | 2 +-
components/drivers/virtio/virtio_blk.h | 2 +-
components/drivers/virtio/virtio_console.c | 2 +-
components/drivers/virtio/virtio_console.h | 2 +-
components/drivers/virtio/virtio_gpu.c | 2 +-
components/drivers/virtio/virtio_gpu.h | 2 +-
components/drivers/virtio/virtio_input.c | 2 +-
components/drivers/virtio/virtio_input.h | 2 +-
.../drivers/virtio/virtio_input_event_codes.h | 2 +-
components/drivers/virtio/virtio_mmio.h | 2 +-
components/drivers/virtio/virtio_net.c | 2 +-
components/drivers/virtio/virtio_net.h | 2 +-
components/drivers/virtio/virtio_queue.h | 2 +-
components/drivers/watchdog/watchdog.c | 2 +-
components/drivers/wlan/wlan_cfg.c | 2 +-
components/drivers/wlan/wlan_cfg.h | 2 +-
components/drivers/wlan/wlan_cmd.c | 2 +-
components/drivers/wlan/wlan_dev.c | 2 +-
components/drivers/wlan/wlan_dev.h | 2 +-
components/drivers/wlan/wlan_lwip.c | 2 +-
components/drivers/wlan/wlan_mgnt.c | 2 +-
components/drivers/wlan/wlan_mgnt.h | 2 +-
components/drivers/wlan/wlan_prot.c | 2 +-
components/drivers/wlan/wlan_prot.h | 2 +-
components/drivers/wlan/wlan_workqueue.c | 2 +-
components/drivers/wlan/wlan_workqueue.h | 2 +-
libcpu/mips/gs232/ls1c.h | 7 +-
211 files changed, 1349 insertions(+), 1350 deletions(-)
diff --git a/bsp/Vango/v85xx/Libraries/CMSIS/Vango/V85xx/Include/target.h b/bsp/Vango/v85xx/Libraries/CMSIS/Vango/V85xx/Include/target.h
index 4a1b554740..c069cead67 100644
--- a/bsp/Vango/v85xx/Libraries/CMSIS/Vango/V85xx/Include/target.h
+++ b/bsp/Vango/v85xx/Libraries/CMSIS/Vango/V85xx/Include/target.h
@@ -1089,7 +1089,7 @@ typedef struct
//#define ANA_REGA_PSLSEL ANA_REGA_PSLSEL_Msk /*!< power switch level selection */
//#define ANA_REGA_PD_PORH_Pos (5U)
//#define ANA_REGA_PD_PORH_Msk (0x1U << ANA_REGA_PD_PORH_Pos) /*!< 0x00000020 */
-//#define ANA_REGA_PD_PORH ANA_REGA_PD_PORH_Msk /*!< PD POR_H module, output ��1�� when PD */
+//#define ANA_REGA_PD_PORH ANA_REGA_PD_PORH_Msk /*!< PD POR_H module, output '1' when PD */
//#define ANA_REGA_PD_RCL_Pos (6U)
//#define ANA_REGA_PD_RCL_Msk (0x1U << ANA_REGA_PD_RCL_Pos) /*!< 0x00000040 */
//#define ANA_REGA_PD_RCL ANA_REGA_PD_RCL_Msk /*!< PD 32K RC module */
diff --git a/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_flash.c b/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_flash.c
index 2bfd1bd0fd..006438111a 100644
--- a/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_flash.c
+++ b/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_flash.c
@@ -858,11 +858,11 @@ FLASH_Status FLASH_OB_Erase(void)
/* Get the actual read protection Option Byte value */
if(FLASH_OB_GetRDP() != RESET)
{
- rdptmp = 0x0000 | 0xff00; //��������1
+ rdptmp = 0x0000 | 0xff00; //读保护级别1
}
else
{
- rdptmp = OB_RDP_Level_0 | 0x5500; //��������0
+ rdptmp = OB_RDP_Level_0 | 0x5500; //读保护级别0
}
/*Get iwdg value */
diff --git a/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_rtc.c b/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
index 9f1a51e0ad..1708575e6c 100644
--- a/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
+++ b/bsp/ft32/libraries/FT32F0xx/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
@@ -1303,7 +1303,7 @@ void RTC_TimeStampCmd(uint32_t RTC_TimeStampEdge, FunctionalState NewState)
{
uint32_t tmpreg = 0;
- /*��Edge�ĸ��û�д�λ�Ķ���*/
+ /* 设置Edge的边缘触发,没有特定位的情况 */
/* Check the parameters */
assert_param(IS_RTC_TIMESTAMP_EDGE(RTC_TimeStampEdge));
assert_param(IS_FUNCTIONAL_STATE(NewState));
diff --git a/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c b/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
index 8003e92c2d..4c576e64f4 100644
--- a/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
+++ b/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
@@ -68,7 +68,7 @@ ErrStatus rtc_deinit(void)
error_status = rtc_init_mode_enter();
if(ERROR != error_status) {
- /* reset RTC_CTL register, but RTC_CTL[2��0] */
+ /* reset RTC_CTL register, but RTC_CTL[2:0] */
RTC_CTL &= (RTC_REGISTER_RESET | RTC_CTL_WTCS);
/* before reset RTC_TIME and RTC_DATE, BPSHAD bit in RTC_CTL should be reset as the condition.
in order to read calendar from shadow register, not the real registers being reset */
@@ -76,7 +76,7 @@ ErrStatus rtc_deinit(void)
RTC_DATE = RTC_DATE_RESET;
RTC_PSC = RTC_PSC_RESET;
- /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2��0] */
+ /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2:0] */
/* wait until the WTWF flag to be set */
do {
flag_status = RTC_STAT & RTC_STAT_WTWF;
@@ -1095,7 +1095,7 @@ ErrStatus rtc_wakeup_clock_set(uint8_t wakeup_clock)
/* disable the write protection */
RTC_WPK = RTC_UNLOCK_KEY1;
RTC_WPK = RTC_UNLOCK_KEY2;
- /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2��0] */
+ /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2:0] */
/* wait until the WTWF flag to be set */
do {
flag_status = RTC_STAT & RTC_STAT_WTWF;
diff --git a/bsp/gd32450z-eval/Libraries/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c b/bsp/gd32450z-eval/Libraries/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
index 12ee6c3207..323da9f788 100644
--- a/bsp/gd32450z-eval/Libraries/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
+++ b/bsp/gd32450z-eval/Libraries/GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c
@@ -68,7 +68,7 @@ ErrStatus rtc_deinit(void)
error_status = rtc_init_mode_enter();
if(ERROR != error_status){
- /* reset RTC_CTL register, but RTC_CTL[2��0] */
+ /* reset RTC_CTL register, but RTC_CTL[2:0] */
RTC_CTL &= (RTC_REGISTER_RESET | RTC_CTL_WTCS);
/* before reset RTC_TIME and RTC_DATE, BPSHAD bit in RTC_CTL should be reset as the condition.
in order to read calendar from shadow register, not the real registers being reset */
@@ -76,7 +76,7 @@ ErrStatus rtc_deinit(void)
RTC_DATE = RTC_DATE_RESET;
RTC_PSC = RTC_PSC_RESET;
- /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2��0] */
+ /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2:0] */
/* wait until the WTWF flag to be set */
do{
flag_status = RTC_STAT & RTC_STAT_WTWF;
@@ -1096,7 +1096,7 @@ ErrStatus rtc_wakeup_clock_set(uint8_t wakeup_clock)
/* disable the write protection */
RTC_WPK = RTC_UNLOCK_KEY1;
RTC_WPK = RTC_UNLOCK_KEY2;
- /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2��0] */
+ /* only when RTC_CTL_WTEN=0 and RTC_STAT_WTWF=1 can write RTC_CTL[2:0] */
/* wait until the WTWF flag to be set */
do{
flag_status = RTC_STAT & RTC_STAT_WTWF;
diff --git a/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6360/HPM6360_svd.xml b/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6360/HPM6360_svd.xml
index baea1d60a1..cfa1eedc02 100644
--- a/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6360/HPM6360_svd.xml
+++ b/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6360/HPM6360_svd.xml
@@ -25077,7 +25077,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -25091,7 +25091,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -25107,7 +25107,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -25388,7 +25388,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -25402,7 +25402,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -25418,7 +25418,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -25699,7 +25699,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -25713,7 +25713,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -25729,7 +25729,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -26010,7 +26010,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -26024,7 +26024,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -26040,7 +26040,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -26321,7 +26321,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -26335,7 +26335,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -26351,7 +26351,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -26632,7 +26632,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -26646,7 +26646,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -26662,7 +26662,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -26943,7 +26943,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -26957,7 +26957,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -26973,7 +26973,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -27254,7 +27254,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -27268,7 +27268,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -27284,7 +27284,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
diff --git a/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6750/HPM6750_svd.xml b/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6750/HPM6750_svd.xml
index e6b4f7cb4d..4cb4a912c3 100644
--- a/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6750/HPM6750_svd.xml
+++ b/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6750/HPM6750_svd.xml
@@ -34249,7 +34249,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -34263,7 +34263,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -34279,7 +34279,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -34560,7 +34560,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -34574,7 +34574,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -34590,7 +34590,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -34871,7 +34871,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -34885,7 +34885,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -34901,7 +34901,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -35182,7 +35182,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -35196,7 +35196,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -35212,7 +35212,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -35493,7 +35493,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -35507,7 +35507,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -35523,7 +35523,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -35804,7 +35804,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -35818,7 +35818,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -35834,7 +35834,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -36115,7 +36115,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -36129,7 +36129,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -36145,7 +36145,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
@@ -36426,7 +36426,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x8: 256 transfers
0x9:512 transfers
0xa: 1024 transfers
-0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
24
4
read-write
@@ -36440,7 +36440,7 @@ The burst transfer byte number is (SrcBurstSize * SrcWidth).
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
21
3
read-write
@@ -36456,7 +36456,7 @@ See field SrcBurstSize above for the definition of burst transfer byte number an
0x3: Double word transfer
0x4: Quad word transfer
0x5: Eight word transfer
-0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
18
3
read-write
diff --git a/bsp/hpmicro/libraries/hpm_sdk/soc/ip/hpm_dma_regs.h b/bsp/hpmicro/libraries/hpm_sdk/soc/ip/hpm_dma_regs.h
index a4e47861ba..9ddbd9c766 100644
--- a/bsp/hpmicro/libraries/hpm_sdk/soc/ip/hpm_dma_regs.h
+++ b/bsp/hpmicro/libraries/hpm_sdk/soc/ip/hpm_dma_regs.h
@@ -273,7 +273,7 @@ typedef struct {
* 0x8: 256 transfers
* 0x9:512 transfers
* 0xa: 1024 transfers
- * 0xb �?0xf: Reserved, setting this field with a reserved value triggers the error exception
+ * 0xb -0xf: Reserved, setting this field with a reserved value triggers the error exception
*/
#define DMA_CHCTRL_CTRL_SRCBURSTSIZE_MASK (0xF000000UL)
#define DMA_CHCTRL_CTRL_SRCBURSTSIZE_SHIFT (24U)
@@ -290,7 +290,7 @@ typedef struct {
* 0x3: Double word transfer
* 0x4: Quad word transfer
* 0x5: Eight word transfer
- * 0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+ * 0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
*/
#define DMA_CHCTRL_CTRL_SRCWIDTH_MASK (0xE00000UL)
#define DMA_CHCTRL_CTRL_SRCWIDTH_SHIFT (21U)
@@ -309,7 +309,7 @@ typedef struct {
* 0x3: Double word transfer
* 0x4: Quad word transfer
* 0x5: Eight word transfer
- * 0x6�?x7: Reserved, setting this field with a reserved value triggers the error exception
+ * 0x6-x7: Reserved, setting this field with a reserved value triggers the error exception
*/
#define DMA_CHCTRL_CTRL_DSTWIDTH_MASK (0x1C0000UL)
#define DMA_CHCTRL_CTRL_DSTWIDTH_SHIFT (18U)
diff --git a/bsp/imxrt/libraries/drivers/drv_eth.c b/bsp/imxrt/libraries/drivers/drv_eth.c
index dbe95d2410..e240b5b969 100644
--- a/bsp/imxrt/libraries/drivers/drv_eth.c
+++ b/bsp/imxrt/libraries/drivers/drv_eth.c
@@ -1020,7 +1020,7 @@ static int rt_hw_imxrt_eth_init(void)
imxrt_eth_device.dev_addr[4] = 0x22;
imxrt_eth_device.dev_addr[5] = 0x33;
- imxrt_eth_device.speed = kENET_MiiSpeed100M;//Ҫ֧��ǧ�ף�ֱ�ӽ���ֵ��ΪkENET_MiiSpeed1000M
+ imxrt_eth_device.speed = kENET_MiiSpeed100M;//要支持千兆,直接赋值为kENET_MiiSpeed1000M
imxrt_eth_device.duplex = kENET_MiiFullDuplex;
imxrt_eth_device.enet_base = ENET_1G;
diff --git a/bsp/simulator/drivers/uart_console.c b/bsp/simulator/drivers/uart_console.c
index 88da0950ed..d869a4232c 100644
--- a/bsp/simulator/drivers/uart_console.c
+++ b/bsp/simulator/drivers/uart_console.c
@@ -117,10 +117,10 @@ static void * ThreadforKeyGet(void * lpParam)
#endif /* not _WIN32*/
{
/*
- * left key(��)�� 0xe04b
- * up key(��)�� 0xe048
- * right key(��)�� 0xe04d
- * down key(��)�� 0xe050
+ * left key(左): 0xe04b
+ * up key(上): 0xe048
+ * right key(右): 0xe04d
+ * down key(下): 0xe050
*/
unsigned char key;
diff --git a/bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.h b/bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.h
index e85e559421..bebd5fbb91 100644
--- a/bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.h
+++ b/bsp/stm32/stm32h743-atk-apollo/board/ports/drv_ov2640.h
@@ -21,7 +21,7 @@ extern "C" {
#define OV2640_PID 0X2642
-//褰撻�夋嫨DSP鍦板潃(0XFF=0X00)鏃�,OV2640鐨凞SP瀵勫瓨鍣ㄥ湴鍧�鏄犲皠琛�
+//当选择DSP地址(0XFF=0X00)时,OV2640的DSP寄存器地址映射表
#define OV2640_DSP_R_BYPASS 0x05
#define OV2640_DSP_Qs 0x44
#define OV2640_DSP_CTRL 0x50
@@ -57,7 +57,7 @@ extern "C" {
#define OV2640_DSP_P_STATUS 0xFE
#define OV2640_DSP_RA_DLMT 0xFF
-//褰撻�夋嫨浼犳劅鍣ㄥ湴鍧�(0XFF=0X01)鏃�,OV2640鐨凞SP瀵勫瓨鍣ㄥ湴鍧�鏄犲皠琛�
+//当选择DSP地址(0XFF=0X01)时,OV2640的DSP寄存器地址映射表
#define OV2640_SENSOR_GAIN 0x00
#define OV2640_SENSOR_COM1 0x03
#define OV2640_SENSOR_REG04 0x04
diff --git a/components/drivers/audio/audio.c b/components/drivers/audio/audio.c
index 2907b10ba0..22ee81e51f 100644
--- a/components/drivers/audio/audio.c
+++ b/components/drivers/audio/audio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/audio/audio_pipe.c b/components/drivers/audio/audio_pipe.c
index 4c8aa288b1..1901f7b38b 100644
--- a/components/drivers/audio/audio_pipe.c
+++ b/components/drivers/audio/audio_pipe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/audio/audio_pipe.h b/components/drivers/audio/audio_pipe.h
index 6c4719d56d..88cbecaa22 100644
--- a/components/drivers/audio/audio_pipe.h
+++ b/components/drivers/audio/audio_pipe.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/can/can.c b/components/drivers/can/can.c
index 53bc2ba45a..63b738b2c5 100644
--- a/components/drivers/can/can.c
+++ b/components/drivers/can/can.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/cputime/cputime.c b/components/drivers/cputime/cputime.c
index b8060299b1..42298ea98c 100644
--- a/components/drivers/cputime/cputime.c
+++ b/components/drivers/cputime/cputime.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/cputime/cputime_cortexm.c b/components/drivers/cputime/cputime_cortexm.c
index 52626a2f98..100910a9f9 100644
--- a/components/drivers/cputime/cputime_cortexm.c
+++ b/components/drivers/cputime/cputime_cortexm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/fdt/libfdt/fdt.c b/components/drivers/fdt/libfdt/fdt.c
index 1d4c606985..ecc7e8abee 100644
--- a/components/drivers/fdt/libfdt/fdt.c
+++ b/components/drivers/fdt/libfdt/fdt.c
@@ -55,195 +55,195 @@
int fdt_check_header(const void *fdt)
{
- if (fdt_magic(fdt) == FDT_MAGIC) {
- /* Complete tree */
- if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
- return -FDT_ERR_BADVERSION;
- if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
- return -FDT_ERR_BADVERSION;
- } else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
- /* Unfinished sequential-write blob */
- if (fdt_size_dt_struct(fdt) == 0)
- return -FDT_ERR_BADSTATE;
- } else {
- return -FDT_ERR_BADMAGIC;
- }
+ if (fdt_magic(fdt) == FDT_MAGIC) {
+ /* Complete tree */
+ if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
+ return -FDT_ERR_BADVERSION;
+ if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
+ return -FDT_ERR_BADVERSION;
+ } else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
+ /* Unfinished sequential-write blob */
+ if (fdt_size_dt_struct(fdt) == 0)
+ return -FDT_ERR_BADSTATE;
+ } else {
+ return -FDT_ERR_BADMAGIC;
+ }
- return 0;
+ return 0;
}
const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
{
- unsigned absoffset = offset + fdt_off_dt_struct(fdt);
+ unsigned absoffset = offset + fdt_off_dt_struct(fdt);
- if ((absoffset < offset)
- || ((absoffset + len) < absoffset)
- || (absoffset + len) > fdt_totalsize(fdt))
- return NULL;
+ if ((absoffset < offset)
+ || ((absoffset + len) < absoffset)
+ || (absoffset + len) > fdt_totalsize(fdt))
+ return NULL;
- if (fdt_version(fdt) >= 0x11)
- if (((offset + len) < offset)
- || ((offset + len) > fdt_size_dt_struct(fdt)))
- return NULL;
+ if (fdt_version(fdt) >= 0x11)
+ if (((offset + len) < offset)
+ || ((offset + len) > fdt_size_dt_struct(fdt)))
+ return NULL;
- return _fdt_offset_ptr(fdt, offset);
+ return _fdt_offset_ptr(fdt, offset);
}
uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
{
- const fdt32_t *tagp, *lenp;
- uint32_t tag;
- int offset = startoffset;
- const char *p;
+ const fdt32_t *tagp, *lenp;
+ uint32_t tag;
+ int offset = startoffset;
+ const char *p;
- *nextoffset = -FDT_ERR_TRUNCATED;
- tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
- if (!tagp)
- return FDT_END; /* premature end */
- tag = fdt32_to_cpu(*tagp);
- offset += FDT_TAGSIZE;
+ *nextoffset = -FDT_ERR_TRUNCATED;
+ tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
+ if (!tagp)
+ return FDT_END; /* premature end */
+ tag = fdt32_to_cpu(*tagp);
+ offset += FDT_TAGSIZE;
- *nextoffset = -FDT_ERR_BADSTRUCTURE;
- switch (tag) {
- case FDT_BEGIN_NODE:
- /* skip name */
- do {
- p = fdt_offset_ptr(fdt, offset++, 1);
- } while (p && (*p != '\0'));
- if (!p)
- return FDT_END; /* premature end */
- break;
+ *nextoffset = -FDT_ERR_BADSTRUCTURE;
+ switch (tag) {
+ case FDT_BEGIN_NODE:
+ /* skip name */
+ do {
+ p = fdt_offset_ptr(fdt, offset++, 1);
+ } while (p && (*p != '\0'));
+ if (!p)
+ return FDT_END; /* premature end */
+ break;
- case FDT_PROP:
- lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
- if (!lenp)
- return FDT_END; /* premature end */
- /* skip-name offset, length and value */
- offset += sizeof(struct fdt_property) - FDT_TAGSIZE
- + fdt32_to_cpu(*lenp);
- break;
+ case FDT_PROP:
+ lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
+ if (!lenp)
+ return FDT_END; /* premature end */
+ /* skip-name offset, length and value */
+ offset += sizeof(struct fdt_property) - FDT_TAGSIZE
+ + fdt32_to_cpu(*lenp);
+ break;
- case FDT_END:
- case FDT_END_NODE:
- case FDT_NOP:
- break;
+ case FDT_END:
+ case FDT_END_NODE:
+ case FDT_NOP:
+ break;
- default:
- return FDT_END;
- }
+ default:
+ return FDT_END;
+ }
- if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
- return FDT_END; /* premature end */
+ if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
+ return FDT_END; /* premature end */
- *nextoffset = FDT_TAGALIGN(offset);
- return tag;
+ *nextoffset = FDT_TAGALIGN(offset);
+ return tag;
}
int _fdt_check_node_offset(const void *fdt, int offset)
{
- if ((offset < 0) || (offset % FDT_TAGSIZE)
- || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE))
- return -FDT_ERR_BADOFFSET;
+ if ((offset < 0) || (offset % FDT_TAGSIZE)
+ || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE))
+ return -FDT_ERR_BADOFFSET;
- return offset;
+ return offset;
}
int _fdt_check_prop_offset(const void *fdt, int offset)
{
- if ((offset < 0) || (offset % FDT_TAGSIZE)
- || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP))
- return -FDT_ERR_BADOFFSET;
+ if ((offset < 0) || (offset % FDT_TAGSIZE)
+ || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP))
+ return -FDT_ERR_BADOFFSET;
- return offset;
+ return offset;
}
int fdt_next_node(const void *fdt, int offset, int *depth)
{
- int nextoffset = 0;
- uint32_t tag;
+ int nextoffset = 0;
+ uint32_t tag;
- if (offset >= 0)
- if ((nextoffset = _fdt_check_node_offset(fdt, offset)) < 0)
- return nextoffset;
+ if (offset >= 0)
+ if ((nextoffset = _fdt_check_node_offset(fdt, offset)) < 0)
+ return nextoffset;
- do {
- offset = nextoffset;
- tag = fdt_next_tag(fdt, offset, &nextoffset);
+ do {
+ offset = nextoffset;
+ tag = fdt_next_tag(fdt, offset, &nextoffset);
- switch (tag) {
- case FDT_PROP:
- case FDT_NOP:
- break;
+ switch (tag) {
+ case FDT_PROP:
+ case FDT_NOP:
+ break;
- case FDT_BEGIN_NODE:
- if (depth)
- (*depth)++;
- break;
+ case FDT_BEGIN_NODE:
+ if (depth)
+ (*depth)++;
+ break;
- case FDT_END_NODE:
- if (depth && ((--(*depth)) < 0))
- return nextoffset;
- break;
+ case FDT_END_NODE:
+ if (depth && ((--(*depth)) < 0))
+ return nextoffset;
+ break;
- case FDT_END:
- if ((nextoffset >= 0)
- || ((nextoffset == -FDT_ERR_TRUNCATED) && !depth))
- return -FDT_ERR_NOTFOUND;
- else
- return nextoffset;
- }
- } while (tag != FDT_BEGIN_NODE);
+ case FDT_END:
+ if ((nextoffset >= 0)
+ || ((nextoffset == -FDT_ERR_TRUNCATED) && !depth))
+ return -FDT_ERR_NOTFOUND;
+ else
+ return nextoffset;
+ }
+ } while (tag != FDT_BEGIN_NODE);
- return offset;
+ return offset;
}
int fdt_first_subnode(const void *fdt, int offset)
{
- int depth = 0;
+ int depth = 0;
- offset = fdt_next_node(fdt, offset, &depth);
- if (offset < 0 || depth != 1)
- return -FDT_ERR_NOTFOUND;
+ offset = fdt_next_node(fdt, offset, &depth);
+ if (offset < 0 || depth != 1)
+ return -FDT_ERR_NOTFOUND;
- return offset;
+ return offset;
}
int fdt_next_subnode(const void *fdt, int offset)
{
- int depth = 1;
+ int depth = 1;
- /*
- * With respect to the parent, the depth of the next subnode will be
- * the same as the last.
- */
- do {
- offset = fdt_next_node(fdt, offset, &depth);
- if (offset < 0 || depth < 1)
- return -FDT_ERR_NOTFOUND;
- } while (depth > 1);
+ /*
+ * With respect to the parent, the depth of the next subnode will be
+ * the same as the last.
+ */
+ do {
+ offset = fdt_next_node(fdt, offset, &depth);
+ if (offset < 0 || depth < 1)
+ return -FDT_ERR_NOTFOUND;
+ } while (depth > 1);
- return offset;
+ return offset;
}
const char *_fdt_find_string(const char *strtab, int tabsize, const char *s)
{
- int len = strlen(s) + 1;
- const char *last = strtab + tabsize - len;
- const char *p;
+ int len = strlen(s) + 1;
+ const char *last = strtab + tabsize - len;
+ const char *p;
- for (p = strtab; p <= last; p++)
- if (memcmp(p, s, len) == 0)
- return p;
- return NULL;
+ for (p = strtab; p <= last; p++)
+ if (memcmp(p, s, len) == 0)
+ return p;
+ return NULL;
}
int fdt_move(const void *fdt, void *buf, int bufsize)
{
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- if (fdt_totalsize(fdt) > bufsize)
- return -FDT_ERR_NOSPACE;
+ if (fdt_totalsize(fdt) > bufsize)
+ return -FDT_ERR_NOSPACE;
- memmove(buf, fdt, fdt_totalsize(fdt));
- return 0;
+ memmove(buf, fdt, fdt_totalsize(fdt));
+ return 0;
}
diff --git a/components/drivers/fdt/libfdt/fdt.h b/components/drivers/fdt/libfdt/fdt.h
index 4b6c40ff3e..a00161cced 100644
--- a/components/drivers/fdt/libfdt/fdt.h
+++ b/components/drivers/fdt/libfdt/fdt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/fdt/libfdt/fdt_empty_tree.c b/components/drivers/fdt/libfdt/fdt_empty_tree.c
index 26ab2d3641..0f317a4726 100644
--- a/components/drivers/fdt/libfdt/fdt_empty_tree.c
+++ b/components/drivers/fdt/libfdt/fdt_empty_tree.c
@@ -57,28 +57,28 @@
int fdt_create_empty_tree(void *buf, int bufsize)
{
- int err;
+ int err;
- err = fdt_create(buf, bufsize);
- if (err)
- return err;
+ err = fdt_create(buf, bufsize);
+ if (err)
+ return err;
- err = fdt_finish_reservemap(buf);
- if (err)
- return err;
+ err = fdt_finish_reservemap(buf);
+ if (err)
+ return err;
- err = fdt_begin_node(buf, "");
- if (err)
- return err;
+ err = fdt_begin_node(buf, "");
+ if (err)
+ return err;
- err = fdt_end_node(buf);
- if (err)
- return err;
+ err = fdt_end_node(buf);
+ if (err)
+ return err;
- err = fdt_finish(buf);
- if (err)
- return err;
+ err = fdt_finish(buf);
+ if (err)
+ return err;
- return fdt_open_into(buf, buf, bufsize);
+ return fdt_open_into(buf, buf, bufsize);
}
diff --git a/components/drivers/fdt/libfdt/fdt_ro.c b/components/drivers/fdt/libfdt/fdt_ro.c
index 984e8fe227..ff8b7fbdc0 100644
--- a/components/drivers/fdt/libfdt/fdt_ro.c
+++ b/components/drivers/fdt/libfdt/fdt_ro.c
@@ -54,648 +54,648 @@
#include "libfdt_internal.h"
static int _fdt_nodename_eq(const void *fdt, int offset,
- const char *s, int len)
+ const char *s, int len)
{
- const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1);
+ const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1);
- if (! p)
- /* short match */
- return 0;
+ if (! p)
+ /* short match */
+ return 0;
- if (memcmp(p, s, len) != 0)
- return 0;
+ if (memcmp(p, s, len) != 0)
+ return 0;
- if (p[len] == '\0')
- return 1;
- else if (!memchr(s, '@', len) && (p[len] == '@'))
- return 1;
- else
- return 0;
+ if (p[len] == '\0')
+ return 1;
+ else if (!memchr(s, '@', len) && (p[len] == '@'))
+ return 1;
+ else
+ return 0;
}
const char *fdt_string(const void *fdt, int stroffset)
{
- return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
+ return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
}
static int _fdt_string_eq(const void *fdt, int stroffset,
- const char *s, int len)
+ const char *s, int len)
{
- const char *p = fdt_string(fdt, stroffset);
+ const char *p = fdt_string(fdt, stroffset);
- return (strlen(p) == len) && (memcmp(p, s, len) == 0);
+ return (strlen(p) == len) && (memcmp(p, s, len) == 0);
}
uint32_t fdt_get_max_phandle(const void *fdt)
{
- uint32_t max_phandle = 0;
- int offset;
+ uint32_t max_phandle = 0;
+ int offset;
- for (offset = fdt_next_node(fdt, -1, NULL);;
- offset = fdt_next_node(fdt, offset, NULL)) {
- uint32_t phandle;
+ for (offset = fdt_next_node(fdt, -1, NULL);;
+ offset = fdt_next_node(fdt, offset, NULL)) {
+ uint32_t phandle;
- if (offset == -FDT_ERR_NOTFOUND)
- return max_phandle;
+ if (offset == -FDT_ERR_NOTFOUND)
+ return max_phandle;
- if (offset < 0)
- return (uint32_t)-1;
+ if (offset < 0)
+ return (uint32_t)-1;
- phandle = fdt_get_phandle(fdt, offset);
- if (phandle == (uint32_t)-1)
- continue;
+ phandle = fdt_get_phandle(fdt, offset);
+ if (phandle == (uint32_t)-1)
+ continue;
- if (phandle > max_phandle)
- max_phandle = phandle;
- }
+ if (phandle > max_phandle)
+ max_phandle = phandle;
+ }
- return 0;
+ return 0;
}
int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
{
- FDT_CHECK_HEADER(fdt);
- *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address);
- *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);
- return 0;
+ FDT_CHECK_HEADER(fdt);
+ *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address);
+ *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);
+ return 0;
}
int fdt_num_mem_rsv(const void *fdt)
{
- int i = 0;
+ int i = 0;
- while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
- i++;
- return i;
+ while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
+ i++;
+ return i;
}
static int _nextprop(const void *fdt, int offset)
{
- uint32_t tag;
- int nextoffset;
+ uint32_t tag;
+ int nextoffset;
- do {
- tag = fdt_next_tag(fdt, offset, &nextoffset);
+ do {
+ tag = fdt_next_tag(fdt, offset, &nextoffset);
- switch (tag) {
- case FDT_END:
- if (nextoffset >= 0)
- return -FDT_ERR_BADSTRUCTURE;
- else
- return nextoffset;
+ switch (tag) {
+ case FDT_END:
+ if (nextoffset >= 0)
+ return -FDT_ERR_BADSTRUCTURE;
+ else
+ return nextoffset;
- case FDT_PROP:
- return offset;
- }
- offset = nextoffset;
- } while (tag == FDT_NOP);
+ case FDT_PROP:
+ return offset;
+ }
+ offset = nextoffset;
+ } while (tag == FDT_NOP);
- return -FDT_ERR_NOTFOUND;
+ return -FDT_ERR_NOTFOUND;
}
int fdt_subnode_offset_namelen(const void *fdt, int offset,
- const char *name, int namelen)
+ const char *name, int namelen)
{
- int depth;
+ int depth;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- for (depth = 0;
- (offset >= 0) && (depth >= 0);
- offset = fdt_next_node(fdt, offset, &depth))
- if ((depth == 1)
- && _fdt_nodename_eq(fdt, offset, name, namelen))
- return offset;
+ for (depth = 0;
+ (offset >= 0) && (depth >= 0);
+ offset = fdt_next_node(fdt, offset, &depth))
+ if ((depth == 1)
+ && _fdt_nodename_eq(fdt, offset, name, namelen))
+ return offset;
- if (depth < 0)
- return -FDT_ERR_NOTFOUND;
- return offset; /* error */
+ if (depth < 0)
+ return -FDT_ERR_NOTFOUND;
+ return offset; /* error */
}
int fdt_subnode_offset(const void *fdt, int parentoffset,
- const char *name)
+ const char *name)
{
- return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
+ return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
}
int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen)
{
- const char *end = path + namelen;
- const char *p = path;
- int offset = 0;
+ const char *end = path + namelen;
+ const char *p = path;
+ int offset = 0;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- /* see if we have an alias */
- if (*path != '/') {
- const char *q = memchr(path, '/', end - p);
+ /* see if we have an alias */
+ if (*path != '/') {
+ const char *q = memchr(path, '/', end - p);
- if (!q)
- q = end;
+ if (!q)
+ q = end;
- p = fdt_get_alias_namelen(fdt, p, q - p);
- if (!p)
- return -FDT_ERR_BADPATH;
- offset = fdt_path_offset(fdt, p);
+ p = fdt_get_alias_namelen(fdt, p, q - p);
+ if (!p)
+ return -FDT_ERR_BADPATH;
+ offset = fdt_path_offset(fdt, p);
- p = q;
- }
+ p = q;
+ }
- while (p < end) {
- const char *q;
+ while (p < end) {
+ const char *q;
- while (*p == '/') {
- p++;
- if (p == end)
- return offset;
- }
- q = memchr(p, '/', end - p);
- if (! q)
- q = end;
+ while (*p == '/') {
+ p++;
+ if (p == end)
+ return offset;
+ }
+ q = memchr(p, '/', end - p);
+ if (! q)
+ q = end;
- offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
- if (offset < 0)
- return offset;
+ offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
+ if (offset < 0)
+ return offset;
- p = q;
- }
+ p = q;
+ }
- return offset;
+ return offset;
}
int fdt_path_offset(const void *fdt, const char *path)
{
- return fdt_path_offset_namelen(fdt, path, strlen(path));
+ return fdt_path_offset_namelen(fdt, path, strlen(path));
}
const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
{
- const struct fdt_node_header *nh = _fdt_offset_ptr(fdt, nodeoffset);
- int err;
+ const struct fdt_node_header *nh = _fdt_offset_ptr(fdt, nodeoffset);
+ int err;
- if (((err = fdt_check_header(fdt)) != 0)
- || ((err = _fdt_check_node_offset(fdt, nodeoffset)) < 0))
- goto fail;
+ if (((err = fdt_check_header(fdt)) != 0)
+ || ((err = _fdt_check_node_offset(fdt, nodeoffset)) < 0))
+ goto fail;
- if (len)
- *len = strlen(nh->name);
+ if (len)
+ *len = strlen(nh->name);
- return nh->name;
+ return nh->name;
fail:
- if (len)
- *len = err;
- return NULL;
+ if (len)
+ *len = err;
+ return NULL;
}
int fdt_first_property_offset(const void *fdt, int nodeoffset)
{
- int offset;
+ int offset;
- if ((offset = _fdt_check_node_offset(fdt, nodeoffset)) < 0)
- return offset;
+ if ((offset = _fdt_check_node_offset(fdt, nodeoffset)) < 0)
+ return offset;
- return _nextprop(fdt, offset);
+ return _nextprop(fdt, offset);
}
int fdt_next_property_offset(const void *fdt, int offset)
{
- if ((offset = _fdt_check_prop_offset(fdt, offset)) < 0)
- return offset;
+ if ((offset = _fdt_check_prop_offset(fdt, offset)) < 0)
+ return offset;
- return _nextprop(fdt, offset);
+ return _nextprop(fdt, offset);
}
const struct fdt_property *fdt_get_property_by_offset(const void *fdt,
- int offset,
- int *lenp)
+ int offset,
+ int *lenp)
{
- int err;
- const struct fdt_property *prop;
+ int err;
+ const struct fdt_property *prop;
- if ((err = _fdt_check_prop_offset(fdt, offset)) < 0) {
- if (lenp)
- *lenp = err;
- return NULL;
- }
+ if ((err = _fdt_check_prop_offset(fdt, offset)) < 0) {
+ if (lenp)
+ *lenp = err;
+ return NULL;
+ }
- prop = _fdt_offset_ptr(fdt, offset);
+ prop = _fdt_offset_ptr(fdt, offset);
- if (lenp)
- *lenp = fdt32_to_cpu(prop->len);
+ if (lenp)
+ *lenp = fdt32_to_cpu(prop->len);
- return prop;
+ return prop;
}
const struct fdt_property *fdt_get_property_namelen(const void *fdt,
- int offset,
- const char *name,
- int namelen, int *lenp)
+ int offset,
+ const char *name,
+ int namelen, int *lenp)
{
- for (offset = fdt_first_property_offset(fdt, offset);
- (offset >= 0);
- (offset = fdt_next_property_offset(fdt, offset))) {
- const struct fdt_property *prop;
+ for (offset = fdt_first_property_offset(fdt, offset);
+ (offset >= 0);
+ (offset = fdt_next_property_offset(fdt, offset))) {
+ const struct fdt_property *prop;
- if (!(prop = fdt_get_property_by_offset(fdt, offset, lenp))) {
- offset = -FDT_ERR_INTERNAL;
- break;
- }
- if (_fdt_string_eq(fdt, fdt32_to_cpu(prop->nameoff),
- name, namelen))
- return prop;
- }
+ if (!(prop = fdt_get_property_by_offset(fdt, offset, lenp))) {
+ offset = -FDT_ERR_INTERNAL;
+ break;
+ }
+ if (_fdt_string_eq(fdt, fdt32_to_cpu(prop->nameoff),
+ name, namelen))
+ return prop;
+ }
- if (lenp)
- *lenp = offset;
- return NULL;
+ if (lenp)
+ *lenp = offset;
+ return NULL;
}
const struct fdt_property *fdt_get_property(const void *fdt,
- int nodeoffset,
- const char *name, int *lenp)
+ int nodeoffset,
+ const char *name, int *lenp)
{
- return fdt_get_property_namelen(fdt, nodeoffset, name,
- strlen(name), lenp);
+ return fdt_get_property_namelen(fdt, nodeoffset, name,
+ strlen(name), lenp);
}
const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
- const char *name, int namelen, int *lenp)
+ const char *name, int namelen, int *lenp)
{
- const struct fdt_property *prop;
+ const struct fdt_property *prop;
- prop = fdt_get_property_namelen(fdt, nodeoffset, name, namelen, lenp);
- if (! prop)
- return NULL;
+ prop = fdt_get_property_namelen(fdt, nodeoffset, name, namelen, lenp);
+ if (! prop)
+ return NULL;
- return prop->data;
+ return prop->data;
}
const void *fdt_getprop_by_offset(const void *fdt, int offset,
- const char **namep, int *lenp)
+ const char **namep, int *lenp)
{
- const struct fdt_property *prop;
+ const struct fdt_property *prop;
- prop = fdt_get_property_by_offset(fdt, offset, lenp);
- if (!prop)
- return NULL;
- if (namep)
- *namep = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));
- return prop->data;
+ prop = fdt_get_property_by_offset(fdt, offset, lenp);
+ if (!prop)
+ return NULL;
+ if (namep)
+ *namep = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));
+ return prop->data;
}
const void *fdt_getprop(const void *fdt, int nodeoffset,
- const char *name, int *lenp)
+ const char *name, int *lenp)
{
- return fdt_getprop_namelen(fdt, nodeoffset, name, strlen(name), lenp);
+ return fdt_getprop_namelen(fdt, nodeoffset, name, strlen(name), lenp);
}
uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
{
- const fdt32_t *php;
- int len;
+ const fdt32_t *php;
+ int len;
- /* FIXME: This is a bit sub-optimal, since we potentially scan
- * over all the properties twice. */
- php = fdt_getprop(fdt, nodeoffset, "phandle", &len);
- if (!php || (len != sizeof(*php))) {
- php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
- if (!php || (len != sizeof(*php)))
- return 0;
- }
+ /* FIXME: This is a bit sub-optimal, since we potentially scan
+ * over all the properties twice. */
+ php = fdt_getprop(fdt, nodeoffset, "phandle", &len);
+ if (!php || (len != sizeof(*php))) {
+ php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
+ if (!php || (len != sizeof(*php)))
+ return 0;
+ }
- return fdt32_to_cpu(*php);
+ return fdt32_to_cpu(*php);
}
const char *fdt_get_alias_namelen(const void *fdt,
- const char *name, int namelen)
+ const char *name, int namelen)
{
- int aliasoffset;
+ int aliasoffset;
- aliasoffset = fdt_path_offset(fdt, "/aliases");
- if (aliasoffset < 0)
- return NULL;
+ aliasoffset = fdt_path_offset(fdt, "/aliases");
+ if (aliasoffset < 0)
+ return NULL;
- return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL);
+ return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL);
}
const char *fdt_get_alias(const void *fdt, const char *name)
{
- return fdt_get_alias_namelen(fdt, name, strlen(name));
+ return fdt_get_alias_namelen(fdt, name, strlen(name));
}
int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
{
- int pdepth = 0, p = 0;
- int offset, depth, namelen;
- const char *name;
+ int pdepth = 0, p = 0;
+ int offset, depth, namelen;
+ const char *name;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- if (buflen < 2)
- return -FDT_ERR_NOSPACE;
+ if (buflen < 2)
+ return -FDT_ERR_NOSPACE;
- for (offset = 0, depth = 0;
- (offset >= 0) && (offset <= nodeoffset);
- offset = fdt_next_node(fdt, offset, &depth)) {
- while (pdepth > depth) {
- do {
- p--;
- } while (buf[p-1] != '/');
- pdepth--;
- }
+ for (offset = 0, depth = 0;
+ (offset >= 0) && (offset <= nodeoffset);
+ offset = fdt_next_node(fdt, offset, &depth)) {
+ while (pdepth > depth) {
+ do {
+ p--;
+ } while (buf[p-1] != '/');
+ pdepth--;
+ }
- if (pdepth >= depth) {
- name = fdt_get_name(fdt, offset, &namelen);
- if (!name)
- return namelen;
- if ((p + namelen + 1) <= buflen) {
- memcpy(buf + p, name, namelen);
- p += namelen;
- buf[p++] = '/';
- pdepth++;
- }
- }
+ if (pdepth >= depth) {
+ name = fdt_get_name(fdt, offset, &namelen);
+ if (!name)
+ return namelen;
+ if ((p + namelen + 1) <= buflen) {
+ memcpy(buf + p, name, namelen);
+ p += namelen;
+ buf[p++] = '/';
+ pdepth++;
+ }
+ }
- if (offset == nodeoffset) {
- if (pdepth < (depth + 1))
- return -FDT_ERR_NOSPACE;
+ if (offset == nodeoffset) {
+ if (pdepth < (depth + 1))
+ return -FDT_ERR_NOSPACE;
- if (p > 1) /* special case so that root path is "/", not "" */
- p--;
- buf[p] = '\0';
- return 0;
- }
- }
+ if (p > 1) /* special case so that root path is "/", not "" */
+ p--;
+ buf[p] = '\0';
+ return 0;
+ }
+ }
- if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
- return -FDT_ERR_BADOFFSET;
- else if (offset == -FDT_ERR_BADOFFSET)
- return -FDT_ERR_BADSTRUCTURE;
+ if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
+ return -FDT_ERR_BADOFFSET;
+ else if (offset == -FDT_ERR_BADOFFSET)
+ return -FDT_ERR_BADSTRUCTURE;
- return offset; /* error from fdt_next_node() */
+ return offset; /* error from fdt_next_node() */
}
int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
- int supernodedepth, int *nodedepth)
+ int supernodedepth, int *nodedepth)
{
- int offset, depth;
- int supernodeoffset = -FDT_ERR_INTERNAL;
+ int offset, depth;
+ int supernodeoffset = -FDT_ERR_INTERNAL;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- if (supernodedepth < 0)
- return -FDT_ERR_NOTFOUND;
+ if (supernodedepth < 0)
+ return -FDT_ERR_NOTFOUND;
- for (offset = 0, depth = 0;
- (offset >= 0) && (offset <= nodeoffset);
- offset = fdt_next_node(fdt, offset, &depth)) {
- if (depth == supernodedepth)
- supernodeoffset = offset;
+ for (offset = 0, depth = 0;
+ (offset >= 0) && (offset <= nodeoffset);
+ offset = fdt_next_node(fdt, offset, &depth)) {
+ if (depth == supernodedepth)
+ supernodeoffset = offset;
- if (offset == nodeoffset) {
- if (nodedepth)
- *nodedepth = depth;
+ if (offset == nodeoffset) {
+ if (nodedepth)
+ *nodedepth = depth;
- if (supernodedepth > depth)
- return -FDT_ERR_NOTFOUND;
- else
- return supernodeoffset;
- }
- }
+ if (supernodedepth > depth)
+ return -FDT_ERR_NOTFOUND;
+ else
+ return supernodeoffset;
+ }
+ }
- if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
- return -FDT_ERR_BADOFFSET;
- else if (offset == -FDT_ERR_BADOFFSET)
- return -FDT_ERR_BADSTRUCTURE;
+ if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
+ return -FDT_ERR_BADOFFSET;
+ else if (offset == -FDT_ERR_BADOFFSET)
+ return -FDT_ERR_BADSTRUCTURE;
- return offset; /* error from fdt_next_node() */
+ return offset; /* error from fdt_next_node() */
}
int fdt_node_depth(const void *fdt, int nodeoffset)
{
- int nodedepth;
- int err;
+ int nodedepth;
+ int err;
- err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
- if (err)
- return (err < 0) ? err : -FDT_ERR_INTERNAL;
- return nodedepth;
+ err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
+ if (err)
+ return (err < 0) ? err : -FDT_ERR_INTERNAL;
+ return nodedepth;
}
int fdt_parent_offset(const void *fdt, int nodeoffset)
{
- int nodedepth = fdt_node_depth(fdt, nodeoffset);
+ int nodedepth = fdt_node_depth(fdt, nodeoffset);
- if (nodedepth < 0)
- return nodedepth;
- return fdt_supernode_atdepth_offset(fdt, nodeoffset,
- nodedepth - 1, NULL);
+ if (nodedepth < 0)
+ return nodedepth;
+ return fdt_supernode_atdepth_offset(fdt, nodeoffset,
+ nodedepth - 1, NULL);
}
int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
- const char *propname,
- const void *propval, int proplen)
+ const char *propname,
+ const void *propval, int proplen)
{
- int offset;
- const void *val;
- int len;
+ int offset;
+ const void *val;
+ int len;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- /* FIXME: The algorithm here is pretty horrible: we scan each
- * property of a node in fdt_getprop(), then if that didn't
- * find what we want, we scan over them again making our way
- * to the next node. Still it's the easiest to implement
- * approach; performance can come later. */
- for (offset = fdt_next_node(fdt, startoffset, NULL);
- offset >= 0;
- offset = fdt_next_node(fdt, offset, NULL)) {
- val = fdt_getprop(fdt, offset, propname, &len);
- if (val && (len == proplen)
- && (memcmp(val, propval, len) == 0))
- return offset;
- }
+ /* FIXME: The algorithm here is pretty horrible: we scan each
+ * property of a node in fdt_getprop(), then if that didn't
+ * find what we want, we scan over them again making our way
+ * to the next node. Still it's the easiest to implement
+ * approach; performance can come later. */
+ for (offset = fdt_next_node(fdt, startoffset, NULL);
+ offset >= 0;
+ offset = fdt_next_node(fdt, offset, NULL)) {
+ val = fdt_getprop(fdt, offset, propname, &len);
+ if (val && (len == proplen)
+ && (memcmp(val, propval, len) == 0))
+ return offset;
+ }
- return offset; /* error from fdt_next_node() */
+ return offset; /* error from fdt_next_node() */
}
int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
{
- int offset;
+ int offset;
- if ((phandle == 0) || (phandle == -1))
- return -FDT_ERR_BADPHANDLE;
+ if ((phandle == 0) || (phandle == -1))
+ return -FDT_ERR_BADPHANDLE;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- /* FIXME: The algorithm here is pretty horrible: we
- * potentially scan each property of a node in
- * fdt_get_phandle(), then if that didn't find what
- * we want, we scan over them again making our way to the next
- * node. Still it's the easiest to implement approach;
- * performance can come later. */
- for (offset = fdt_next_node(fdt, -1, NULL);
- offset >= 0;
- offset = fdt_next_node(fdt, offset, NULL)) {
- if (fdt_get_phandle(fdt, offset) == phandle)
- return offset;
- }
+ /* FIXME: The algorithm here is pretty horrible: we
+ * potentially scan each property of a node in
+ * fdt_get_phandle(), then if that didn't find what
+ * we want, we scan over them again making our way to the next
+ * node. Still it's the easiest to implement approach;
+ * performance can come later. */
+ for (offset = fdt_next_node(fdt, -1, NULL);
+ offset >= 0;
+ offset = fdt_next_node(fdt, offset, NULL)) {
+ if (fdt_get_phandle(fdt, offset) == phandle)
+ return offset;
+ }
- return offset; /* error from fdt_next_node() */
+ return offset; /* error from fdt_next_node() */
}
int fdt_stringlist_contains(const char *strlist, int listlen, const char *str)
{
- int len = strlen(str);
- const char *p;
+ int len = strlen(str);
+ const char *p;
- while (listlen >= len) {
- if (memcmp(str, strlist, len+1) == 0)
- return 1;
- p = memchr(strlist, '\0', listlen);
- if (!p)
- return 0; /* malformed strlist.. */
- listlen -= (p-strlist) + 1;
- strlist = p + 1;
- }
- return 0;
+ while (listlen >= len) {
+ if (memcmp(str, strlist, len+1) == 0)
+ return 1;
+ p = memchr(strlist, '\0', listlen);
+ if (!p)
+ return 0; /* malformed strlist.. */
+ listlen -= (p-strlist) + 1;
+ strlist = p + 1;
+ }
+ return 0;
}
int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property)
{
- const char *list, *end;
- int length, count = 0;
+ const char *list, *end;
+ int length, count = 0;
- list = fdt_getprop(fdt, nodeoffset, property, &length);
- if (!list)
- return length;
+ list = fdt_getprop(fdt, nodeoffset, property, &length);
+ if (!list)
+ return length;
- end = list + length;
+ end = list + length;
- while (list < end) {
- length = strnlen(list, end - list) + 1;
+ while (list < end) {
+ length = strnlen(list, end - list) + 1;
- /* Abort if the last string isn't properly NUL-terminated. */
- if (list + length > end)
- return -FDT_ERR_BADVALUE;
+ /* Abort if the last string isn't properly NUL-terminated. */
+ if (list + length > end)
+ return -FDT_ERR_BADVALUE;
- list += length;
- count++;
- }
+ list += length;
+ count++;
+ }
- return count;
+ return count;
}
int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,
- const char *string)
+ const char *string)
{
- int length, len, idx = 0;
- const char *list, *end;
+ int length, len, idx = 0;
+ const char *list, *end;
- list = fdt_getprop(fdt, nodeoffset, property, &length);
- if (!list)
- return length;
+ list = fdt_getprop(fdt, nodeoffset, property, &length);
+ if (!list)
+ return length;
- len = strlen(string) + 1;
- end = list + length;
+ len = strlen(string) + 1;
+ end = list + length;
- while (list < end) {
- length = strnlen(list, end - list) + 1;
+ while (list < end) {
+ length = strnlen(list, end - list) + 1;
- /* Abort if the last string isn't properly NUL-terminated. */
- if (list + length > end)
- return -FDT_ERR_BADVALUE;
+ /* Abort if the last string isn't properly NUL-terminated. */
+ if (list + length > end)
+ return -FDT_ERR_BADVALUE;
- if (length == len && memcmp(list, string, length) == 0)
- return idx;
+ if (length == len && memcmp(list, string, length) == 0)
+ return idx;
- list += length;
- idx++;
- }
+ list += length;
+ idx++;
+ }
- return -FDT_ERR_NOTFOUND;
+ return -FDT_ERR_NOTFOUND;
}
const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
- const char *property, int idx,
- int *lenp)
+ const char *property, int idx,
+ int *lenp)
{
- const char *list, *end;
- int length;
+ const char *list, *end;
+ int length;
- list = fdt_getprop(fdt, nodeoffset, property, &length);
- if (!list) {
- if (lenp)
- *lenp = length;
+ list = fdt_getprop(fdt, nodeoffset, property, &length);
+ if (!list) {
+ if (lenp)
+ *lenp = length;
- return NULL;
- }
+ return NULL;
+ }
- end = list + length;
+ end = list + length;
- while (list < end) {
- length = strnlen(list, end - list) + 1;
+ while (list < end) {
+ length = strnlen(list, end - list) + 1;
- /* Abort if the last string isn't properly NUL-terminated. */
- if (list + length > end) {
- if (lenp)
- *lenp = -FDT_ERR_BADVALUE;
+ /* Abort if the last string isn't properly NUL-terminated. */
+ if (list + length > end) {
+ if (lenp)
+ *lenp = -FDT_ERR_BADVALUE;
- return NULL;
- }
+ return NULL;
+ }
- if (idx == 0) {
- if (lenp)
- *lenp = length - 1;
+ if (idx == 0) {
+ if (lenp)
+ *lenp = length - 1;
- return list;
- }
+ return list;
+ }
- list += length;
- idx--;
- }
+ list += length;
+ idx--;
+ }
- if (lenp)
- *lenp = -FDT_ERR_NOTFOUND;
+ if (lenp)
+ *lenp = -FDT_ERR_NOTFOUND;
- return NULL;
+ return NULL;
}
int fdt_node_check_compatible(const void *fdt, int nodeoffset,
- const char *compatible)
+ const char *compatible)
{
- const void *prop;
- int len;
+ const void *prop;
+ int len;
- prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
- if (!prop)
- return len;
+ prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
+ if (!prop)
+ return len;
- return !fdt_stringlist_contains(prop, len, compatible);
+ return !fdt_stringlist_contains(prop, len, compatible);
}
int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
- const char *compatible)
+ const char *compatible)
{
- int offset, err;
+ int offset, err;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- /* FIXME: The algorithm here is pretty horrible: we scan each
- * property of a node in fdt_node_check_compatible(), then if
- * that didn't find what we want, we scan over them again
- * making our way to the next node. Still it's the easiest to
- * implement approach; performance can come later. */
- for (offset = fdt_next_node(fdt, startoffset, NULL);
- offset >= 0;
- offset = fdt_next_node(fdt, offset, NULL)) {
- err = fdt_node_check_compatible(fdt, offset, compatible);
- if ((err < 0) && (err != -FDT_ERR_NOTFOUND))
- return err;
- else if (err == 0)
- return offset;
- }
+ /* FIXME: The algorithm here is pretty horrible: we scan each
+ * property of a node in fdt_node_check_compatible(), then if
+ * that didn't find what we want, we scan over them again
+ * making our way to the next node. Still it's the easiest to
+ * implement approach; performance can come later. */
+ for (offset = fdt_next_node(fdt, startoffset, NULL);
+ offset >= 0;
+ offset = fdt_next_node(fdt, offset, NULL)) {
+ err = fdt_node_check_compatible(fdt, offset, compatible);
+ if ((err < 0) && (err != -FDT_ERR_NOTFOUND))
+ return err;
+ else if (err == 0)
+ return offset;
+ }
- return offset; /* error from fdt_next_node() */
+ return offset; /* error from fdt_next_node() */
}
diff --git a/components/drivers/fdt/libfdt/fdt_rw.c b/components/drivers/fdt/libfdt/fdt_rw.c
index 4406471b74..74954c2f28 100644
--- a/components/drivers/fdt/libfdt/fdt_rw.c
+++ b/components/drivers/fdt/libfdt/fdt_rw.c
@@ -54,436 +54,436 @@
#include "libfdt_internal.h"
static int _fdt_blocks_misordered(const void *fdt,
- int mem_rsv_size, int struct_size)
+ int mem_rsv_size, int struct_size)
{
- return (fdt_off_mem_rsvmap(fdt) < FDT_ALIGN(sizeof(struct fdt_header), 8))
- || (fdt_off_dt_struct(fdt) <
- (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
- || (fdt_off_dt_strings(fdt) <
- (fdt_off_dt_struct(fdt) + struct_size))
- || (fdt_totalsize(fdt) <
- (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
+ return (fdt_off_mem_rsvmap(fdt) < FDT_ALIGN(sizeof(struct fdt_header), 8))
+ || (fdt_off_dt_struct(fdt) <
+ (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
+ || (fdt_off_dt_strings(fdt) <
+ (fdt_off_dt_struct(fdt) + struct_size))
+ || (fdt_totalsize(fdt) <
+ (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
}
static int _fdt_rw_check_header(void *fdt)
{
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- if (fdt_version(fdt) < 17)
- return -FDT_ERR_BADVERSION;
- if (_fdt_blocks_misordered(fdt, sizeof(struct fdt_reserve_entry),
- fdt_size_dt_struct(fdt)))
- return -FDT_ERR_BADLAYOUT;
- if (fdt_version(fdt) > 17)
- fdt_set_version(fdt, 17);
+ if (fdt_version(fdt) < 17)
+ return -FDT_ERR_BADVERSION;
+ if (_fdt_blocks_misordered(fdt, sizeof(struct fdt_reserve_entry),
+ fdt_size_dt_struct(fdt)))
+ return -FDT_ERR_BADLAYOUT;
+ if (fdt_version(fdt) > 17)
+ fdt_set_version(fdt, 17);
- return 0;
+ return 0;
}
#define FDT_RW_CHECK_HEADER(fdt) \
- { \
- int __err; \
- if ((__err = _fdt_rw_check_header(fdt)) != 0) \
- return __err; \
- }
+ { \
+ int __err; \
+ if ((__err = _fdt_rw_check_header(fdt)) != 0) \
+ return __err; \
+ }
static inline int _fdt_data_size(void *fdt)
{
- return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
+ return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
}
static int _fdt_splice(void *fdt, void *splicepoint, int oldlen, int newlen)
{
- char *p = splicepoint;
- char *end = (char *)fdt + _fdt_data_size(fdt);
+ char *p = splicepoint;
+ char *end = (char *)fdt + _fdt_data_size(fdt);
- if (((p + oldlen) < p) || ((p + oldlen) > end))
- return -FDT_ERR_BADOFFSET;
- if ((p < (char *)fdt) || ((end - oldlen + newlen) < (char *)fdt))
- return -FDT_ERR_BADOFFSET;
- if ((end - oldlen + newlen) > ((char *)fdt + fdt_totalsize(fdt)))
- return -FDT_ERR_NOSPACE;
- memmove(p + newlen, p + oldlen, end - p - oldlen);
- return 0;
+ if (((p + oldlen) < p) || ((p + oldlen) > end))
+ return -FDT_ERR_BADOFFSET;
+ if ((p < (char *)fdt) || ((end - oldlen + newlen) < (char *)fdt))
+ return -FDT_ERR_BADOFFSET;
+ if ((end - oldlen + newlen) > ((char *)fdt + fdt_totalsize(fdt)))
+ return -FDT_ERR_NOSPACE;
+ memmove(p + newlen, p + oldlen, end - p - oldlen);
+ return 0;
}
static int _fdt_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p,
- int oldn, int newn)
+ int oldn, int newn)
{
- int delta = (newn - oldn) * sizeof(*p);
- int err;
- err = _fdt_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
- if (err)
- return err;
- fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta);
- fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
- return 0;
+ int delta = (newn - oldn) * sizeof(*p);
+ int err;
+ err = _fdt_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
+ if (err)
+ return err;
+ fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta);
+ fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
+ return 0;
}
static int _fdt_splice_struct(void *fdt, void *p,
- int oldlen, int newlen)
+ int oldlen, int newlen)
{
- int delta = newlen - oldlen;
- int err;
+ int delta = newlen - oldlen;
+ int err;
- if ((err = _fdt_splice(fdt, p, oldlen, newlen)))
- return err;
+ if ((err = _fdt_splice(fdt, p, oldlen, newlen)))
+ return err;
- fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta);
- fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
- return 0;
+ fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta);
+ fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
+ return 0;
}
static int _fdt_splice_string(void *fdt, int newlen)
{
- void *p = (char *)fdt
- + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
- int err;
+ void *p = (char *)fdt
+ + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
+ int err;
- if ((err = _fdt_splice(fdt, p, 0, newlen)))
- return err;
+ if ((err = _fdt_splice(fdt, p, 0, newlen)))
+ return err;
- fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
- return 0;
+ fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
+ return 0;
}
static int _fdt_find_add_string(void *fdt, const char *s)
{
- char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
- const char *p;
- char *new;
- int len = strlen(s) + 1;
- int err;
+ char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
+ const char *p;
+ char *new;
+ int len = strlen(s) + 1;
+ int err;
- p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
- if (p)
- /* found it */
- return (p - strtab);
+ p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
+ if (p)
+ /* found it */
+ return (p - strtab);
- new = strtab + fdt_size_dt_strings(fdt);
- err = _fdt_splice_string(fdt, len);
- if (err)
- return err;
+ new = strtab + fdt_size_dt_strings(fdt);
+ err = _fdt_splice_string(fdt, len);
+ if (err)
+ return err;
- memcpy(new, s, len);
- return (new - strtab);
+ memcpy(new, s, len);
+ return (new - strtab);
}
int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
{
- struct fdt_reserve_entry *re;
- int err;
+ struct fdt_reserve_entry *re;
+ int err;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
- err = _fdt_splice_mem_rsv(fdt, re, 0, 1);
- if (err)
- return err;
+ re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
+ err = _fdt_splice_mem_rsv(fdt, re, 0, 1);
+ if (err)
+ return err;
- re->address = cpu_to_fdt64(address);
- re->size = cpu_to_fdt64(size);
- return 0;
+ re->address = cpu_to_fdt64(address);
+ re->size = cpu_to_fdt64(size);
+ return 0;
}
int fdt_del_mem_rsv(void *fdt, int n)
{
- struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
+ struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- if (n >= fdt_num_mem_rsv(fdt))
- return -FDT_ERR_NOTFOUND;
+ if (n >= fdt_num_mem_rsv(fdt))
+ return -FDT_ERR_NOTFOUND;
- return _fdt_splice_mem_rsv(fdt, re, 1, 0);
+ return _fdt_splice_mem_rsv(fdt, re, 1, 0);
}
static int _fdt_resize_property(void *fdt, int nodeoffset, const char *name,
- int len, struct fdt_property **prop)
+ int len, struct fdt_property **prop)
{
- int oldlen;
- int err;
+ int oldlen;
+ int err;
- *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
- if (! (*prop))
- return oldlen;
+ *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
+ if (! (*prop))
+ return oldlen;
- if ((err = _fdt_splice_struct(fdt, (*prop)->data, FDT_TAGALIGN(oldlen),
- FDT_TAGALIGN(len))))
- return err;
+ if ((err = _fdt_splice_struct(fdt, (*prop)->data, FDT_TAGALIGN(oldlen),
+ FDT_TAGALIGN(len))))
+ return err;
- (*prop)->len = cpu_to_fdt32(len);
- return 0;
+ (*prop)->len = cpu_to_fdt32(len);
+ return 0;
}
static int _fdt_add_property(void *fdt, int nodeoffset, const char *name,
- int len, struct fdt_property **prop)
+ int len, struct fdt_property **prop)
{
- int proplen;
- int nextoffset;
- int namestroff;
- int err;
+ int proplen;
+ int nextoffset;
+ int namestroff;
+ int err;
- if ((nextoffset = _fdt_check_node_offset(fdt, nodeoffset)) < 0)
- return nextoffset;
+ if ((nextoffset = _fdt_check_node_offset(fdt, nodeoffset)) < 0)
+ return nextoffset;
- namestroff = _fdt_find_add_string(fdt, name);
- if (namestroff < 0)
- return namestroff;
+ namestroff = _fdt_find_add_string(fdt, name);
+ if (namestroff < 0)
+ return namestroff;
- *prop = _fdt_offset_ptr_w(fdt, nextoffset);
- proplen = sizeof(**prop) + FDT_TAGALIGN(len);
+ *prop = _fdt_offset_ptr_w(fdt, nextoffset);
+ proplen = sizeof(**prop) + FDT_TAGALIGN(len);
- err = _fdt_splice_struct(fdt, *prop, 0, proplen);
- if (err)
- return err;
+ err = _fdt_splice_struct(fdt, *prop, 0, proplen);
+ if (err)
+ return err;
- (*prop)->tag = cpu_to_fdt32(FDT_PROP);
- (*prop)->nameoff = cpu_to_fdt32(namestroff);
- (*prop)->len = cpu_to_fdt32(len);
- return 0;
+ (*prop)->tag = cpu_to_fdt32(FDT_PROP);
+ (*prop)->nameoff = cpu_to_fdt32(namestroff);
+ (*prop)->len = cpu_to_fdt32(len);
+ return 0;
}
int fdt_set_name(void *fdt, int nodeoffset, const char *name)
{
- char *namep;
- int oldlen, newlen;
- int err;
+ char *namep;
+ int oldlen, newlen;
+ int err;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- namep = (char *)(uintptr_t)fdt_get_name(fdt, nodeoffset, &oldlen);
- if (!namep)
- return oldlen;
+ namep = (char *)(uintptr_t)fdt_get_name(fdt, nodeoffset, &oldlen);
+ if (!namep)
+ return oldlen;
- newlen = strlen(name);
+ newlen = strlen(name);
- err = _fdt_splice_struct(fdt, namep, FDT_TAGALIGN(oldlen+1),
- FDT_TAGALIGN(newlen+1));
- if (err)
- return err;
+ err = _fdt_splice_struct(fdt, namep, FDT_TAGALIGN(oldlen+1),
+ FDT_TAGALIGN(newlen+1));
+ if (err)
+ return err;
- memcpy(namep, name, newlen+1);
- return 0;
+ memcpy(namep, name, newlen+1);
+ return 0;
}
int fdt_setprop(void *fdt, int nodeoffset, const char *name,
- const void *val, int len)
+ const void *val, int len)
{
- struct fdt_property *prop;
- int err;
+ struct fdt_property *prop;
+ int err;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- err = _fdt_resize_property(fdt, nodeoffset, name, len, &prop);
- if (err == -FDT_ERR_NOTFOUND)
- err = _fdt_add_property(fdt, nodeoffset, name, len, &prop);
- if (err)
- return err;
+ err = _fdt_resize_property(fdt, nodeoffset, name, len, &prop);
+ if (err == -FDT_ERR_NOTFOUND)
+ err = _fdt_add_property(fdt, nodeoffset, name, len, &prop);
+ if (err)
+ return err;
- if (len)
- memcpy(prop->data, val, len);
- return 0;
+ if (len)
+ memcpy(prop->data, val, len);
+ return 0;
}
int fdt_appendprop(void *fdt, int nodeoffset, const char *name,
- const void *val, int len)
+ const void *val, int len)
{
- struct fdt_property *prop;
- int err, oldlen, newlen;
+ struct fdt_property *prop;
+ int err, oldlen, newlen;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
- if (prop) {
- newlen = len + oldlen;
- err = _fdt_splice_struct(fdt, prop->data,
- FDT_TAGALIGN(oldlen),
- FDT_TAGALIGN(newlen));
- if (err)
- return err;
- prop->len = cpu_to_fdt32(newlen);
- memcpy(prop->data + oldlen, val, len);
- } else {
- err = _fdt_add_property(fdt, nodeoffset, name, len, &prop);
- if (err)
- return err;
- memcpy(prop->data, val, len);
- }
- return 0;
+ prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
+ if (prop) {
+ newlen = len + oldlen;
+ err = _fdt_splice_struct(fdt, prop->data,
+ FDT_TAGALIGN(oldlen),
+ FDT_TAGALIGN(newlen));
+ if (err)
+ return err;
+ prop->len = cpu_to_fdt32(newlen);
+ memcpy(prop->data + oldlen, val, len);
+ } else {
+ err = _fdt_add_property(fdt, nodeoffset, name, len, &prop);
+ if (err)
+ return err;
+ memcpy(prop->data, val, len);
+ }
+ return 0;
}
int fdt_delprop(void *fdt, int nodeoffset, const char *name)
{
- struct fdt_property *prop;
- int len, proplen;
+ struct fdt_property *prop;
+ int len, proplen;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
- if (! prop)
- return len;
+ prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
+ if (! prop)
+ return len;
- proplen = sizeof(*prop) + FDT_TAGALIGN(len);
- return _fdt_splice_struct(fdt, prop, proplen, 0);
+ proplen = sizeof(*prop) + FDT_TAGALIGN(len);
+ return _fdt_splice_struct(fdt, prop, proplen, 0);
}
int fdt_add_subnode_namelen(void *fdt, int parentoffset,
- const char *name, int namelen)
+ const char *name, int namelen)
{
- struct fdt_node_header *nh;
- int offset, nextoffset;
- int nodelen;
- int err;
- uint32_t tag;
- fdt32_t *endtag;
+ struct fdt_node_header *nh;
+ int offset, nextoffset;
+ int nodelen;
+ int err;
+ uint32_t tag;
+ fdt32_t *endtag;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
- if (offset >= 0)
- return -FDT_ERR_EXISTS;
- else if (offset != -FDT_ERR_NOTFOUND)
- return offset;
+ offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
+ if (offset >= 0)
+ return -FDT_ERR_EXISTS;
+ else if (offset != -FDT_ERR_NOTFOUND)
+ return offset;
- /* Try to place the new node after the parent's properties */
- fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
- do {
- offset = nextoffset;
- tag = fdt_next_tag(fdt, offset, &nextoffset);
- } while ((tag == FDT_PROP) || (tag == FDT_NOP));
+ /* Try to place the new node after the parent's properties */
+ fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
+ do {
+ offset = nextoffset;
+ tag = fdt_next_tag(fdt, offset, &nextoffset);
+ } while ((tag == FDT_PROP) || (tag == FDT_NOP));
- nh = _fdt_offset_ptr_w(fdt, offset);
- nodelen = sizeof(*nh) + FDT_TAGALIGN(namelen+1) + FDT_TAGSIZE;
+ nh = _fdt_offset_ptr_w(fdt, offset);
+ nodelen = sizeof(*nh) + FDT_TAGALIGN(namelen+1) + FDT_TAGSIZE;
- err = _fdt_splice_struct(fdt, nh, 0, nodelen);
- if (err)
- return err;
+ err = _fdt_splice_struct(fdt, nh, 0, nodelen);
+ if (err)
+ return err;
- nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
- memset(nh->name, 0, FDT_TAGALIGN(namelen+1));
- memcpy(nh->name, name, namelen);
- endtag = (fdt32_t *)((char *)nh + nodelen - FDT_TAGSIZE);
- *endtag = cpu_to_fdt32(FDT_END_NODE);
+ nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
+ memset(nh->name, 0, FDT_TAGALIGN(namelen+1));
+ memcpy(nh->name, name, namelen);
+ endtag = (fdt32_t *)((char *)nh + nodelen - FDT_TAGSIZE);
+ *endtag = cpu_to_fdt32(FDT_END_NODE);
- return offset;
+ return offset;
}
int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
{
- return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
+ return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
}
int fdt_del_node(void *fdt, int nodeoffset)
{
- int endoffset;
+ int endoffset;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- endoffset = _fdt_node_end_offset(fdt, nodeoffset);
- if (endoffset < 0)
- return endoffset;
+ endoffset = _fdt_node_end_offset(fdt, nodeoffset);
+ if (endoffset < 0)
+ return endoffset;
- return _fdt_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
- endoffset - nodeoffset, 0);
+ return _fdt_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
+ endoffset - nodeoffset, 0);
}
static void _fdt_packblocks(const char *old, char *new,
- int mem_rsv_size, int struct_size)
+ int mem_rsv_size, int struct_size)
{
- int mem_rsv_off, struct_off, strings_off;
+ int mem_rsv_off, struct_off, strings_off;
- mem_rsv_off = FDT_ALIGN(sizeof(struct fdt_header), 8);
- struct_off = mem_rsv_off + mem_rsv_size;
- strings_off = struct_off + struct_size;
+ mem_rsv_off = FDT_ALIGN(sizeof(struct fdt_header), 8);
+ struct_off = mem_rsv_off + mem_rsv_size;
+ strings_off = struct_off + struct_size;
- memmove(new + mem_rsv_off, old + fdt_off_mem_rsvmap(old), mem_rsv_size);
- fdt_set_off_mem_rsvmap(new, mem_rsv_off);
+ memmove(new + mem_rsv_off, old + fdt_off_mem_rsvmap(old), mem_rsv_size);
+ fdt_set_off_mem_rsvmap(new, mem_rsv_off);
- memmove(new + struct_off, old + fdt_off_dt_struct(old), struct_size);
- fdt_set_off_dt_struct(new, struct_off);
- fdt_set_size_dt_struct(new, struct_size);
+ memmove(new + struct_off, old + fdt_off_dt_struct(old), struct_size);
+ fdt_set_off_dt_struct(new, struct_off);
+ fdt_set_size_dt_struct(new, struct_size);
- memmove(new + strings_off, old + fdt_off_dt_strings(old),
- fdt_size_dt_strings(old));
- fdt_set_off_dt_strings(new, strings_off);
- fdt_set_size_dt_strings(new, fdt_size_dt_strings(old));
+ memmove(new + strings_off, old + fdt_off_dt_strings(old),
+ fdt_size_dt_strings(old));
+ fdt_set_off_dt_strings(new, strings_off);
+ fdt_set_size_dt_strings(new, fdt_size_dt_strings(old));
}
int fdt_open_into(const void *fdt, void *buf, int bufsize)
{
- int err;
- int mem_rsv_size, struct_size;
- int newsize;
- const char *fdtstart = fdt;
- const char *fdtend = fdtstart + fdt_totalsize(fdt);
- char *tmp;
+ int err;
+ int mem_rsv_size, struct_size;
+ int newsize;
+ const char *fdtstart = fdt;
+ const char *fdtend = fdtstart + fdt_totalsize(fdt);
+ char *tmp;
- FDT_CHECK_HEADER(fdt);
+ FDT_CHECK_HEADER(fdt);
- mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
- * sizeof(struct fdt_reserve_entry);
+ mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
+ * sizeof(struct fdt_reserve_entry);
- if (fdt_version(fdt) >= 17) {
- struct_size = fdt_size_dt_struct(fdt);
- } else {
- struct_size = 0;
- while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
- ;
- if (struct_size < 0)
- return struct_size;
- }
+ if (fdt_version(fdt) >= 17) {
+ struct_size = fdt_size_dt_struct(fdt);
+ } else {
+ struct_size = 0;
+ while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
+ ;
+ if (struct_size < 0)
+ return struct_size;
+ }
- if (!_fdt_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
- /* no further work necessary */
- err = fdt_move(fdt, buf, bufsize);
- if (err)
- return err;
- fdt_set_version(buf, 17);
- fdt_set_size_dt_struct(buf, struct_size);
- fdt_set_totalsize(buf, bufsize);
- return 0;
- }
+ if (!_fdt_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
+ /* no further work necessary */
+ err = fdt_move(fdt, buf, bufsize);
+ if (err)
+ return err;
+ fdt_set_version(buf, 17);
+ fdt_set_size_dt_struct(buf, struct_size);
+ fdt_set_totalsize(buf, bufsize);
+ return 0;
+ }
- /* Need to reorder */
- newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
- + struct_size + fdt_size_dt_strings(fdt);
+ /* Need to reorder */
+ newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
+ + struct_size + fdt_size_dt_strings(fdt);
- if (bufsize < newsize)
- return -FDT_ERR_NOSPACE;
+ if (bufsize < newsize)
+ return -FDT_ERR_NOSPACE;
- /* First attempt to build converted tree at beginning of buffer */
- tmp = buf;
- /* But if that overlaps with the old tree... */
- if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) {
- /* Try right after the old tree instead */
- tmp = (char *)(uintptr_t)fdtend;
- if ((tmp + newsize) > ((char *)buf + bufsize))
- return -FDT_ERR_NOSPACE;
- }
+ /* First attempt to build converted tree at beginning of buffer */
+ tmp = buf;
+ /* But if that overlaps with the old tree... */
+ if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) {
+ /* Try right after the old tree instead */
+ tmp = (char *)(uintptr_t)fdtend;
+ if ((tmp + newsize) > ((char *)buf + bufsize))
+ return -FDT_ERR_NOSPACE;
+ }
- _fdt_packblocks(fdt, tmp, mem_rsv_size, struct_size);
- memmove(buf, tmp, newsize);
+ _fdt_packblocks(fdt, tmp, mem_rsv_size, struct_size);
+ memmove(buf, tmp, newsize);
- fdt_set_magic(buf, FDT_MAGIC);
- fdt_set_totalsize(buf, bufsize);
- fdt_set_version(buf, 17);
- fdt_set_last_comp_version(buf, 16);
- fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
+ fdt_set_magic(buf, FDT_MAGIC);
+ fdt_set_totalsize(buf, bufsize);
+ fdt_set_version(buf, 17);
+ fdt_set_last_comp_version(buf, 16);
+ fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
- return 0;
+ return 0;
}
int fdt_pack(void *fdt)
{
- int mem_rsv_size;
+ int mem_rsv_size;
- FDT_RW_CHECK_HEADER(fdt);
+ FDT_RW_CHECK_HEADER(fdt);
- mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
- * sizeof(struct fdt_reserve_entry);
- _fdt_packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt));
- fdt_set_totalsize(fdt, _fdt_data_size(fdt));
+ mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
+ * sizeof(struct fdt_reserve_entry);
+ _fdt_packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt));
+ fdt_set_totalsize(fdt, _fdt_data_size(fdt));
- return 0;
+ return 0;
}
diff --git a/components/drivers/fdt/libfdt/fdt_strerror.c b/components/drivers/fdt/libfdt/fdt_strerror.c
index eda657ff07..a62aad11ed 100644
--- a/components/drivers/fdt/libfdt/fdt_strerror.c
+++ b/components/drivers/fdt/libfdt/fdt_strerror.c
@@ -54,47 +54,47 @@
#include "libfdt_internal.h"
struct fdt_errtabent {
- const char *str;
+ const char *str;
};
#define FDT_ERRTABENT(val) \
- [(val)] = { .str = #val, }
+ [(val)] = { .str = #val, }
static struct fdt_errtabent fdt_errtable[] = {
- FDT_ERRTABENT(FDT_ERR_NOTFOUND),
- FDT_ERRTABENT(FDT_ERR_EXISTS),
- FDT_ERRTABENT(FDT_ERR_NOSPACE),
+ FDT_ERRTABENT(FDT_ERR_NOTFOUND),
+ FDT_ERRTABENT(FDT_ERR_EXISTS),
+ FDT_ERRTABENT(FDT_ERR_NOSPACE),
- FDT_ERRTABENT(FDT_ERR_BADOFFSET),
- FDT_ERRTABENT(FDT_ERR_BADPATH),
- FDT_ERRTABENT(FDT_ERR_BADPHANDLE),
- FDT_ERRTABENT(FDT_ERR_BADSTATE),
+ FDT_ERRTABENT(FDT_ERR_BADOFFSET),
+ FDT_ERRTABENT(FDT_ERR_BADPATH),
+ FDT_ERRTABENT(FDT_ERR_BADPHANDLE),
+ FDT_ERRTABENT(FDT_ERR_BADSTATE),
- FDT_ERRTABENT(FDT_ERR_TRUNCATED),
- FDT_ERRTABENT(FDT_ERR_BADMAGIC),
- FDT_ERRTABENT(FDT_ERR_BADVERSION),
- FDT_ERRTABENT(FDT_ERR_BADSTRUCTURE),
- FDT_ERRTABENT(FDT_ERR_BADLAYOUT),
- FDT_ERRTABENT(FDT_ERR_INTERNAL),
- FDT_ERRTABENT(FDT_ERR_BADNCELLS),
- FDT_ERRTABENT(FDT_ERR_BADVALUE),
- FDT_ERRTABENT(FDT_ERR_BADOVERLAY),
- FDT_ERRTABENT(FDT_ERR_NOPHANDLES),
+ FDT_ERRTABENT(FDT_ERR_TRUNCATED),
+ FDT_ERRTABENT(FDT_ERR_BADMAGIC),
+ FDT_ERRTABENT(FDT_ERR_BADVERSION),
+ FDT_ERRTABENT(FDT_ERR_BADSTRUCTURE),
+ FDT_ERRTABENT(FDT_ERR_BADLAYOUT),
+ FDT_ERRTABENT(FDT_ERR_INTERNAL),
+ FDT_ERRTABENT(FDT_ERR_BADNCELLS),
+ FDT_ERRTABENT(FDT_ERR_BADVALUE),
+ FDT_ERRTABENT(FDT_ERR_BADOVERLAY),
+ FDT_ERRTABENT(FDT_ERR_NOPHANDLES),
};
-#define FDT_ERRTABSIZE (sizeof(fdt_errtable) / sizeof(fdt_errtable[0]))
+#define FDT_ERRTABSIZE (sizeof(fdt_errtable) / sizeof(fdt_errtable[0]))
const char *fdt_strerror(int errval)
{
- if (errval > 0)
- return "";
- else if (errval == 0)
- return "";
- else if (errval > -FDT_ERRTABSIZE) {
- const char *s = fdt_errtable[-errval].str;
+ if (errval > 0)
+ return "";
+ else if (errval == 0)
+ return "";
+ else if (errval > -FDT_ERRTABSIZE) {
+ const char *s = fdt_errtable[-errval].str;
- if (s)
- return s;
- }
+ if (s)
+ return s;
+ }
- return "";
+ return "";
}
diff --git a/components/drivers/fdt/libfdt/fdt_sw.c b/components/drivers/fdt/libfdt/fdt_sw.c
index 5d6de1b1b2..4834d01b48 100644
--- a/components/drivers/fdt/libfdt/fdt_sw.c
+++ b/components/drivers/fdt/libfdt/fdt_sw.c
@@ -55,232 +55,232 @@
static int _fdt_sw_check_header(void *fdt)
{
- if (fdt_magic(fdt) != FDT_SW_MAGIC)
- return -FDT_ERR_BADMAGIC;
- /* FIXME: should check more details about the header state */
- return 0;
+ if (fdt_magic(fdt) != FDT_SW_MAGIC)
+ return -FDT_ERR_BADMAGIC;
+ /* FIXME: should check more details about the header state */
+ return 0;
}
#define FDT_SW_CHECK_HEADER(fdt) \
- { \
- int err; \
- if ((err = _fdt_sw_check_header(fdt)) != 0) \
- return err; \
- }
+ { \
+ int err; \
+ if ((err = _fdt_sw_check_header(fdt)) != 0) \
+ return err; \
+ }
static void *_fdt_grab_space(void *fdt, size_t len)
{
- int offset = fdt_size_dt_struct(fdt);
- int spaceleft;
+ int offset = fdt_size_dt_struct(fdt);
+ int spaceleft;
- spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
- - fdt_size_dt_strings(fdt);
+ spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
+ - fdt_size_dt_strings(fdt);
- if ((offset + len < offset) || (offset + len > spaceleft))
- return NULL;
+ if ((offset + len < offset) || (offset + len > spaceleft))
+ return NULL;
- fdt_set_size_dt_struct(fdt, offset + len);
- return _fdt_offset_ptr_w(fdt, offset);
+ fdt_set_size_dt_struct(fdt, offset + len);
+ return _fdt_offset_ptr_w(fdt, offset);
}
int fdt_create(void *buf, int bufsize)
{
- void *fdt = buf;
+ void *fdt = buf;
- if (bufsize < sizeof(struct fdt_header))
- return -FDT_ERR_NOSPACE;
+ if (bufsize < sizeof(struct fdt_header))
+ return -FDT_ERR_NOSPACE;
- memset(buf, 0, bufsize);
+ memset(buf, 0, bufsize);
- fdt_set_magic(fdt, FDT_SW_MAGIC);
- fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
- fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);
- fdt_set_totalsize(fdt, bufsize);
+ fdt_set_magic(fdt, FDT_SW_MAGIC);
+ fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
+ fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);
+ fdt_set_totalsize(fdt, bufsize);
- fdt_set_off_mem_rsvmap(fdt, FDT_ALIGN(sizeof(struct fdt_header),
- sizeof(struct fdt_reserve_entry)));
- fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt));
- fdt_set_off_dt_strings(fdt, bufsize);
+ fdt_set_off_mem_rsvmap(fdt, FDT_ALIGN(sizeof(struct fdt_header),
+ sizeof(struct fdt_reserve_entry)));
+ fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt));
+ fdt_set_off_dt_strings(fdt, bufsize);
- return 0;
+ return 0;
}
int fdt_resize(void *fdt, void *buf, int bufsize)
{
- size_t headsize, tailsize;
- char *oldtail, *newtail;
+ size_t headsize, tailsize;
+ char *oldtail, *newtail;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- headsize = fdt_off_dt_struct(fdt);
- tailsize = fdt_size_dt_strings(fdt);
+ headsize = fdt_off_dt_struct(fdt);
+ tailsize = fdt_size_dt_strings(fdt);
- if ((headsize + tailsize) > bufsize)
- return -FDT_ERR_NOSPACE;
+ if ((headsize + tailsize) > bufsize)
+ return -FDT_ERR_NOSPACE;
- oldtail = (char *)fdt + fdt_totalsize(fdt) - tailsize;
- newtail = (char *)buf + bufsize - tailsize;
+ oldtail = (char *)fdt + fdt_totalsize(fdt) - tailsize;
+ newtail = (char *)buf + bufsize - tailsize;
- /* Two cases to avoid clobbering data if the old and new
- * buffers partially overlap */
- if (buf <= fdt) {
- memmove(buf, fdt, headsize);
- memmove(newtail, oldtail, tailsize);
- } else {
- memmove(newtail, oldtail, tailsize);
- memmove(buf, fdt, headsize);
- }
+ /* Two cases to avoid clobbering data if the old and new
+ * buffers partially overlap */
+ if (buf <= fdt) {
+ memmove(buf, fdt, headsize);
+ memmove(newtail, oldtail, tailsize);
+ } else {
+ memmove(newtail, oldtail, tailsize);
+ memmove(buf, fdt, headsize);
+ }
- fdt_set_off_dt_strings(buf, bufsize);
- fdt_set_totalsize(buf, bufsize);
+ fdt_set_off_dt_strings(buf, bufsize);
+ fdt_set_totalsize(buf, bufsize);
- return 0;
+ return 0;
}
int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
{
- struct fdt_reserve_entry *re;
- int offset;
+ struct fdt_reserve_entry *re;
+ int offset;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- if (fdt_size_dt_struct(fdt))
- return -FDT_ERR_BADSTATE;
+ if (fdt_size_dt_struct(fdt))
+ return -FDT_ERR_BADSTATE;
- offset = fdt_off_dt_struct(fdt);
- if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
- return -FDT_ERR_NOSPACE;
+ offset = fdt_off_dt_struct(fdt);
+ if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
+ return -FDT_ERR_NOSPACE;
- re = (struct fdt_reserve_entry *)((char *)fdt + offset);
- re->address = cpu_to_fdt64(addr);
- re->size = cpu_to_fdt64(size);
+ re = (struct fdt_reserve_entry *)((char *)fdt + offset);
+ re->address = cpu_to_fdt64(addr);
+ re->size = cpu_to_fdt64(size);
- fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
+ fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
- return 0;
+ return 0;
}
int fdt_finish_reservemap(void *fdt)
{
- return fdt_add_reservemap_entry(fdt, 0, 0);
+ return fdt_add_reservemap_entry(fdt, 0, 0);
}
int fdt_begin_node(void *fdt, const char *name)
{
- struct fdt_node_header *nh;
- int namelen = strlen(name) + 1;
+ struct fdt_node_header *nh;
+ int namelen = strlen(name) + 1;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- nh = _fdt_grab_space(fdt, sizeof(*nh) + FDT_TAGALIGN(namelen));
- if (! nh)
- return -FDT_ERR_NOSPACE;
+ nh = _fdt_grab_space(fdt, sizeof(*nh) + FDT_TAGALIGN(namelen));
+ if (! nh)
+ return -FDT_ERR_NOSPACE;
- nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
- memcpy(nh->name, name, namelen);
- return 0;
+ nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
+ memcpy(nh->name, name, namelen);
+ return 0;
}
int fdt_end_node(void *fdt)
{
- fdt32_t *en;
+ fdt32_t *en;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- en = _fdt_grab_space(fdt, FDT_TAGSIZE);
- if (! en)
- return -FDT_ERR_NOSPACE;
+ en = _fdt_grab_space(fdt, FDT_TAGSIZE);
+ if (! en)
+ return -FDT_ERR_NOSPACE;
- *en = cpu_to_fdt32(FDT_END_NODE);
- return 0;
+ *en = cpu_to_fdt32(FDT_END_NODE);
+ return 0;
}
static int _fdt_find_add_string(void *fdt, const char *s)
{
- char *strtab = (char *)fdt + fdt_totalsize(fdt);
- const char *p;
- int strtabsize = fdt_size_dt_strings(fdt);
- int len = strlen(s) + 1;
- int struct_top, offset;
+ char *strtab = (char *)fdt + fdt_totalsize(fdt);
+ const char *p;
+ int strtabsize = fdt_size_dt_strings(fdt);
+ int len = strlen(s) + 1;
+ int struct_top, offset;
- p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
- if (p)
- return p - strtab;
+ p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
+ if (p)
+ return p - strtab;
- /* Add it */
- offset = -strtabsize - len;
- struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
- if (fdt_totalsize(fdt) + offset < struct_top)
- return 0; /* no more room :( */
+ /* Add it */
+ offset = -strtabsize - len;
+ struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
+ if (fdt_totalsize(fdt) + offset < struct_top)
+ return 0; /* no more room :( */
- memcpy(strtab + offset, s, len);
- fdt_set_size_dt_strings(fdt, strtabsize + len);
- return offset;
+ memcpy(strtab + offset, s, len);
+ fdt_set_size_dt_strings(fdt, strtabsize + len);
+ return offset;
}
int fdt_property(void *fdt, const char *name, const void *val, int len)
{
- struct fdt_property *prop;
- int nameoff;
+ struct fdt_property *prop;
+ int nameoff;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- nameoff = _fdt_find_add_string(fdt, name);
- if (nameoff == 0)
- return -FDT_ERR_NOSPACE;
+ nameoff = _fdt_find_add_string(fdt, name);
+ if (nameoff == 0)
+ return -FDT_ERR_NOSPACE;
- prop = _fdt_grab_space(fdt, sizeof(*prop) + FDT_TAGALIGN(len));
- if (! prop)
- return -FDT_ERR_NOSPACE;
+ prop = _fdt_grab_space(fdt, sizeof(*prop) + FDT_TAGALIGN(len));
+ if (! prop)
+ return -FDT_ERR_NOSPACE;
- prop->tag = cpu_to_fdt32(FDT_PROP);
- prop->nameoff = cpu_to_fdt32(nameoff);
- prop->len = cpu_to_fdt32(len);
- memcpy(prop->data, val, len);
- return 0;
+ prop->tag = cpu_to_fdt32(FDT_PROP);
+ prop->nameoff = cpu_to_fdt32(nameoff);
+ prop->len = cpu_to_fdt32(len);
+ memcpy(prop->data, val, len);
+ return 0;
}
int fdt_finish(void *fdt)
{
- char *p = (char *)fdt;
- fdt32_t *end;
- int oldstroffset, newstroffset;
- uint32_t tag;
- int offset, nextoffset;
+ char *p = (char *)fdt;
+ fdt32_t *end;
+ int oldstroffset, newstroffset;
+ uint32_t tag;
+ int offset, nextoffset;
- FDT_SW_CHECK_HEADER(fdt);
+ FDT_SW_CHECK_HEADER(fdt);
- /* Add terminator */
- end = _fdt_grab_space(fdt, sizeof(*end));
- if (! end)
- return -FDT_ERR_NOSPACE;
- *end = cpu_to_fdt32(FDT_END);
+ /* Add terminator */
+ end = _fdt_grab_space(fdt, sizeof(*end));
+ if (! end)
+ return -FDT_ERR_NOSPACE;
+ *end = cpu_to_fdt32(FDT_END);
- /* Relocate the string table */
- oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt);
- newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
- memmove(p + newstroffset, p + oldstroffset, fdt_size_dt_strings(fdt));
- fdt_set_off_dt_strings(fdt, newstroffset);
+ /* Relocate the string table */
+ oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt);
+ newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
+ memmove(p + newstroffset, p + oldstroffset, fdt_size_dt_strings(fdt));
+ fdt_set_off_dt_strings(fdt, newstroffset);
- /* Walk the structure, correcting string offsets */
- offset = 0;
- while ((tag = fdt_next_tag(fdt, offset, &nextoffset)) != FDT_END) {
- if (tag == FDT_PROP) {
- struct fdt_property *prop =
- _fdt_offset_ptr_w(fdt, offset);
- int nameoff;
+ /* Walk the structure, correcting string offsets */
+ offset = 0;
+ while ((tag = fdt_next_tag(fdt, offset, &nextoffset)) != FDT_END) {
+ if (tag == FDT_PROP) {
+ struct fdt_property *prop =
+ _fdt_offset_ptr_w(fdt, offset);
+ int nameoff;
- nameoff = fdt32_to_cpu(prop->nameoff);
- nameoff += fdt_size_dt_strings(fdt);
- prop->nameoff = cpu_to_fdt32(nameoff);
- }
- offset = nextoffset;
- }
- if (nextoffset < 0)
- return nextoffset;
+ nameoff = fdt32_to_cpu(prop->nameoff);
+ nameoff += fdt_size_dt_strings(fdt);
+ prop->nameoff = cpu_to_fdt32(nameoff);
+ }
+ offset = nextoffset;
+ }
+ if (nextoffset < 0)
+ return nextoffset;
- /* Finally, adjust the header */
- fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
- fdt_set_magic(fdt, FDT_MAGIC);
- return 0;
+ /* Finally, adjust the header */
+ fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
+ fdt_set_magic(fdt, FDT_MAGIC);
+ return 0;
}
diff --git a/components/drivers/fdt/libfdt/fdt_wip.c b/components/drivers/fdt/libfdt/fdt_wip.c
index a9f2d66679..a817fefdbe 100644
--- a/components/drivers/fdt/libfdt/fdt_wip.c
+++ b/components/drivers/fdt/libfdt/fdt_wip.c
@@ -54,84 +54,84 @@
#include "libfdt_internal.h"
int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,
- const char *name, int namelen,
- uint32_t idx, const void *val,
- int len)
+ const char *name, int namelen,
+ uint32_t idx, const void *val,
+ int len)
{
- void *propval;
- int proplen;
+ void *propval;
+ int proplen;
- propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen,
- &proplen);
- if (!propval)
- return proplen;
+ propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen,
+ &proplen);
+ if (!propval)
+ return proplen;
- if (proplen < (len + idx))
- return -FDT_ERR_NOSPACE;
+ if (proplen < (len + idx))
+ return -FDT_ERR_NOSPACE;
- memcpy((char *)propval + idx, val, len);
- return 0;
+ memcpy((char *)propval + idx, val, len);
+ return 0;
}
int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
- const void *val, int len)
+ const void *val, int len)
{
- const void *propval;
- int proplen;
+ const void *propval;
+ int proplen;
- propval = fdt_getprop(fdt, nodeoffset, name, &proplen);
- if (! propval)
- return proplen;
+ propval = fdt_getprop(fdt, nodeoffset, name, &proplen);
+ if (! propval)
+ return proplen;
- if (proplen != len)
- return -FDT_ERR_NOSPACE;
+ if (proplen != len)
+ return -FDT_ERR_NOSPACE;
- return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name,
- strlen(name), 0,
- val, len);
+ return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name,
+ strlen(name), 0,
+ val, len);
}
static void _fdt_nop_region(void *start, int len)
{
- fdt32_t *p;
+ fdt32_t *p;
- for (p = start; (char *)p < ((char *)start + len); p++)
- *p = cpu_to_fdt32(FDT_NOP);
+ for (p = start; (char *)p < ((char *)start + len); p++)
+ *p = cpu_to_fdt32(FDT_NOP);
}
int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
{
- struct fdt_property *prop;
- int len;
+ struct fdt_property *prop;
+ int len;
- prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
- if (! prop)
- return len;
+ prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
+ if (! prop)
+ return len;
- _fdt_nop_region(prop, len + sizeof(*prop));
+ _fdt_nop_region(prop, len + sizeof(*prop));
- return 0;
+ return 0;
}
int _fdt_node_end_offset(void *fdt, int offset)
{
- int depth = 0;
+ int depth = 0;
- while ((offset >= 0) && (depth >= 0))
- offset = fdt_next_node(fdt, offset, &depth);
+ while ((offset >= 0) && (depth >= 0))
+ offset = fdt_next_node(fdt, offset, &depth);
- return offset;
+ return offset;
}
int fdt_nop_node(void *fdt, int nodeoffset)
{
- int endoffset;
+ int endoffset;
- endoffset = _fdt_node_end_offset(fdt, nodeoffset);
- if (endoffset < 0)
- return endoffset;
+ endoffset = _fdt_node_end_offset(fdt, nodeoffset);
+ if (endoffset < 0)
+ return endoffset;
- _fdt_nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0),
- endoffset - nodeoffset);
- return 0;
+ _fdt_nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0),
+ endoffset - nodeoffset);
+ return 0;
}
diff --git a/components/drivers/fdt/libfdt/libfdt_env.h b/components/drivers/fdt/libfdt/libfdt_env.h
index f4a6b6063b..3acc87f2bb 100644
--- a/components/drivers/fdt/libfdt/libfdt_env.h
+++ b/components/drivers/fdt/libfdt/libfdt_env.h
@@ -70,40 +70,40 @@ typedef uint32_t FDT_BITWISE fdt32_t;
typedef uint64_t FDT_BITWISE fdt64_t;
typedef uint64_t unaligned_fdt64_t __attribute__((aligned(4)));
-#define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n])
+#define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n])
#define CPU_TO_FDT16(x) ((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1))
#define CPU_TO_FDT32(x) ((EXTRACT_BYTE(x, 0) << 24) | (EXTRACT_BYTE(x, 1) << 16) | \
- (EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))
+ (EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))
#define CPU_TO_FDT64(x) ((EXTRACT_BYTE(x, 0) << 56) | (EXTRACT_BYTE(x, 1) << 48) | \
- (EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
- (EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
- (EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))
+ (EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
+ (EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
+ (EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))
static inline uint16_t fdt16_to_cpu(fdt16_t x)
{
- return (FDT_FORCE uint16_t)CPU_TO_FDT16(x);
+ return (FDT_FORCE uint16_t)CPU_TO_FDT16(x);
}
static inline fdt16_t cpu_to_fdt16(uint16_t x)
{
- return (FDT_FORCE fdt16_t)CPU_TO_FDT16(x);
+ return (FDT_FORCE fdt16_t)CPU_TO_FDT16(x);
}
static inline uint32_t fdt32_to_cpu(fdt32_t x)
{
- return (FDT_FORCE uint32_t)CPU_TO_FDT32(x);
+ return (FDT_FORCE uint32_t)CPU_TO_FDT32(x);
}
static inline fdt32_t cpu_to_fdt32(uint32_t x)
{
- return (FDT_FORCE fdt32_t)CPU_TO_FDT32(x);
+ return (FDT_FORCE fdt32_t)CPU_TO_FDT32(x);
}
static inline uint64_t fdt64_to_cpu(fdt64_t x)
{
- return (FDT_FORCE uint64_t)CPU_TO_FDT64(x);
+ return (FDT_FORCE uint64_t)CPU_TO_FDT64(x);
}
static inline fdt64_t cpu_to_fdt64(uint64_t x)
{
- return (FDT_FORCE fdt64_t)CPU_TO_FDT64(x);
+ return (FDT_FORCE fdt64_t)CPU_TO_FDT64(x);
}
#undef CPU_TO_FDT64
#undef CPU_TO_FDT32
diff --git a/components/drivers/fdt/libfdt/libfdt_internal.h b/components/drivers/fdt/libfdt/libfdt_internal.h
index 5cb817b365..b813e58167 100644
--- a/components/drivers/fdt/libfdt/libfdt_internal.h
+++ b/components/drivers/fdt/libfdt/libfdt_internal.h
@@ -52,15 +52,15 @@
*/
#include "fdt.h"
-#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
-#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
+#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
+#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
#define FDT_CHECK_HEADER(fdt) \
- { \
- int __err; \
- if ((__err = fdt_check_header(fdt)) != 0) \
- return __err; \
- }
+ { \
+ int __err; \
+ if ((__err = fdt_check_header(fdt)) != 0) \
+ return __err; \
+ }
int _fdt_check_node_offset(const void *fdt, int offset);
int _fdt_check_prop_offset(const void *fdt, int offset);
@@ -69,27 +69,27 @@ int _fdt_node_end_offset(void *fdt, int nodeoffset);
static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
{
- return (const char *)fdt + fdt_off_dt_struct(fdt) + offset;
+ return (const char *)fdt + fdt_off_dt_struct(fdt) + offset;
}
static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
{
- return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset);
+ return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset);
}
static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
{
- const struct fdt_reserve_entry *rsv_table =
- (const struct fdt_reserve_entry *)
- ((const char *)fdt + fdt_off_mem_rsvmap(fdt));
+ const struct fdt_reserve_entry *rsv_table =
+ (const struct fdt_reserve_entry *)
+ ((const char *)fdt + fdt_off_mem_rsvmap(fdt));
- return rsv_table + n;
+ return rsv_table + n;
}
static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
{
- return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n);
+ return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n);
}
-#define FDT_SW_MAGIC (~FDT_MAGIC)
+#define FDT_SW_MAGIC (~FDT_MAGIC)
#endif /* _LIBFDT_INTERNAL_H */
diff --git a/components/drivers/fdt/src/dtb_base.c b/components/drivers/fdt/src/dtb_base.c
index 6b1c580d12..58afd61a82 100644
--- a/components/drivers/fdt/src/dtb_base.c
+++ b/components/drivers/fdt/src/dtb_base.c
@@ -213,16 +213,16 @@ int dtb_node_get_addr_and_size_by_index(const struct dtb_node *node, int index,
int onesize, na, ns;
na = dtb_node_n_addr_cells(node);
- ns = dtb_node_n_size_cells(node);
+ ns = dtb_node_n_size_cells(node);
prop = dtb_node_get_dtb_node_property_value(node, "reg", &psize);
- if (prop == NULL)
+ if (prop == NULL)
{
- return -1;
+ return -1;
}
- psize /= 4;
- onesize = na + ns;
+ psize /= 4;
+ onesize = na + ns;
if (psize >= (index + 1) * onesize)
{
diff --git a/components/drivers/fdt/src/dtb_get.c b/components/drivers/fdt/src/dtb_get.c
index 4922b98d6c..3f5be73469 100644
--- a/components/drivers/fdt/src/dtb_get.c
+++ b/components/drivers/fdt/src/dtb_get.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/components/drivers/fdt/src/dtb_head.c b/components/drivers/fdt/src/dtb_head.c
index 7fe661943d..6142673393 100644
--- a/components/drivers/fdt/src/dtb_head.c
+++ b/components/drivers/fdt/src/dtb_head.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -38,4 +38,4 @@ int device_tree_setup(void *mem_addr)
}
return -1;
-}
\ No newline at end of file
+}
diff --git a/components/drivers/fdt/src/dtb_load.c b/components/drivers/fdt/src/dtb_load.c
index ba47c383e9..e3b7f34e8b 100644
--- a/components/drivers/fdt/src/dtb_load.c
+++ b/components/drivers/fdt/src/dtb_load.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/components/drivers/fdt/src/dtb_set.c b/components/drivers/fdt/src/dtb_set.c
index 28fe2b5fde..f0e11b6b4f 100644
--- a/components/drivers/fdt/src/dtb_set.c
+++ b/components/drivers/fdt/src/dtb_set.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/components/drivers/hwcrypto/hw_bignum.c b/components/drivers/hwcrypto/hw_bignum.c
index 1d756d737d..74c3e03a8e 100644
--- a/components/drivers/hwcrypto/hw_bignum.c
+++ b/components/drivers/hwcrypto/hw_bignum.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_bignum.h b/components/drivers/hwcrypto/hw_bignum.h
index 5d4d15a1e4..b62246d648 100644
--- a/components/drivers/hwcrypto/hw_bignum.h
+++ b/components/drivers/hwcrypto/hw_bignum.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_crc.c b/components/drivers/hwcrypto/hw_crc.c
index 21a97bf097..8ff071e749 100644
--- a/components/drivers/hwcrypto/hw_crc.c
+++ b/components/drivers/hwcrypto/hw_crc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_crc.h b/components/drivers/hwcrypto/hw_crc.h
index 8e0fcefccf..470fecfd70 100644
--- a/components/drivers/hwcrypto/hw_crc.h
+++ b/components/drivers/hwcrypto/hw_crc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_gcm.c b/components/drivers/hwcrypto/hw_gcm.c
index a8106694f9..42b72a7843 100644
--- a/components/drivers/hwcrypto/hw_gcm.c
+++ b/components/drivers/hwcrypto/hw_gcm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_gcm.h b/components/drivers/hwcrypto/hw_gcm.h
index 6c3470ec1a..e1ef5abe03 100644
--- a/components/drivers/hwcrypto/hw_gcm.h
+++ b/components/drivers/hwcrypto/hw_gcm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_hash.c b/components/drivers/hwcrypto/hw_hash.c
index cf5ec8d70a..256dbf35e0 100644
--- a/components/drivers/hwcrypto/hw_hash.c
+++ b/components/drivers/hwcrypto/hw_hash.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_hash.h b/components/drivers/hwcrypto/hw_hash.h
index 41abd06c4c..023783aa5c 100644
--- a/components/drivers/hwcrypto/hw_hash.h
+++ b/components/drivers/hwcrypto/hw_hash.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_rng.c b/components/drivers/hwcrypto/hw_rng.c
index b6f62db347..bfbea6c5c7 100644
--- a/components/drivers/hwcrypto/hw_rng.c
+++ b/components/drivers/hwcrypto/hw_rng.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_rng.h b/components/drivers/hwcrypto/hw_rng.h
index 3c014f6bee..bc0c5da965 100644
--- a/components/drivers/hwcrypto/hw_rng.h
+++ b/components/drivers/hwcrypto/hw_rng.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_symmetric.c b/components/drivers/hwcrypto/hw_symmetric.c
index 4a8237c464..a408813ce9 100644
--- a/components/drivers/hwcrypto/hw_symmetric.c
+++ b/components/drivers/hwcrypto/hw_symmetric.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hw_symmetric.h b/components/drivers/hwcrypto/hw_symmetric.h
index 8886119195..e7b42c7612 100644
--- a/components/drivers/hwcrypto/hw_symmetric.h
+++ b/components/drivers/hwcrypto/hw_symmetric.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hwcrypto.c b/components/drivers/hwcrypto/hwcrypto.c
index 3806298f90..ef18d589de 100644
--- a/components/drivers/hwcrypto/hwcrypto.c
+++ b/components/drivers/hwcrypto/hwcrypto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwcrypto/hwcrypto.h b/components/drivers/hwcrypto/hwcrypto.h
index cdf057c49d..8c4ee9a2c9 100644
--- a/components/drivers/hwcrypto/hwcrypto.h
+++ b/components/drivers/hwcrypto/hwcrypto.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/hwtimer/hwtimer.c b/components/drivers/hwtimer/hwtimer.c
index f8e1a35275..f17a08bd8e 100644
--- a/components/drivers/hwtimer/hwtimer.c
+++ b/components/drivers/hwtimer/hwtimer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/i2c/i2c-bit-ops.c b/components/drivers/i2c/i2c-bit-ops.c
index 5446184558..1a36ee643e 100644
--- a/components/drivers/i2c/i2c-bit-ops.c
+++ b/components/drivers/i2c/i2c-bit-ops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/i2c/i2c_core.c b/components/drivers/i2c/i2c_core.c
index 01ca1636c3..21213b1b1c 100644
--- a/components/drivers/i2c/i2c_core.c
+++ b/components/drivers/i2c/i2c_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/i2c/i2c_dev.c b/components/drivers/i2c/i2c_dev.c
index ffd24f95b5..f492d470a5 100644
--- a/components/drivers/i2c/i2c_dev.c
+++ b/components/drivers/i2c/i2c_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/adc.h b/components/drivers/include/drivers/adc.h
index b332c94538..7c35f1eac6 100644
--- a/components/drivers/include/drivers/adc.h
+++ b/components/drivers/include/drivers/adc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/alarm.h b/components/drivers/include/drivers/alarm.h
index bd631edac1..864933d78c 100644
--- a/components/drivers/include/drivers/alarm.h
+++ b/components/drivers/include/drivers/alarm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/audio.h b/components/drivers/include/drivers/audio.h
index 79856a37a8..6d98272556 100644
--- a/components/drivers/include/drivers/audio.h
+++ b/components/drivers/include/drivers/audio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/can.h b/components/drivers/include/drivers/can.h
index 0c8bf954bc..ec69d35b5a 100644
--- a/components/drivers/include/drivers/can.h
+++ b/components/drivers/include/drivers/can.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/cputime.h b/components/drivers/include/drivers/cputime.h
index 9c32cd97f8..3b1eb2aec0 100644
--- a/components/drivers/include/drivers/cputime.h
+++ b/components/drivers/include/drivers/cputime.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/crypto.h b/components/drivers/include/drivers/crypto.h
index 8270a78b09..d44727e195 100644
--- a/components/drivers/include/drivers/crypto.h
+++ b/components/drivers/include/drivers/crypto.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/dac.h b/components/drivers/include/drivers/dac.h
index 0270b988ba..c03fa10929 100644
--- a/components/drivers/include/drivers/dac.h
+++ b/components/drivers/include/drivers/dac.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/gpt.h b/components/drivers/include/drivers/gpt.h
index c1bdcb732a..b88784764b 100644
--- a/components/drivers/include/drivers/gpt.h
+++ b/components/drivers/include/drivers/gpt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/hwtimer.h b/components/drivers/include/drivers/hwtimer.h
index 312f3b6eb9..5676765d60 100644
--- a/components/drivers/include/drivers/hwtimer.h
+++ b/components/drivers/include/drivers/hwtimer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/i2c-bit-ops.h b/components/drivers/include/drivers/i2c-bit-ops.h
index 0d94de114a..ef278caa2c 100644
--- a/components/drivers/include/drivers/i2c-bit-ops.h
+++ b/components/drivers/include/drivers/i2c-bit-ops.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/i2c.h b/components/drivers/include/drivers/i2c.h
index 1a5396c538..2a900536df 100644
--- a/components/drivers/include/drivers/i2c.h
+++ b/components/drivers/include/drivers/i2c.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/i2c_dev.h b/components/drivers/include/drivers/i2c_dev.h
index 9fc454b1b2..60bbad0507 100644
--- a/components/drivers/include/drivers/i2c_dev.h
+++ b/components/drivers/include/drivers/i2c_dev.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/lcd.h b/components/drivers/include/drivers/lcd.h
index 74d291feac..04e7038cfe 100644
--- a/components/drivers/include/drivers/lcd.h
+++ b/components/drivers/include/drivers/lcd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -103,7 +103,7 @@ struct fb_fix_screeninfo
/* (physical address) */
uint32_t mmio_len; /* Length of Memory Mapped I/O */
uint32_t accel; /* Indicate to driver which */
- /* specific chip/card we have */
+ /* specific chip/card we have */
uint16_t capabilities; /* see FB_CAP_* */
uint16_t reserved[2]; /* Reserved for future compatibility */
};
diff --git a/components/drivers/include/drivers/lptimer.h b/components/drivers/include/drivers/lptimer.h
index e59ce61d22..69fab38e23 100644
--- a/components/drivers/include/drivers/lptimer.h
+++ b/components/drivers/include/drivers/lptimer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mmc.h b/components/drivers/include/drivers/mmc.h
index 60915c55ff..c531baa90f 100644
--- a/components/drivers/include/drivers/mmc.h
+++ b/components/drivers/include/drivers/mmc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mmcsd_card.h b/components/drivers/include/drivers/mmcsd_card.h
index f877e60069..da10d1ecc6 100644
--- a/components/drivers/include/drivers/mmcsd_card.h
+++ b/components/drivers/include/drivers/mmcsd_card.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mmcsd_cmd.h b/components/drivers/include/drivers/mmcsd_cmd.h
index 2bd7b93ee1..d470942815 100644
--- a/components/drivers/include/drivers/mmcsd_cmd.h
+++ b/components/drivers/include/drivers/mmcsd_cmd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mmcsd_core.h b/components/drivers/include/drivers/mmcsd_core.h
index 04a6ffde2b..3a6ac13aa9 100644
--- a/components/drivers/include/drivers/mmcsd_core.h
+++ b/components/drivers/include/drivers/mmcsd_core.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mmcsd_host.h b/components/drivers/include/drivers/mmcsd_host.h
index 774f515c8a..c6935c1056 100644
--- a/components/drivers/include/drivers/mmcsd_host.h
+++ b/components/drivers/include/drivers/mmcsd_host.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/mtd_nand.h b/components/drivers/include/drivers/mtd_nand.h
index 94bd5e8be6..1281d81b11 100644
--- a/components/drivers/include/drivers/mtd_nand.h
+++ b/components/drivers/include/drivers/mtd_nand.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/phy.h b/components/drivers/include/drivers/phy.h
index f0b1ce5e1d..862b711ff0 100644
--- a/components/drivers/include/drivers/phy.h
+++ b/components/drivers/include/drivers/phy.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/phy_mdio.h b/components/drivers/include/drivers/phy_mdio.h
index fdef455db2..b7677d31d1 100644
--- a/components/drivers/include/drivers/phy_mdio.h
+++ b/components/drivers/include/drivers/phy_mdio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/pin.h b/components/drivers/include/drivers/pin.h
index 2b35421bd9..4b369d5b8d 100644
--- a/components/drivers/include/drivers/pin.h
+++ b/components/drivers/include/drivers/pin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/pm.h b/components/drivers/include/drivers/pm.h
index 99d1ff4870..45b3ae09e6 100644
--- a/components/drivers/include/drivers/pm.h
+++ b/components/drivers/include/drivers/pm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/pulse_encoder.h b/components/drivers/include/drivers/pulse_encoder.h
index 85928b6e78..846d789b37 100644
--- a/components/drivers/include/drivers/pulse_encoder.h
+++ b/components/drivers/include/drivers/pulse_encoder.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/rt_dev_bus.h b/components/drivers/include/drivers/rt_dev_bus.h
index 9fe8af893c..3ed464963a 100644
--- a/components/drivers/include/drivers/rt_dev_bus.h
+++ b/components/drivers/include/drivers/rt_dev_bus.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/rt_drv_pwm.h b/components/drivers/include/drivers/rt_drv_pwm.h
index fa7de61b29..e9e1707144 100644
--- a/components/drivers/include/drivers/rt_drv_pwm.h
+++ b/components/drivers/include/drivers/rt_drv_pwm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/rt_inputcapture.h b/components/drivers/include/drivers/rt_inputcapture.h
index 12a8b54274..de66d993d4 100644
--- a/components/drivers/include/drivers/rt_inputcapture.h
+++ b/components/drivers/include/drivers/rt_inputcapture.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/rtc.h b/components/drivers/include/drivers/rtc.h
index 2e007e8dd6..ce364d79a8 100644
--- a/components/drivers/include/drivers/rtc.h
+++ b/components/drivers/include/drivers/rtc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/sd.h b/components/drivers/include/drivers/sd.h
index 450f23e65b..45e27aa8a7 100644
--- a/components/drivers/include/drivers/sd.h
+++ b/components/drivers/include/drivers/sd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/sdio.h b/components/drivers/include/drivers/sdio.h
index 212d8cfb52..b145ffd280 100644
--- a/components/drivers/include/drivers/sdio.h
+++ b/components/drivers/include/drivers/sdio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/sdio_func_ids.h b/components/drivers/include/drivers/sdio_func_ids.h
index 76502ff6ea..0a4ea742c3 100644
--- a/components/drivers/include/drivers/sdio_func_ids.h
+++ b/components/drivers/include/drivers/sdio_func_ids.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/sensor.h b/components/drivers/include/drivers/sensor.h
index f57e53d0ba..72044a3ee2 100644
--- a/components/drivers/include/drivers/sensor.h
+++ b/components/drivers/include/drivers/sensor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h
index e7432b1e1d..09d7c2f083 100644
--- a/components/drivers/include/drivers/serial.h
+++ b/components/drivers/include/drivers/serial.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/serial_v2.h b/components/drivers/include/drivers/serial_v2.h
index 26ce0550eb..4b3e2cba06 100644
--- a/components/drivers/include/drivers/serial_v2.h
+++ b/components/drivers/include/drivers/serial_v2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/touch.h b/components/drivers/include/drivers/touch.h
index 367d132016..aa297491dc 100644
--- a/components/drivers/include/drivers/touch.h
+++ b/components/drivers/include/drivers/touch.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/usb_common.h b/components/drivers/include/drivers/usb_common.h
index 1c3dd1ec49..286b77547c 100644
--- a/components/drivers/include/drivers/usb_common.h
+++ b/components/drivers/include/drivers/usb_common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/usb_device.h b/components/drivers/include/drivers/usb_device.h
index af978e870c..42636a939f 100644
--- a/components/drivers/include/drivers/usb_device.h
+++ b/components/drivers/include/drivers/usb_device.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/usb_host.h b/components/drivers/include/drivers/usb_host.h
index e3339694e5..614ed3cb0e 100644
--- a/components/drivers/include/drivers/usb_host.h
+++ b/components/drivers/include/drivers/usb_host.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/watchdog.h b/components/drivers/include/drivers/watchdog.h
index 50d27046d7..e08d35d87e 100644
--- a/components/drivers/include/drivers/watchdog.h
+++ b/components/drivers/include/drivers/watchdog.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ * COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/drivers/wlan.h b/components/drivers/include/drivers/wlan.h
index b5b4f73586..946851808a 100644
--- a/components/drivers/include/drivers/wlan.h
+++ b/components/drivers/include/drivers/wlan.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/completion.h b/components/drivers/include/ipc/completion.h
index 087a9be813..e05bc80d11 100644
--- a/components/drivers/include/ipc/completion.h
+++ b/components/drivers/include/ipc/completion.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/dataqueue.h b/components/drivers/include/ipc/dataqueue.h
index 5dd94e55c0..d684fa4c79 100644
--- a/components/drivers/include/ipc/dataqueue.h
+++ b/components/drivers/include/ipc/dataqueue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/pipe.h b/components/drivers/include/ipc/pipe.h
index 5f64506011..cf2e098517 100644
--- a/components/drivers/include/ipc/pipe.h
+++ b/components/drivers/include/ipc/pipe.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/poll.h b/components/drivers/include/ipc/poll.h
index 1574215c77..a88e27301e 100644
--- a/components/drivers/include/ipc/poll.h
+++ b/components/drivers/include/ipc/poll.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/ringblk_buf.h b/components/drivers/include/ipc/ringblk_buf.h
index 7a3c930f73..8aa8aa1bfc 100644
--- a/components/drivers/include/ipc/ringblk_buf.h
+++ b/components/drivers/include/ipc/ringblk_buf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/ringbuffer.h b/components/drivers/include/ipc/ringbuffer.h
index fc2434cf4e..bafe72aa64 100644
--- a/components/drivers/include/ipc/ringbuffer.h
+++ b/components/drivers/include/ipc/ringbuffer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/waitqueue.h b/components/drivers/include/ipc/waitqueue.h
index 0727810696..8099971e03 100644
--- a/components/drivers/include/ipc/waitqueue.h
+++ b/components/drivers/include/ipc/waitqueue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/ipc/workqueue.h b/components/drivers/include/ipc/workqueue.h
index acb8307bf7..273d144a33 100644
--- a/components/drivers/include/ipc/workqueue.h
+++ b/components/drivers/include/ipc/workqueue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h
index 92b2211243..47a26238fa 100644
--- a/components/drivers/include/rtdevice.h
+++ b/components/drivers/include/rtdevice.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/completion.c b/components/drivers/ipc/completion.c
index 3f7644216b..c581d83d8c 100644
--- a/components/drivers/ipc/completion.c
+++ b/components/drivers/ipc/completion.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/dataqueue.c b/components/drivers/ipc/dataqueue.c
index 2222539cdf..ca0426b798 100644
--- a/components/drivers/ipc/dataqueue.c
+++ b/components/drivers/ipc/dataqueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/pipe.c b/components/drivers/ipc/pipe.c
index 1d8a41f00d..e02355d096 100644
--- a/components/drivers/ipc/pipe.c
+++ b/components/drivers/ipc/pipe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/ringblk_buf.c b/components/drivers/ipc/ringblk_buf.c
index 1c2f3057c8..cee28e12a2 100644
--- a/components/drivers/ipc/ringblk_buf.c
+++ b/components/drivers/ipc/ringblk_buf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/waitqueue.c b/components/drivers/ipc/waitqueue.c
index 25ebc71f68..7751a9406f 100644
--- a/components/drivers/ipc/waitqueue.c
+++ b/components/drivers/ipc/waitqueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/ipc/workqueue.c b/components/drivers/ipc/workqueue.c
index 9a09aae403..a77d745514 100644
--- a/components/drivers/ipc/workqueue.c
+++ b/components/drivers/ipc/workqueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c
index 0f96198cef..0f71e096f2 100644
--- a/components/drivers/misc/adc.c
+++ b/components/drivers/misc/adc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/dac.c b/components/drivers/misc/dac.c
index 788eac851b..78db9b1a55 100644
--- a/components/drivers/misc/dac.c
+++ b/components/drivers/misc/dac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/pin.c b/components/drivers/misc/pin.c
index a4ef166a7c..fd0b8e5f61 100644
--- a/components/drivers/misc/pin.c
+++ b/components/drivers/misc/pin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/pulse_encoder.c b/components/drivers/misc/pulse_encoder.c
index 39bf3de2f3..012513fad7 100644
--- a/components/drivers/misc/pulse_encoder.c
+++ b/components/drivers/misc/pulse_encoder.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/rt_dev_bus.c b/components/drivers/misc/rt_dev_bus.c
index d24b2b03b8..fd2fbb8e3e 100644
--- a/components/drivers/misc/rt_dev_bus.c
+++ b/components/drivers/misc/rt_dev_bus.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/rt_drv_pwm.c b/components/drivers/misc/rt_drv_pwm.c
index 59f29c8c59..af87a5b60e 100644
--- a/components/drivers/misc/rt_drv_pwm.c
+++ b/components/drivers/misc/rt_drv_pwm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/rt_inputcapture.c b/components/drivers/misc/rt_inputcapture.c
index 067aeef2df..9017da89bb 100644
--- a/components/drivers/misc/rt_inputcapture.c
+++ b/components/drivers/misc/rt_inputcapture.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/rt_null.c b/components/drivers/misc/rt_null.c
index bc329ab50e..4cbc6e8e94 100644
--- a/components/drivers/misc/rt_null.c
+++ b/components/drivers/misc/rt_null.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2020, Shanghai Real-Thread Electronic Technology Co.,Ltd
+ * Copyright (c) 2011-2023, Shanghai Real-Thread Electronic Technology Co.,Ltd
*
* Change Logs:
* Date Author Notes
diff --git a/components/drivers/misc/rt_random.c b/components/drivers/misc/rt_random.c
index 9b52918ae9..34d39943fa 100644
--- a/components/drivers/misc/rt_random.c
+++ b/components/drivers/misc/rt_random.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2020, Shanghai Real-Thread Electronic Technology Co.,Ltd
+ * Copyright (c) 2011-2023, Shanghai Real-Thread Electronic Technology Co.,Ltd
*
* Change Logs:
* Date Author Notes
diff --git a/components/drivers/misc/rt_zero.c b/components/drivers/misc/rt_zero.c
index 08df5cb3aa..d46cc264eb 100644
--- a/components/drivers/misc/rt_zero.c
+++ b/components/drivers/misc/rt_zero.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2020, Shanghai Real-Thread Electronic Technology Co.,Ltd
+ * Copyright (c) 2011-2023, Shanghai Real-Thread Electronic Technology Co.,Ltd
*
* Change Logs:
* Date Author Notes
diff --git a/components/drivers/mtd/mtd_nand.c b/components/drivers/mtd/mtd_nand.c
index 9c3397dfdd..65402194c4 100644
--- a/components/drivers/mtd/mtd_nand.c
+++ b/components/drivers/mtd/mtd_nand.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/phy/phy.c b/components/drivers/phy/phy.c
index 317b24ebfc..363b483c58 100644
--- a/components/drivers/phy/phy.c
+++ b/components/drivers/phy/phy.c
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/pm/lptimer.c b/components/drivers/pm/lptimer.c
index 144270cf7f..611624bd5c 100644
--- a/components/drivers/pm/lptimer.c
+++ b/components/drivers/pm/lptimer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c
index f70333090c..61f5337846 100644
--- a/components/drivers/pm/pm.c
+++ b/components/drivers/pm/pm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/rtc/alarm.c b/components/drivers/rtc/alarm.c
index 0f2d816fec..6852cf0a17 100644
--- a/components/drivers/rtc/alarm.c
+++ b/components/drivers/rtc/alarm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c
index c0406d9170..b421fcbef8 100644
--- a/components/drivers/rtc/rtc.c
+++ b/components/drivers/rtc/rtc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/rtc/soft_rtc.c b/components/drivers/rtc/soft_rtc.c
index 02b5cbec53..d80e21372f 100644
--- a/components/drivers/rtc/soft_rtc.c
+++ b/components/drivers/rtc/soft_rtc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sdio/block_dev.c b/components/drivers/sdio/block_dev.c
index 0025e7f08a..1cdcec22b0 100644
--- a/components/drivers/sdio/block_dev.c
+++ b/components/drivers/sdio/block_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sdio/gpt.c b/components/drivers/sdio/gpt.c
index 19bc1ad453..e8368ce529 100644
--- a/components/drivers/sdio/gpt.c
+++ b/components/drivers/sdio/gpt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -178,14 +178,14 @@ static gpt_header *alloc_read_gpt_header(struct rt_mmcsd_card *card, size_t lba)
return RT_NULL;
}
gpt = (gpt_header *)buf;
-
+
return gpt;
}
static int is_gpt_valid(struct rt_mmcsd_card *card, size_t lba, gpt_header **gpt, gpt_entry **ptes)
{
size_t lastlba;
-
+
if (!ptes)
{
return 0;
@@ -395,7 +395,7 @@ static void compare_gpts(gpt_header *pgpt, gpt_header *agpt, size_t lastlba)
if (error_found)
{
- LOG_I("GPT: Use GNU Parted to correct GPT errors.");
+ LOG_I("GPT: Use GNU Parted to correct GPT errors.");
}
return;
}
@@ -540,7 +540,7 @@ int gpt_get_partition_param(struct rt_mmcsd_card *card, struct dfs_partition *pa
if ((part->size >> 11) == 0)
{
- rt_kprintf("%d%s", part->size >> 1, "KB\n"); /* KB */
+ rt_kprintf("%d%s", part->size >> 1, "KB\n"); /* KB */
}
else
{
diff --git a/components/drivers/sdio/mmc.c b/components/drivers/sdio/mmc.c
index e1dc3cf957..567c1a4fa5 100644
--- a/components/drivers/sdio/mmc.c
+++ b/components/drivers/sdio/mmc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sdio/mmcsd_core.c b/components/drivers/sdio/mmcsd_core.c
index f896901804..77570268c1 100644
--- a/components/drivers/sdio/mmcsd_core.c
+++ b/components/drivers/sdio/mmcsd_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sdio/sd.c b/components/drivers/sdio/sd.c
index de816f1e80..626dcadba0 100644
--- a/components/drivers/sdio/sd.c
+++ b/components/drivers/sdio/sd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c
index 5c04277549..d1705d43c3 100644
--- a/components/drivers/sdio/sdio.c
+++ b/components/drivers/sdio/sdio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sensor/sensor.c b/components/drivers/sensor/sensor.c
index 8835c10bac..e100cc27c3 100644
--- a/components/drivers/sensor/sensor.c
+++ b/components/drivers/sensor/sensor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/sensor/sensor_cmd.c b/components/drivers/sensor/sensor_cmd.c
index ff1bb0f7d0..4b094fb18d 100644
--- a/components/drivers/sensor/sensor_cmd.c
+++ b/components/drivers/sensor/sensor_cmd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index 0617652c04..34d91f9a21 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c
index 60d7a149fd..df16557cee 100644
--- a/components/drivers/serial/serial_v2.c
+++ b/components/drivers/serial/serial_v2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/enc28j60.c b/components/drivers/spi/enc28j60.c
index 990e9f8acf..fe0bf46fd6 100644
--- a/components/drivers/spi/enc28j60.c
+++ b/components/drivers/spi/enc28j60.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/enc28j60.h b/components/drivers/spi/enc28j60.h
index 471b71ec2d..017877adcd 100644
--- a/components/drivers/spi/enc28j60.h
+++ b/components/drivers/spi/enc28j60.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/qspi_core.c b/components/drivers/spi/qspi_core.c
index 94cb7bdb7a..010b427f5f 100644
--- a/components/drivers/spi/qspi_core.c
+++ b/components/drivers/spi/qspi_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi-bit-ops.h b/components/drivers/spi/spi-bit-ops.h
index ecbea1ad4c..b536b3d81e 100644
--- a/components/drivers/spi/spi-bit-ops.h
+++ b/components/drivers/spi/spi-bit-ops.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_dev.c b/components/drivers/spi/spi_dev.c
index 2d63fbcfbb..963b70c23b 100644
--- a/components/drivers/spi/spi_dev.c
+++ b/components/drivers/spi/spi_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_flash.h b/components/drivers/spi/spi_flash.h
index 9083a40a1c..2651c76fa4 100644
--- a/components/drivers/spi/spi_flash.h
+++ b/components/drivers/spi/spi_flash.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_flash_sfud.c b/components/drivers/spi/spi_flash_sfud.c
index 83f8537c72..761c9ccc0d 100644
--- a/components/drivers/spi/spi_flash_sfud.c
+++ b/components/drivers/spi/spi_flash_sfud.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_flash_sfud.h b/components/drivers/spi/spi_flash_sfud.h
index 0d5a751d0c..6099c9823b 100644
--- a/components/drivers/spi/spi_flash_sfud.h
+++ b/components/drivers/spi/spi_flash_sfud.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_msd.c b/components/drivers/spi/spi_msd.c
index 30f82601af..0ca1bdfbb5 100644
--- a/components/drivers/spi/spi_msd.c
+++ b/components/drivers/spi/spi_msd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_msd.h b/components/drivers/spi/spi_msd.h
index e9febca781..6b16d3e198 100644
--- a/components/drivers/spi/spi_msd.h
+++ b/components/drivers/spi/spi_msd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_wifi_rw009.c b/components/drivers/spi/spi_wifi_rw009.c
index 6cbe8dbaa9..44f70e2b77 100644
--- a/components/drivers/spi/spi_wifi_rw009.c
+++ b/components/drivers/spi/spi_wifi_rw009.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ * COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_wifi_rw009.h b/components/drivers/spi/spi_wifi_rw009.h
index a0d8ec437d..9bba2694af 100644
--- a/components/drivers/spi/spi_wifi_rw009.h
+++ b/components/drivers/spi/spi_wifi_rw009.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ * COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/touch/touch.c b/components/drivers/touch/touch.c
index daec7e0286..713a6bb7b2 100644
--- a/components/drivers/touch/touch.c
+++ b/components/drivers/touch/touch.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/console.c b/components/drivers/tty/console.c
index cb7b9049f4..12e1ad629b 100644
--- a/components/drivers/tty/console.c
+++ b/components/drivers/tty/console.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/include/console.h b/components/drivers/tty/include/console.h
index 779d816d4b..653b31fade 100644
--- a/components/drivers/tty/include/console.h
+++ b/components/drivers/tty/include/console.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/include/tty.h b/components/drivers/tty/include/tty.h
index 6a966262a9..e82dfafbea 100644
--- a/components/drivers/tty/include/tty.h
+++ b/components/drivers/tty/include/tty.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/include/tty_ldisc.h b/components/drivers/tty/include/tty_ldisc.h
index 619bca6dec..9b95fd3591 100644
--- a/components/drivers/tty/include/tty_ldisc.h
+++ b/components/drivers/tty/include/tty_ldisc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/n_tty.c b/components/drivers/tty/n_tty.c
index 00448dd636..d0fd9f8f65 100644
--- a/components/drivers/tty/n_tty.c
+++ b/components/drivers/tty/n_tty.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/pty.c b/components/drivers/tty/pty.c
index 0db50360bd..acb217ecbc 100644
--- a/components/drivers/tty/pty.c
+++ b/components/drivers/tty/pty.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/tty.c b/components/drivers/tty/tty.c
index 1573b13a7b..40e22ad153 100644
--- a/components/drivers/tty/tty.c
+++ b/components/drivers/tty/tty.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/tty/tty_ioctl.c b/components/drivers/tty/tty_ioctl.c
index f7e0d495da..e1982ee3ea 100644
--- a/components/drivers/tty/tty_ioctl.c
+++ b/components/drivers/tty/tty_ioctl.c
@@ -85,8 +85,8 @@ int n_tty_ioctl_extend(struct tty_struct *tty, int cmd, void *args)
if (tio == RT_NULL)
{
return -RT_EINVAL;
- }
-
+ }
+
rt_memcpy(tio, &real_tty->init_termios, sizeof(real_tty->init_termios));
return ret;
}
diff --git a/components/drivers/tty/tty_ldisc.c b/components/drivers/tty/tty_ldisc.c
index f736812414..2f13c60d14 100644
--- a/components/drivers/tty/tty_ldisc.c
+++ b/components/drivers/tty/tty_ldisc.c
@@ -106,7 +106,7 @@ void tty_ldisc_kill(struct tty_struct *tty)
{
if (!tty->ldisc)
{
- return;
+ return;
}
/*
diff --git a/components/drivers/usb/usbdevice/class/audio_mic.c b/components/drivers/usb/usbdevice/class/audio_mic.c
index afedf2ef2d..9612e6b93f 100644
--- a/components/drivers/usb/usbdevice/class/audio_mic.c
+++ b/components/drivers/usb/usbdevice/class/audio_mic.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/audio_speaker.c b/components/drivers/usb/usbdevice/class/audio_speaker.c
index 67da8105e4..6560990c8e 100644
--- a/components/drivers/usb/usbdevice/class/audio_speaker.c
+++ b/components/drivers/usb/usbdevice/class/audio_speaker.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/cdc.h b/components/drivers/usb/usbdevice/class/cdc.h
index a4616a956b..6b79876734 100644
--- a/components/drivers/usb/usbdevice/class/cdc.h
+++ b/components/drivers/usb/usbdevice/class/cdc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c
index c7097f135c..416e901bcf 100644
--- a/components/drivers/usb/usbdevice/class/cdc_vcom.c
+++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/ecm.c b/components/drivers/usb/usbdevice/class/ecm.c
index f821a9969e..d856a1e332 100644
--- a/components/drivers/usb/usbdevice/class/ecm.c
+++ b/components/drivers/usb/usbdevice/class/ecm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/hid.h b/components/drivers/usb/usbdevice/class/hid.h
index 2b6a4ad90a..99da810ce8 100644
--- a/components/drivers/usb/usbdevice/class/hid.h
+++ b/components/drivers/usb/usbdevice/class/hid.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/mstorage.c b/components/drivers/usb/usbdevice/class/mstorage.c
index 96a1299890..3e7d046166 100644
--- a/components/drivers/usb/usbdevice/class/mstorage.c
+++ b/components/drivers/usb/usbdevice/class/mstorage.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/mstorage.h b/components/drivers/usb/usbdevice/class/mstorage.h
index 6c81809ef2..812be4c190 100644
--- a/components/drivers/usb/usbdevice/class/mstorage.h
+++ b/components/drivers/usb/usbdevice/class/mstorage.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/ndis.h b/components/drivers/usb/usbdevice/class/ndis.h
index b83f3c78ec..40a1ffb64e 100644
--- a/components/drivers/usb/usbdevice/class/ndis.h
+++ b/components/drivers/usb/usbdevice/class/ndis.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/rndis.c b/components/drivers/usb/usbdevice/class/rndis.c
index 449957db2e..cd57933daa 100644
--- a/components/drivers/usb/usbdevice/class/rndis.c
+++ b/components/drivers/usb/usbdevice/class/rndis.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/rndis.h b/components/drivers/usb/usbdevice/class/rndis.h
index f25ae4931c..c862b82c01 100644
--- a/components/drivers/usb/usbdevice/class/rndis.h
+++ b/components/drivers/usb/usbdevice/class/rndis.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/winusb.c b/components/drivers/usb/usbdevice/class/winusb.c
index cf72ce8d84..906ba44169 100644
--- a/components/drivers/usb/usbdevice/class/winusb.c
+++ b/components/drivers/usb/usbdevice/class/winusb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/class/winusb.h b/components/drivers/usb/usbdevice/class/winusb.h
index 43fec34b6a..06325a0b03 100644
--- a/components/drivers/usb/usbdevice/class/winusb.h
+++ b/components/drivers/usb/usbdevice/class/winusb.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbdevice/core/usbdevice_core.c b/components/drivers/usb/usbdevice/core/usbdevice_core.c
index 097c88dcec..28e673d2a8 100644
--- a/components/drivers/usb/usbdevice/core/usbdevice_core.c
+++ b/components/drivers/usb/usbdevice/core/usbdevice_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/adk.c b/components/drivers/usb/usbhost/class/adk.c
index 3475214789..280894cdf2 100644
--- a/components/drivers/usb/usbhost/class/adk.c
+++ b/components/drivers/usb/usbhost/class/adk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/adk.h b/components/drivers/usb/usbhost/class/adk.h
index aebe7de705..67c3392d7a 100644
--- a/components/drivers/usb/usbhost/class/adk.h
+++ b/components/drivers/usb/usbhost/class/adk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/hid.c b/components/drivers/usb/usbhost/class/hid.c
index 665f8e3790..805bfea037 100644
--- a/components/drivers/usb/usbhost/class/hid.c
+++ b/components/drivers/usb/usbhost/class/hid.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2022, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/hid.h b/components/drivers/usb/usbhost/class/hid.h
index 19b2b09855..c7e88b66b8 100644
--- a/components/drivers/usb/usbhost/class/hid.h
+++ b/components/drivers/usb/usbhost/class/hid.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/mass.c b/components/drivers/usb/usbhost/class/mass.c
index abd89a5efc..dcaa373ac2 100644
--- a/components/drivers/usb/usbhost/class/mass.c
+++ b/components/drivers/usb/usbhost/class/mass.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/mass.h b/components/drivers/usb/usbhost/class/mass.h
index 2578fb54c7..6d54dd66a7 100644
--- a/components/drivers/usb/usbhost/class/mass.h
+++ b/components/drivers/usb/usbhost/class/mass.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/udisk.c b/components/drivers/usb/usbhost/class/udisk.c
index ee0129b487..1796450348 100644
--- a/components/drivers/usb/usbhost/class/udisk.c
+++ b/components/drivers/usb/usbhost/class/udisk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/ukbd.c b/components/drivers/usb/usbhost/class/ukbd.c
index 313e62e0f3..2d2a3ccffe 100644
--- a/components/drivers/usb/usbhost/class/ukbd.c
+++ b/components/drivers/usb/usbhost/class/ukbd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/class/umouse.c b/components/drivers/usb/usbhost/class/umouse.c
index fdf69c8f16..46b1b9b107 100644
--- a/components/drivers/usb/usbhost/class/umouse.c
+++ b/components/drivers/usb/usbhost/class/umouse.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/core/driver.c b/components/drivers/usb/usbhost/core/driver.c
index 73360d307a..28a79dfa7f 100644
--- a/components/drivers/usb/usbhost/core/driver.c
+++ b/components/drivers/usb/usbhost/core/driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/core/hub.c b/components/drivers/usb/usbhost/core/hub.c
index 21583e016b..314ec627a1 100644
--- a/components/drivers/usb/usbhost/core/hub.c
+++ b/components/drivers/usb/usbhost/core/hub.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/core/usbhost.c b/components/drivers/usb/usbhost/core/usbhost.c
index 455c30cc70..a4cdc12e5e 100644
--- a/components/drivers/usb/usbhost/core/usbhost.c
+++ b/components/drivers/usb/usbhost/core/usbhost.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/usb/usbhost/core/usbhost_core.c b/components/drivers/usb/usbhost/core/usbhost_core.c
index cef1600433..bf67897c40 100644
--- a/components/drivers/usb/usbhost/core/usbhost_core.c
+++ b/components/drivers/usb/usbhost/core/usbhost_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio.c b/components/drivers/virtio/virtio.c
index 338b03ca94..3de4fccc7e 100644
--- a/components/drivers/virtio/virtio.c
+++ b/components/drivers/virtio/virtio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio.h b/components/drivers/virtio/virtio.h
index 63e9a73c27..3807585d82 100644
--- a/components/drivers/virtio/virtio.h
+++ b/components/drivers/virtio/virtio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_blk.c b/components/drivers/virtio/virtio_blk.c
index 41e03e39d4..9e047aef92 100644
--- a/components/drivers/virtio/virtio_blk.c
+++ b/components/drivers/virtio/virtio_blk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_blk.h b/components/drivers/virtio/virtio_blk.h
index 548bcee4c8..21ac7a1c85 100644
--- a/components/drivers/virtio/virtio_blk.h
+++ b/components/drivers/virtio/virtio_blk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_console.c b/components/drivers/virtio/virtio_console.c
index ac6c821853..7ad171cec3 100644
--- a/components/drivers/virtio/virtio_console.c
+++ b/components/drivers/virtio/virtio_console.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_console.h b/components/drivers/virtio/virtio_console.h
index f7d8d97e1d..542a187e7c 100644
--- a/components/drivers/virtio/virtio_console.h
+++ b/components/drivers/virtio/virtio_console.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_gpu.c b/components/drivers/virtio/virtio_gpu.c
index a9836d9b7a..64e5611942 100644
--- a/components/drivers/virtio/virtio_gpu.c
+++ b/components/drivers/virtio/virtio_gpu.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_gpu.h b/components/drivers/virtio/virtio_gpu.h
index 0c49ecbd2f..6f894ebacf 100644
--- a/components/drivers/virtio/virtio_gpu.h
+++ b/components/drivers/virtio/virtio_gpu.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_input.c b/components/drivers/virtio/virtio_input.c
index 41ecd6bb83..564b32bcaf 100644
--- a/components/drivers/virtio/virtio_input.c
+++ b/components/drivers/virtio/virtio_input.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_input.h b/components/drivers/virtio/virtio_input.h
index 367d0a5d6d..700088e19e 100644
--- a/components/drivers/virtio/virtio_input.h
+++ b/components/drivers/virtio/virtio_input.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_input_event_codes.h b/components/drivers/virtio/virtio_input_event_codes.h
index b84723374e..3e8d6d00f9 100644
--- a/components/drivers/virtio/virtio_input_event_codes.h
+++ b/components/drivers/virtio/virtio_input_event_codes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_mmio.h b/components/drivers/virtio/virtio_mmio.h
index 98b92e460c..bb5bc79b95 100644
--- a/components/drivers/virtio/virtio_mmio.h
+++ b/components/drivers/virtio/virtio_mmio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_net.c b/components/drivers/virtio/virtio_net.c
index 9b44cf6bb2..553f532b86 100644
--- a/components/drivers/virtio/virtio_net.c
+++ b/components/drivers/virtio/virtio_net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_net.h b/components/drivers/virtio/virtio_net.h
index d00c3edb90..4bc57cb05b 100644
--- a/components/drivers/virtio/virtio_net.h
+++ b/components/drivers/virtio/virtio_net.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/virtio/virtio_queue.h b/components/drivers/virtio/virtio_queue.h
index 1e416af131..b2b0bdcd32 100644
--- a/components/drivers/virtio/virtio_queue.h
+++ b/components/drivers/virtio/virtio_queue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/watchdog/watchdog.c b/components/drivers/watchdog/watchdog.c
index 48c58ed1f2..6d8238b129 100644
--- a/components/drivers/watchdog/watchdog.c
+++ b/components/drivers/watchdog/watchdog.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ * COPYRIGHT (C) 2011-2023, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_cfg.c b/components/drivers/wlan/wlan_cfg.c
index 24a37e0b72..ac49877c8d 100644
--- a/components/drivers/wlan/wlan_cfg.c
+++ b/components/drivers/wlan/wlan_cfg.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_cfg.h b/components/drivers/wlan/wlan_cfg.h
index 4d0e73729d..308850f74b 100644
--- a/components/drivers/wlan/wlan_cfg.h
+++ b/components/drivers/wlan/wlan_cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_cmd.c b/components/drivers/wlan/wlan_cmd.c
index 9089b3b124..fe5910b242 100644
--- a/components/drivers/wlan/wlan_cmd.c
+++ b/components/drivers/wlan/wlan_cmd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_dev.c b/components/drivers/wlan/wlan_dev.c
index 8e3af17e57..167c4ccb8d 100644
--- a/components/drivers/wlan/wlan_dev.c
+++ b/components/drivers/wlan/wlan_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_dev.h b/components/drivers/wlan/wlan_dev.h
index d89dc60ef3..0a6c9b3d0d 100644
--- a/components/drivers/wlan/wlan_dev.h
+++ b/components/drivers/wlan/wlan_dev.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_lwip.c b/components/drivers/wlan/wlan_lwip.c
index a9f5334021..08cf150d5f 100644
--- a/components/drivers/wlan/wlan_lwip.c
+++ b/components/drivers/wlan/wlan_lwip.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_mgnt.c b/components/drivers/wlan/wlan_mgnt.c
index 27bd5623c8..85064cc271 100644
--- a/components/drivers/wlan/wlan_mgnt.c
+++ b/components/drivers/wlan/wlan_mgnt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_mgnt.h b/components/drivers/wlan/wlan_mgnt.h
index f3855b0976..4e98463a3c 100644
--- a/components/drivers/wlan/wlan_mgnt.h
+++ b/components/drivers/wlan/wlan_mgnt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_prot.c b/components/drivers/wlan/wlan_prot.c
index 5c32a3fbda..dd9b320655 100644
--- a/components/drivers/wlan/wlan_prot.c
+++ b/components/drivers/wlan/wlan_prot.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_prot.h b/components/drivers/wlan/wlan_prot.h
index 5f8930f452..16515d68be 100644
--- a/components/drivers/wlan/wlan_prot.h
+++ b/components/drivers/wlan/wlan_prot.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_workqueue.c b/components/drivers/wlan/wlan_workqueue.c
index 76b95e66b0..4c966b1175 100644
--- a/components/drivers/wlan/wlan_workqueue.c
+++ b/components/drivers/wlan/wlan_workqueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/wlan/wlan_workqueue.h b/components/drivers/wlan/wlan_workqueue.h
index 7a68a27e03..af12b1d196 100644
--- a/components/drivers/wlan/wlan_workqueue.h
+++ b/components/drivers/wlan/wlan_workqueue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
+ * Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/libcpu/mips/gs232/ls1c.h b/libcpu/mips/gs232/ls1c.h
index 6b8e3fc512..a104cc9674 100644
--- a/libcpu/mips/gs232/ls1c.h
+++ b/libcpu/mips/gs232/ls1c.h
@@ -16,8 +16,7 @@
#define LS1C_ACPI_IRQ 0
#define LS1C_HPET_IRQ 1
-//#define LS1C_UART0_IRQ 3 // linux����3��v1.4�汾��1c�ֲ�����2�������Σ���ȷ��
-#define LS1C_UART1_IRQ 4
+//#define LS1C_UART0_IRQ 3 // linux使用3,v1.4版本之前1c分配有问题,建议使用2,以确保正确
#define LS1C_UART2_IRQ 5
#define LS1C_CAN0_IRQ 6
#define LS1C_CAN1_IRQ 7
@@ -69,11 +68,11 @@
#define LS1C_LAST_IRQ 159
#define LS1C_INTREG_BASE 0xbfd01040
-// ��о1c���жϷ�Ϊ���飬ÿ��32��
+// 将1c的中断分为五组,每组32个
#define LS1C_NR_IRQS (32*5)
-// GPIO��ź��жϺ�֮��Ļ���ת��
+// GPIO引脚到中断号之间的转换
#define LS1C_GPIO_TO_IRQ(GPIOn) (LS1C_GPIO_FIRST_IRQ + (GPIOn))
#define LS1C_IRQ_TO_GPIO(IRQn) ((IRQn) - LS1C_GPIO_FIRST_IRQ)