From 4c4d62ff9385cbd3842abee08b223b7a2a27eef3 Mon Sep 17 00:00:00 2001 From: Eren Terzioglu Date: Wed, 3 Jan 2024 11:39:52 +0300 Subject: [PATCH] Rename espressif folder as common/espressif --- .../src/{ => common}/espressif/Bootloader.mk | 2 +- arch/risc-v/src/common/espressif/Make.defs | 79 +++++++++++++++++++ arch/risc-v/src/{ => common}/espressif/chip.h | 8 +- .../{ => common}/espressif/esp_allocateheap.c | 2 +- .../src/{ => common}/espressif/esp_config.h | 8 +- .../src/{ => common}/espressif/esp_gpio.c | 2 +- .../src/{ => common}/espressif/esp_gpio.h | 8 +- .../src/{ => common}/espressif/esp_head.S | 2 +- .../src/{ => common}/espressif/esp_hr_timer.c | 2 +- .../src/{ => common}/espressif/esp_hr_timer.h | 8 +- .../src/{ => common}/espressif/esp_idle.c | 2 +- .../src/{ => common}/espressif/esp_irq.c | 2 +- .../src/{ => common}/espressif/esp_irq.h | 8 +- .../src/{ => common}/espressif/esp_ledc.c | 2 +- .../src/{ => common}/espressif/esp_ledc.h | 8 +- .../{ => common}/espressif/esp_libc_stubs.c | 2 +- .../{ => common}/espressif/esp_libc_stubs.h | 8 +- .../src/{ => common}/espressif/esp_lowputc.c | 2 +- .../src/{ => common}/espressif/esp_lowputc.h | 8 +- .../{ => common}/espressif/esp_memorymap.h | 8 +- .../src/{ => common}/espressif/esp_oneshot.c | 2 +- .../src/{ => common}/espressif/esp_oneshot.h | 8 +- .../src/{ => common}/espressif/esp_random.c | 2 +- .../src/{ => common}/espressif/esp_rtc.c | 2 +- .../src/{ => common}/espressif/esp_rtc.h | 8 +- .../src/{ => common}/espressif/esp_serial.c | 2 +- .../src/{ => common}/espressif/esp_start.c | 2 +- .../src/{ => common}/espressif/esp_start.h | 8 +- .../{ => common}/espressif/esp_systemreset.c | 2 +- .../{ => common}/espressif/esp_systemreset.h | 8 +- .../src/{ => common}/espressif/esp_tickless.c | 2 +- .../src/{ => common}/espressif/esp_tickless.h | 8 +- .../src/{ => common}/espressif/esp_timer.c | 2 +- .../src/{ => common}/espressif/esp_timer.h | 8 +- .../src/{ => common}/espressif/esp_timerisr.c | 2 +- .../{ => common}/espressif/esp_usbserial.c | 2 +- .../{ => common}/espressif/esp_usbserial.h | 8 +- .../src/{ => common}/espressif/esp_vectors.S | 2 +- .../src/{ => common}/espressif/esp_wdt.c | 2 +- .../src/{ => common}/espressif/esp_wdt.h | 8 +- arch/risc-v/src/espressif/Make.defs | 58 +------------- .../espressif/common/src/esp_board_ledc.c | 2 +- .../esp32c3-generic/src/esp32c3_bringup.c | 10 +-- .../esp32c3-generic/src/esp32c3_buttons.c | 2 +- .../esp32c3-generic/src/esp32c3_gpio.c | 2 +- .../esp32c3-generic/src/esp32c3_reset.c | 2 +- .../esp32c6-generic/src/esp32c6_bringup.c | 10 +-- .../esp32c6-generic/src/esp32c6_buttons.c | 2 +- .../esp32c6-generic/src/esp32c6_gpio.c | 2 +- .../esp32c6-generic/src/esp32c6_reset.c | 2 +- .../esp32h2-generic/src/esp32h2_bringup.c | 10 +-- .../esp32h2-generic/src/esp32h2_buttons.c | 2 +- .../esp32h2-generic/src/esp32h2_gpio.c | 2 +- .../esp32h2-generic/src/esp32h2_reset.c | 2 +- 54 files changed, 195 insertions(+), 172 deletions(-) rename arch/risc-v/src/{ => common}/espressif/Bootloader.mk (99%) create mode 100644 arch/risc-v/src/common/espressif/Make.defs rename arch/risc-v/src/{ => common}/espressif/chip.h (88%) rename arch/risc-v/src/{ => common}/espressif/esp_allocateheap.c (98%) rename arch/risc-v/src/{ => common}/espressif/esp_config.h (91%) rename arch/risc-v/src/{ => common}/espressif/esp_gpio.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_gpio.h (97%) rename arch/risc-v/src/{ => common}/espressif/esp_head.S (98%) rename arch/risc-v/src/{ => common}/espressif/esp_hr_timer.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_hr_timer.h (96%) rename arch/risc-v/src/{ => common}/espressif/esp_idle.c (98%) rename arch/risc-v/src/{ => common}/espressif/esp_irq.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_irq.h (96%) rename arch/risc-v/src/{ => common}/espressif/esp_ledc.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_ledc.h (90%) rename arch/risc-v/src/{ => common}/espressif/esp_libc_stubs.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_libc_stubs.h (88%) rename arch/risc-v/src/{ => common}/espressif/esp_lowputc.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_lowputc.h (96%) rename arch/risc-v/src/{ => common}/espressif/esp_memorymap.h (87%) rename arch/risc-v/src/{ => common}/espressif/esp_oneshot.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_oneshot.h (88%) rename arch/risc-v/src/{ => common}/espressif/esp_random.c (98%) rename arch/risc-v/src/{ => common}/espressif/esp_rtc.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_rtc.h (89%) rename arch/risc-v/src/{ => common}/espressif/esp_serial.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_start.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_start.h (88%) rename arch/risc-v/src/{ => common}/espressif/esp_systemreset.c (98%) rename arch/risc-v/src/{ => common}/espressif/esp_systemreset.h (93%) rename arch/risc-v/src/{ => common}/espressif/esp_tickless.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_tickless.h (90%) rename arch/risc-v/src/{ => common}/espressif/esp_timer.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_timer.h (89%) rename arch/risc-v/src/{ => common}/espressif/esp_timerisr.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_usbserial.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_usbserial.h (89%) rename arch/risc-v/src/{ => common}/espressif/esp_vectors.S (97%) rename arch/risc-v/src/{ => common}/espressif/esp_wdt.c (99%) rename arch/risc-v/src/{ => common}/espressif/esp_wdt.h (89%) diff --git a/arch/risc-v/src/espressif/Bootloader.mk b/arch/risc-v/src/common/espressif/Bootloader.mk similarity index 99% rename from arch/risc-v/src/espressif/Bootloader.mk rename to arch/risc-v/src/common/espressif/Bootloader.mk index 82b3bff914..25d9f15cf8 100644 --- a/arch/risc-v/src/espressif/Bootloader.mk +++ b/arch/risc-v/src/common/espressif/Bootloader.mk @@ -1,5 +1,5 @@ ############################################################################ -# arch/risc-v/src/espressif/Bootloader.mk +# arch/risc-v/src/common/espressif/Bootloader.mk # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/common/espressif/Make.defs b/arch/risc-v/src/common/espressif/Make.defs new file mode 100644 index 0000000000..78e2e671ab --- /dev/null +++ b/arch/risc-v/src/common/espressif/Make.defs @@ -0,0 +1,79 @@ +############################################################################ +# arch/risc-v/src/common/espressif/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +# The start-up, "head", file. May be either a .S or a .c file. + +HEAD_ASRC = esp_head.S + +# Skip common RISC-V vector table in favor of Espressif's custom vector +# table. + +CMN_ASRCS := $(filter-out riscv_vectors.S,$(CMN_ASRCS)) +CHIP_ASRCS = esp_vectors.S + +# Required Espressif chip's files (arch/risc-v/src/common/espressif) + +CHIP_CSRCS = esp_allocateheap.c esp_start.c esp_idle.c +CHIP_CSRCS += esp_irq.c esp_gpio.c esp_libc_stubs.c +CHIP_CSRCS += esp_lowputc.c esp_serial.c +CHIP_CSRCS += esp_systemreset.c + +ifeq ($(CONFIG_SCHED_TICKLESS),y) + CHIP_CSRCS += esp_tickless.c +else + CHIP_CSRCS += esp_timerisr.c +endif + +ifeq ($(CONFIG_WATCHDOG),y) + CHIP_CSRCS += esp_wdt.c +endif + +ifneq ($(CONFIG_DEV_RANDOM)$(CONFIG_DEV_URANDOM_ARCH),) + CHIP_CSRCS += esp_random.c +endif + +ifeq ($(CONFIG_TIMER),y) + CHIP_CSRCS += esp_timer.c +endif + +ifeq ($(CONFIG_ONESHOT),y) + CHIP_CSRCS += esp_oneshot.c +endif + +ifeq ($(CONFIG_RTC),y) + CHIP_CSRCS += esp_rtc.c +endif + +ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y) + CHIP_CSRCS += esp_hr_timer.c +endif + +ifeq ($(CONFIG_ESPRESSIF_LEDC),y) + CHIP_CSRCS += esp_ledc.c +endif + +ifeq ($(CONFIG_ESPRESSIF_USBSERIAL),y) + CHIP_CSRCS += esp_usbserial.c +endif + +include common$(DELIM)espressif$(DELIM)Bootloader.mk + +INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif +VPATH += common$(DELIM)espressif diff --git a/arch/risc-v/src/espressif/chip.h b/arch/risc-v/src/common/espressif/chip.h similarity index 88% rename from arch/risc-v/src/espressif/chip.h rename to arch/risc-v/src/common/espressif/chip.h index 67b4071ed5..6c16bb48dc 100644 --- a/arch/risc-v/src/espressif/chip.h +++ b/arch/risc-v/src/common/espressif/chip.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/chip.h + * arch/risc-v/src/common/espressif/chip.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H -#define __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H /**************************************************************************** * Included Files @@ -37,4 +37,4 @@ #define EXCEPTION_SECTION .iram1 -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H */ diff --git a/arch/risc-v/src/espressif/esp_allocateheap.c b/arch/risc-v/src/common/espressif/esp_allocateheap.c similarity index 98% rename from arch/risc-v/src/espressif/esp_allocateheap.c rename to arch/risc-v/src/common/espressif/esp_allocateheap.c index c8383a9b1b..1022d77d7d 100644 --- a/arch/risc-v/src/espressif/esp_allocateheap.c +++ b/arch/risc-v/src/common/espressif/esp_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_allocateheap.c + * arch/risc-v/src/common/espressif/esp_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_config.h b/arch/risc-v/src/common/espressif/esp_config.h similarity index 91% rename from arch/risc-v/src/espressif/esp_config.h rename to arch/risc-v/src/common/espressif/esp_config.h index ac113f83c3..7a7477dfc4 100644 --- a/arch/risc-v/src/espressif/esp_config.h +++ b/arch/risc-v/src/common/espressif/esp_config.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_config.h + * arch/risc-v/src/common/espressif/esp_config.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H /**************************************************************************** * Included Files @@ -68,4 +68,4 @@ # define HAVE_UART_DEVICE 1 #endif -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H */ diff --git a/arch/risc-v/src/espressif/esp_gpio.c b/arch/risc-v/src/common/espressif/esp_gpio.c similarity index 99% rename from arch/risc-v/src/espressif/esp_gpio.c rename to arch/risc-v/src/common/espressif/esp_gpio.c index beb0526a93..be39e5b1d9 100644 --- a/arch/risc-v/src/espressif/esp_gpio.c +++ b/arch/risc-v/src/common/espressif/esp_gpio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_gpio.c + * arch/risc-v/src/common/espressif/esp_gpio.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_gpio.h b/arch/risc-v/src/common/espressif/esp_gpio.h similarity index 97% rename from arch/risc-v/src/espressif/esp_gpio.h rename to arch/risc-v/src/common/espressif/esp_gpio.h index cac9aae8ca..05152584e7 100644 --- a/arch/risc-v/src/espressif/esp_gpio.h +++ b/arch/risc-v/src/common/espressif/esp_gpio.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_gpio.h + * arch/risc-v/src/common/espressif/esp_gpio.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H /**************************************************************************** * Included Files @@ -298,4 +298,4 @@ void esp_gpioirqdisable(int irq); #undef EXTERN #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H */ diff --git a/arch/risc-v/src/espressif/esp_head.S b/arch/risc-v/src/common/espressif/esp_head.S similarity index 98% rename from arch/risc-v/src/espressif/esp_head.S rename to arch/risc-v/src/common/espressif/esp_head.S index 7286186eb3..f9707ffa71 100644 --- a/arch/risc-v/src/espressif/esp_head.S +++ b/arch/risc-v/src/common/espressif/esp_head.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_head.S + * arch/risc-v/src/common/espressif/esp_head.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_hr_timer.c b/arch/risc-v/src/common/espressif/esp_hr_timer.c similarity index 99% rename from arch/risc-v/src/espressif/esp_hr_timer.c rename to arch/risc-v/src/common/espressif/esp_hr_timer.c index 53e20cfec5..2049537745 100644 --- a/arch/risc-v/src/espressif/esp_hr_timer.c +++ b/arch/risc-v/src/common/espressif/esp_hr_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_hr_timer.c + * arch/risc-v/src/common/espressif/esp_hr_timer.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_hr_timer.h b/arch/risc-v/src/common/espressif/esp_hr_timer.h similarity index 96% rename from arch/risc-v/src/espressif/esp_hr_timer.h rename to arch/risc-v/src/common/espressif/esp_hr_timer.h index 9c594d7567..bb48bca7f1 100644 --- a/arch/risc-v/src/espressif/esp_hr_timer.h +++ b/arch/risc-v/src/common/espressif/esp_hr_timer.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_hr_timer.h + * arch/risc-v/src/common/espressif/esp_hr_timer.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H /**************************************************************************** * Included Files @@ -229,4 +229,4 @@ int esp_hr_timer_init(void); #endif #undef EXTERN -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H */ diff --git a/arch/risc-v/src/espressif/esp_idle.c b/arch/risc-v/src/common/espressif/esp_idle.c similarity index 98% rename from arch/risc-v/src/espressif/esp_idle.c rename to arch/risc-v/src/common/espressif/esp_idle.c index b0da079765..29ee677eeb 100644 --- a/arch/risc-v/src/espressif/esp_idle.c +++ b/arch/risc-v/src/common/espressif/esp_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_idle.c + * arch/risc-v/src/common/espressif/esp_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_irq.c b/arch/risc-v/src/common/espressif/esp_irq.c similarity index 99% rename from arch/risc-v/src/espressif/esp_irq.c rename to arch/risc-v/src/common/espressif/esp_irq.c index 6b294bd19c..16c526a0cc 100644 --- a/arch/risc-v/src/espressif/esp_irq.c +++ b/arch/risc-v/src/common/espressif/esp_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_irq.c + * arch/risc-v/src/common/espressif/esp_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_irq.h b/arch/risc-v/src/common/espressif/esp_irq.h similarity index 96% rename from arch/risc-v/src/espressif/esp_irq.h rename to arch/risc-v/src/common/espressif/esp_irq.h index 6c7a47c146..7a4391a486 100644 --- a/arch/risc-v/src/espressif/esp_irq.h +++ b/arch/risc-v/src/common/espressif/esp_irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_irq.h + * arch/risc-v/src/common/espressif/esp_irq.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H /**************************************************************************** * Included Files @@ -148,4 +148,4 @@ void esp_teardown_irq(int source, int cpuint); #endif #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H */ diff --git a/arch/risc-v/src/espressif/esp_ledc.c b/arch/risc-v/src/common/espressif/esp_ledc.c similarity index 99% rename from arch/risc-v/src/espressif/esp_ledc.c rename to arch/risc-v/src/common/espressif/esp_ledc.c index 30f868ee74..e0b43b756d 100644 --- a/arch/risc-v/src/espressif/esp_ledc.c +++ b/arch/risc-v/src/common/espressif/esp_ledc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_ledc.c + * arch/risc-v/src/common/espressif/esp_ledc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_ledc.h b/arch/risc-v/src/common/espressif/esp_ledc.h similarity index 90% rename from arch/risc-v/src/espressif/esp_ledc.h rename to arch/risc-v/src/common/espressif/esp_ledc.h index c5153c8c99..484a869ca8 100644 --- a/arch/risc-v/src/espressif/esp_ledc.h +++ b/arch/risc-v/src/common/espressif/esp_ledc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_ledc.h + * arch/risc-v/src/common/espressif/esp_ledc.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H /**************************************************************************** * Included Files @@ -49,4 +49,4 @@ struct pwm_lowerhalf_s *esp_ledc_init(int timer); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H */ diff --git a/arch/risc-v/src/espressif/esp_libc_stubs.c b/arch/risc-v/src/common/espressif/esp_libc_stubs.c similarity index 99% rename from arch/risc-v/src/espressif/esp_libc_stubs.c rename to arch/risc-v/src/common/espressif/esp_libc_stubs.c index da6eddf4c7..dfe6a160f1 100644 --- a/arch/risc-v/src/espressif/esp_libc_stubs.c +++ b/arch/risc-v/src/common/espressif/esp_libc_stubs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_libc_stubs.c + * arch/risc-v/src/common/espressif/esp_libc_stubs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_libc_stubs.h b/arch/risc-v/src/common/espressif/esp_libc_stubs.h similarity index 88% rename from arch/risc-v/src/espressif/esp_libc_stubs.h rename to arch/risc-v/src/common/espressif/esp_libc_stubs.h index 9ed6084e1e..c26de3a668 100644 --- a/arch/risc-v/src/espressif/esp_libc_stubs.h +++ b/arch/risc-v/src/common/espressif/esp_libc_stubs.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_libc_stubs.h + * arch/risc-v/src/common/espressif/esp_libc_stubs.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H /**************************************************************************** * Included Files @@ -48,4 +48,4 @@ void esp_setup_syscall_table(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H */ diff --git a/arch/risc-v/src/espressif/esp_lowputc.c b/arch/risc-v/src/common/espressif/esp_lowputc.c similarity index 99% rename from arch/risc-v/src/espressif/esp_lowputc.c rename to arch/risc-v/src/common/espressif/esp_lowputc.c index dca8f2b92f..8f04e823c9 100644 --- a/arch/risc-v/src/espressif/esp_lowputc.c +++ b/arch/risc-v/src/common/espressif/esp_lowputc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_lowputc.c + * arch/risc-v/src/common/espressif/esp_lowputc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_lowputc.h b/arch/risc-v/src/common/espressif/esp_lowputc.h similarity index 96% rename from arch/risc-v/src/espressif/esp_lowputc.h rename to arch/risc-v/src/common/espressif/esp_lowputc.h index 39d99cd654..41adb3c737 100644 --- a/arch/risc-v/src/espressif/esp_lowputc.h +++ b/arch/risc-v/src/common/espressif/esp_lowputc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_lowputc.h + * arch/risc-v/src/common/espressif/esp_lowputc.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H /**************************************************************************** * Included Files @@ -183,4 +183,4 @@ void esp_lowputc_restore_pins(const struct esp_uart_s *priv); void esp_lowsetup(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H */ diff --git a/arch/risc-v/src/espressif/esp_memorymap.h b/arch/risc-v/src/common/espressif/esp_memorymap.h similarity index 87% rename from arch/risc-v/src/espressif/esp_memorymap.h rename to arch/risc-v/src/common/espressif/esp_memorymap.h index d30ed4b589..e8d78b1bd4 100644 --- a/arch/risc-v/src/espressif/esp_memorymap.h +++ b/arch/risc-v/src/common/espressif/esp_memorymap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_memorymap.h + * arch/risc-v/src/common/espressif/esp_memorymap.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H /**************************************************************************** * Included Files @@ -41,4 +41,4 @@ #define ESP_IDLESTACK_TOP (ESP_IDLESTACK_BASE + CONFIG_IDLETHREAD_STACKSIZE) -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H */ diff --git a/arch/risc-v/src/espressif/esp_oneshot.c b/arch/risc-v/src/common/espressif/esp_oneshot.c similarity index 99% rename from arch/risc-v/src/espressif/esp_oneshot.c rename to arch/risc-v/src/common/espressif/esp_oneshot.c index fdd0e3bac6..81972faba4 100644 --- a/arch/risc-v/src/espressif/esp_oneshot.c +++ b/arch/risc-v/src/common/espressif/esp_oneshot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_oneshot.c + * arch/risc-v/src/common/espressif/esp_oneshot.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_oneshot.h b/arch/risc-v/src/common/espressif/esp_oneshot.h similarity index 88% rename from arch/risc-v/src/espressif/esp_oneshot.h rename to arch/risc-v/src/common/espressif/esp_oneshot.h index a42cdce1be..61db61ea07 100644 --- a/arch/risc-v/src/espressif/esp_oneshot.h +++ b/arch/risc-v/src/common/espressif/esp_oneshot.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_oneshot.h + * arch/risc-v/src/common/espressif/esp_oneshot.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H /**************************************************************************** * Included Files @@ -48,4 +48,4 @@ int esp_oneshot_initialize(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H */ diff --git a/arch/risc-v/src/espressif/esp_random.c b/arch/risc-v/src/common/espressif/esp_random.c similarity index 98% rename from arch/risc-v/src/espressif/esp_random.c rename to arch/risc-v/src/common/espressif/esp_random.c index e2290b770e..261b7238ec 100644 --- a/arch/risc-v/src/espressif/esp_random.c +++ b/arch/risc-v/src/common/espressif/esp_random.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_random.c + * arch/risc-v/src/common/espressif/esp_random.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_rtc.c b/arch/risc-v/src/common/espressif/esp_rtc.c similarity index 99% rename from arch/risc-v/src/espressif/esp_rtc.c rename to arch/risc-v/src/common/espressif/esp_rtc.c index cf819ea7f9..84c56ef5e9 100644 --- a/arch/risc-v/src/espressif/esp_rtc.c +++ b/arch/risc-v/src/common/espressif/esp_rtc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_rtc.c + * arch/risc-v/src/common/espressif/esp_rtc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_rtc.h b/arch/risc-v/src/common/espressif/esp_rtc.h similarity index 89% rename from arch/risc-v/src/espressif/esp_rtc.h rename to arch/risc-v/src/common/espressif/esp_rtc.h index 0ddc9d2ac1..ef2dfee402 100644 --- a/arch/risc-v/src/espressif/esp_rtc.h +++ b/arch/risc-v/src/common/espressif/esp_rtc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_rtc.h + * arch/risc-v/src/common/espressif/esp_rtc.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H /**************************************************************************** * Included Files @@ -48,4 +48,4 @@ int esp_rtc_driverinit(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H */ diff --git a/arch/risc-v/src/espressif/esp_serial.c b/arch/risc-v/src/common/espressif/esp_serial.c similarity index 99% rename from arch/risc-v/src/espressif/esp_serial.c rename to arch/risc-v/src/common/espressif/esp_serial.c index 61dd3f8089..51c022c960 100644 --- a/arch/risc-v/src/espressif/esp_serial.c +++ b/arch/risc-v/src/common/espressif/esp_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_serial.c + * arch/risc-v/src/common/espressif/esp_serial.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_start.c b/arch/risc-v/src/common/espressif/esp_start.c similarity index 99% rename from arch/risc-v/src/espressif/esp_start.c rename to arch/risc-v/src/common/espressif/esp_start.c index a0c9d51134..e8243809a5 100644 --- a/arch/risc-v/src/espressif/esp_start.c +++ b/arch/risc-v/src/common/espressif/esp_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_start.c + * arch/risc-v/src/common/espressif/esp_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_start.h b/arch/risc-v/src/common/espressif/esp_start.h similarity index 88% rename from arch/risc-v/src/espressif/esp_start.h rename to arch/risc-v/src/common/espressif/esp_start.h index 99b056e576..ed513d0963 100644 --- a/arch/risc-v/src/espressif/esp_start.h +++ b/arch/risc-v/src/common/espressif/esp_start.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_start.h + * arch/risc-v/src/common/espressif/esp_start.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H /**************************************************************************** * Included Files @@ -46,4 +46,4 @@ void esp_board_initialize(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H */ diff --git a/arch/risc-v/src/espressif/esp_systemreset.c b/arch/risc-v/src/common/espressif/esp_systemreset.c similarity index 98% rename from arch/risc-v/src/espressif/esp_systemreset.c rename to arch/risc-v/src/common/espressif/esp_systemreset.c index f515e592b8..a808ca9dac 100644 --- a/arch/risc-v/src/espressif/esp_systemreset.c +++ b/arch/risc-v/src/common/espressif/esp_systemreset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_systemreset.c + * arch/risc-v/src/common/espressif/esp_systemreset.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_systemreset.h b/arch/risc-v/src/common/espressif/esp_systemreset.h similarity index 93% rename from arch/risc-v/src/espressif/esp_systemreset.h rename to arch/risc-v/src/common/espressif/esp_systemreset.h index bf8ea3d58b..509c604bc6 100644 --- a/arch/risc-v/src/espressif/esp_systemreset.h +++ b/arch/risc-v/src/common/espressif/esp_systemreset.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_systemreset.h + * arch/risc-v/src/common/espressif/esp_systemreset.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H /**************************************************************************** * Included Files @@ -108,4 +108,4 @@ void up_shutdown_handler(void); #undef EXTERN #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H */ diff --git a/arch/risc-v/src/espressif/esp_tickless.c b/arch/risc-v/src/common/espressif/esp_tickless.c similarity index 99% rename from arch/risc-v/src/espressif/esp_tickless.c rename to arch/risc-v/src/common/espressif/esp_tickless.c index 981e53893a..1f8a43e4f5 100644 --- a/arch/risc-v/src/espressif/esp_tickless.c +++ b/arch/risc-v/src/common/espressif/esp_tickless.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_tickless.c + * arch/risc-v/src/common/espressif/esp_tickless.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_tickless.h b/arch/risc-v/src/common/espressif/esp_tickless.h similarity index 90% rename from arch/risc-v/src/espressif/esp_tickless.h rename to arch/risc-v/src/common/espressif/esp_tickless.h index c0c9f106c6..88f6d2fc25 100644 --- a/arch/risc-v/src/espressif/esp_tickless.h +++ b/arch/risc-v/src/common/espressif/esp_tickless.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_tickless.h + * arch/risc-v/src/common/espressif/esp_tickless.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H /**************************************************************************** * Included Files @@ -66,4 +66,4 @@ uint32_t up_get_idletime(void); void up_step_idletime(uint32_t idletime_us); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H */ diff --git a/arch/risc-v/src/espressif/esp_timer.c b/arch/risc-v/src/common/espressif/esp_timer.c similarity index 99% rename from arch/risc-v/src/espressif/esp_timer.c rename to arch/risc-v/src/common/espressif/esp_timer.c index d85e03593f..1e9dd861d8 100644 --- a/arch/risc-v/src/espressif/esp_timer.c +++ b/arch/risc-v/src/common/espressif/esp_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_timer.c + * arch/risc-v/src/common/espressif/esp_timer.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_timer.h b/arch/risc-v/src/common/espressif/esp_timer.h similarity index 89% rename from arch/risc-v/src/espressif/esp_timer.h rename to arch/risc-v/src/common/espressif/esp_timer.h index fe6663a05b..17adff7e34 100644 --- a/arch/risc-v/src/espressif/esp_timer.h +++ b/arch/risc-v/src/common/espressif/esp_timer.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_timer.h + * arch/risc-v/src/common/espressif/esp_timer.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H /**************************************************************************** * Included Files @@ -50,4 +50,4 @@ int esp_timer_initialize(uint32_t timer_id); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H */ diff --git a/arch/risc-v/src/espressif/esp_timerisr.c b/arch/risc-v/src/common/espressif/esp_timerisr.c similarity index 99% rename from arch/risc-v/src/espressif/esp_timerisr.c rename to arch/risc-v/src/common/espressif/esp_timerisr.c index 6c4eb0ba86..f758b88d83 100644 --- a/arch/risc-v/src/espressif/esp_timerisr.c +++ b/arch/risc-v/src/common/espressif/esp_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_timerisr.c + * arch/risc-v/src/common/espressif/esp_timerisr.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_usbserial.c b/arch/risc-v/src/common/espressif/esp_usbserial.c similarity index 99% rename from arch/risc-v/src/espressif/esp_usbserial.c rename to arch/risc-v/src/common/espressif/esp_usbserial.c index 5c5586798d..088ae9a1a7 100644 --- a/arch/risc-v/src/espressif/esp_usbserial.c +++ b/arch/risc-v/src/common/espressif/esp_usbserial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_usbserial.c + * arch/risc-v/src/common/espressif/esp_usbserial.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_usbserial.h b/arch/risc-v/src/common/espressif/esp_usbserial.h similarity index 89% rename from arch/risc-v/src/espressif/esp_usbserial.h rename to arch/risc-v/src/common/espressif/esp_usbserial.h index b4767b3011..7b3414844d 100644 --- a/arch/risc-v/src/espressif/esp_usbserial.h +++ b/arch/risc-v/src/common/espressif/esp_usbserial.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_usbserial.h + * arch/risc-v/src/common/espressif/esp_usbserial.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H /**************************************************************************** * Included Files @@ -48,4 +48,4 @@ extern uart_dev_t g_uart_usbserial; void esp_usbserial_write(char ch); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H */ diff --git a/arch/risc-v/src/espressif/esp_vectors.S b/arch/risc-v/src/common/espressif/esp_vectors.S similarity index 97% rename from arch/risc-v/src/espressif/esp_vectors.S rename to arch/risc-v/src/common/espressif/esp_vectors.S index 96c44e4442..3fccb56abc 100644 --- a/arch/risc-v/src/espressif/esp_vectors.S +++ b/arch/risc-v/src/common/espressif/esp_vectors.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_vectors.S + * arch/risc-v/src/common/espressif/esp_vectors.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_wdt.c b/arch/risc-v/src/common/espressif/esp_wdt.c similarity index 99% rename from arch/risc-v/src/espressif/esp_wdt.c rename to arch/risc-v/src/common/espressif/esp_wdt.c index 9688f943d6..f25b18edb5 100644 --- a/arch/risc-v/src/espressif/esp_wdt.c +++ b/arch/risc-v/src/common/espressif/esp_wdt.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_wdt.c + * arch/risc-v/src/common/espressif/esp_wdt.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/risc-v/src/espressif/esp_wdt.h b/arch/risc-v/src/common/espressif/esp_wdt.h similarity index 89% rename from arch/risc-v/src/espressif/esp_wdt.h rename to arch/risc-v/src/common/espressif/esp_wdt.h index d6910e06a8..57ac77a7ed 100644 --- a/arch/risc-v/src/espressif/esp_wdt.h +++ b/arch/risc-v/src/common/espressif/esp_wdt.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/risc-v/src/espressif/esp_wdt.h + * arch/risc-v/src/common/espressif/esp_wdt.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H -#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H +#ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H +#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H /**************************************************************************** * Included Files @@ -48,4 +48,4 @@ int esp_wdt_initialize(void); -#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H */ +#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H */ diff --git a/arch/risc-v/src/espressif/Make.defs b/arch/risc-v/src/espressif/Make.defs index 224a0e3270..3280ac82e6 100644 --- a/arch/risc-v/src/espressif/Make.defs +++ b/arch/risc-v/src/espressif/Make.defs @@ -19,61 +19,7 @@ ############################################################################ include common/Make.defs - -# The start-up, "head", file. May be either a .S or a .c file. - -HEAD_ASRC = esp_head.S - -# Skip common RISC-V vector table in favor of Espressif's custom vector -# table. - -CMN_ASRCS := $(filter-out riscv_vectors.S,$(CMN_ASRCS)) -CHIP_ASRCS = esp_vectors.S - -# Required Espressif chip's files (arch/risc-v/src/espressif) - -CHIP_CSRCS = esp_allocateheap.c esp_start.c esp_idle.c -CHIP_CSRCS += esp_irq.c esp_gpio.c esp_libc_stubs.c -CHIP_CSRCS += esp_lowputc.c esp_serial.c -CHIP_CSRCS += esp_systemreset.c - -ifeq ($(CONFIG_SCHED_TICKLESS),y) - CHIP_CSRCS += esp_tickless.c -else - CHIP_CSRCS += esp_timerisr.c -endif - -ifeq ($(CONFIG_WATCHDOG),y) - CHIP_CSRCS += esp_wdt.c -endif - -ifneq ($(CONFIG_DEV_RANDOM)$(CONFIG_DEV_URANDOM_ARCH),) - CHIP_CSRCS += esp_random.c -endif - -ifeq ($(CONFIG_TIMER),y) - CHIP_CSRCS += esp_timer.c -endif - -ifeq ($(CONFIG_ONESHOT),y) - CHIP_CSRCS += esp_oneshot.c -endif - -ifeq ($(CONFIG_RTC),y) - CHIP_CSRCS += esp_rtc.c -endif - -ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y) - CHIP_CSRCS += esp_hr_timer.c -endif - -ifeq ($(CONFIG_ESPRESSIF_LEDC),y) - CHIP_CSRCS += esp_ledc.c -endif - -ifeq ($(CONFIG_ESPRESSIF_USBSERIAL),y) - CHIP_CSRCS += esp_usbserial.c -endif +include common/espressif/Make.defs ############################################################################# # Espressif HAL for 3rd Party Platforms @@ -114,5 +60,3 @@ distclean:: $(call DELFILE,../include/chip/gpio_sig_map.h) $(call DELFILE,../include/chip/irq.h) $(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO)) - -include chip/Bootloader.mk diff --git a/boards/risc-v/espressif/common/src/esp_board_ledc.c b/boards/risc-v/espressif/common/src/esp_board_ledc.c index 4c6033abf8..5ed796c5cf 100644 --- a/boards/risc-v/espressif/common/src/esp_board_ledc.c +++ b/boards/risc-v/espressif/common/src/esp_board_ledc.c @@ -33,7 +33,7 @@ #include -#include "esp_ledc.h" +#include "espressif/esp_ledc.h" #include "esp_board_ledc.h" diff --git a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_bringup.c b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_bringup.c index 6829848bb2..2f34f00c18 100644 --- a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_bringup.c +++ b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_bringup.c @@ -37,23 +37,23 @@ #include "esp_board_ledc.h" #ifdef CONFIG_WATCHDOG -# include "esp_wdt.h" +# include "espressif/esp_wdt.h" #endif #ifdef CONFIG_TIMER -# include "esp_timer.h" +# include "espressif/esp_timer.h" #endif #ifdef CONFIG_ONESHOT -# include "esp_oneshot.h" +# include "espressif/esp_oneshot.h" #endif #ifdef CONFIG_RTC_DRIVER -# include "esp_rtc.h" +# include "espressif/esp_rtc.h" #endif #ifdef CONFIG_DEV_GPIO -# include "esp_gpio.h" +# include "espressif/esp_gpio.h" #endif #ifdef CONFIG_INPUT_BUTTONS diff --git a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_buttons.c b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_buttons.c index c1f2c06cba..9cbaffd15f 100644 --- a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_buttons.c +++ b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_buttons.c @@ -43,7 +43,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_gpio.c b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_gpio.c index 5ed5be4e7b..73202832c7 100644 --- a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_gpio.c +++ b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_gpio.c @@ -41,7 +41,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_reset.c b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_reset.c index f6689c4a51..6b51350e5c 100644 --- a/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_reset.c +++ b/boards/risc-v/espressif/esp32c3-generic/src/esp32c3_reset.c @@ -31,7 +31,7 @@ #include #include -#include "esp_systemreset.h" +#include "espressif/esp_systemreset.h" #ifdef CONFIG_BOARDCTL_RESET diff --git a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_bringup.c b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_bringup.c index a5e3076d44..7a1416c854 100644 --- a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_bringup.c +++ b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_bringup.c @@ -37,23 +37,23 @@ #include "esp_board_ledc.h" #ifdef CONFIG_WATCHDOG -# include "esp_wdt.h" +# include "espressif/esp_wdt.h" #endif #ifdef CONFIG_TIMER -# include "esp_timer.h" +# include "espressif/esp_timer.h" #endif #ifdef CONFIG_ONESHOT -# include "esp_oneshot.h" +# include "espressif/esp_oneshot.h" #endif #ifdef CONFIG_RTC_DRIVER -# include "esp_rtc.h" +# include "espressif/esp_rtc.h" #endif #ifdef CONFIG_DEV_GPIO -# include "esp_gpio.h" +# include "espressif/esp_gpio.h" #endif #ifdef CONFIG_INPUT_BUTTONS diff --git a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_buttons.c b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_buttons.c index bdb9c422b7..5d62f0bf1e 100644 --- a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_buttons.c +++ b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_buttons.c @@ -43,7 +43,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_gpio.c b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_gpio.c index d1c462c496..e5e1f19391 100644 --- a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_gpio.c +++ b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_gpio.c @@ -41,7 +41,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_reset.c b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_reset.c index 9bdf617ab6..50afc731a2 100644 --- a/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_reset.c +++ b/boards/risc-v/espressif/esp32c6-generic/src/esp32c6_reset.c @@ -31,7 +31,7 @@ #include #include -#include "esp_systemreset.h" +#include "espressif/esp_systemreset.h" #ifdef CONFIG_BOARDCTL_RESET diff --git a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_bringup.c b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_bringup.c index 3fc9ca542a..7ea562a9a0 100644 --- a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_bringup.c +++ b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_bringup.c @@ -37,23 +37,23 @@ #include "esp_board_ledc.h" #ifdef CONFIG_WATCHDOG -# include "esp_wdt.h" +# include "espressif/esp_wdt.h" #endif #ifdef CONFIG_TIMER -# include "esp_timer.h" +# include "espressif/esp_timer.h" #endif #ifdef CONFIG_ONESHOT -# include "esp_oneshot.h" +# include "espressif/esp_oneshot.h" #endif #ifdef CONFIG_RTC_DRIVER -# include "esp_rtc.h" +# include "espressif/esp_rtc.h" #endif #ifdef CONFIG_DEV_GPIO -# include "esp_gpio.h" +# include "espressif/esp_gpio.h" #endif #ifdef CONFIG_INPUT_BUTTONS diff --git a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_buttons.c b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_buttons.c index 6000365e80..958681cc65 100644 --- a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_buttons.c +++ b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_buttons.c @@ -43,7 +43,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_gpio.c b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_gpio.c index a863491408..d48d8a8b79 100644 --- a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_gpio.c +++ b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_gpio.c @@ -41,7 +41,7 @@ /* Arch */ -#include "esp_gpio.h" +#include "espressif/esp_gpio.h" /* Board */ diff --git a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_reset.c b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_reset.c index b01e3de2d2..0520b578ac 100644 --- a/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_reset.c +++ b/boards/risc-v/espressif/esp32h2-generic/src/esp32h2_reset.c @@ -31,7 +31,7 @@ #include #include -#include "esp_systemreset.h" +#include "espressif/esp_systemreset.h" #ifdef CONFIG_BOARDCTL_RESET