mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-28 00:45:21 +00:00
Convert driver to use DT_INST_ defines. In the process, we've removed all UART/USART/LPUART code in device instanciation code which had no impact. Since all uart/usart/lpuart nodes declare compatibility with st,stm32uart, DT_INST_X_ST_STM32_UART_FOO could be used. Removed DT_UART fixup macros. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
209 lines
8.8 KiB
C
209 lines
8.8 KiB
C
/*
|
|
* Copyright (c) 2019 STMicroelectronics
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/* SoC level DTS fixup file */
|
|
|
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
|
|
|
#define DT_GPIO_STM32_GPIOA_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50002000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOA_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50002000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOA_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50002000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOA_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50002000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOA_LABEL \
|
|
DT_ST_STM32_GPIO_50002000_LABEL
|
|
#define DT_GPIO_STM32_GPIOA_SIZE \
|
|
DT_ST_STM32_GPIO_50002000_SIZE
|
|
#define DT_GPIO_STM32_GPIOA_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50002000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOA_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50002000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOB_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50003000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOB_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50003000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOB_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50003000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOB_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50003000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOB_LABEL \
|
|
DT_ST_STM32_GPIO_50003000_LABEL
|
|
#define DT_GPIO_STM32_GPIOB_SIZE \
|
|
DT_ST_STM32_GPIO_50003000_SIZE
|
|
#define DT_GPIO_STM32_GPIOB_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50003000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOB_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50003000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOC_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50004000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOC_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50004000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOC_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50004000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOC_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50004000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOC_LABEL \
|
|
DT_ST_STM32_GPIO_50004000_LABEL
|
|
#define DT_GPIO_STM32_GPIOC_SIZE \
|
|
DT_ST_STM32_GPIO_50004000_SIZE
|
|
#define DT_GPIO_STM32_GPIOC_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50004000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOC_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50004000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOD_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50005000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOD_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50005000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOD_CLOCK_BUS_0 \
|
|
T_ST_STM32_GPIO_50005000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOD_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50005000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOD_LABEL \
|
|
DT_ST_STM32_GPIO_50005000_LABEL
|
|
#define DT_GPIO_STM32_GPIOD_SIZE \
|
|
DT_ST_STM32_GPIO_50005000_SIZE
|
|
#define DT_GPIO_STM32_GPIOD_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50005000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOD_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50005000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOE_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50006000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOE_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50006000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOE_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50006000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOE_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50006000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOE_LABEL \
|
|
DT_ST_STM32_GPIO_50006000_LABEL
|
|
#define DT_GPIO_STM32_GPIOE_SIZE \
|
|
DT_ST_STM32_GPIO_50006000_SIZE
|
|
#define DT_GPIO_STM32_GPIOE_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50006000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOE_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50006000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOF_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50007000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOF_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50007000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOF_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50007000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOF_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50007000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOF_LABEL \
|
|
DT_ST_STM32_GPIO_50007000_LABEL
|
|
#define DT_GPIO_STM32_GPIOF_SIZE \
|
|
DT_ST_STM32_GPIO_50007000_SIZE
|
|
#define DT_GPIO_STM32_GPIOF_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50007000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOF_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50007000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOG_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50008000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOG_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50008000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOG_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50008000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOG_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50008000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOG_LABEL \
|
|
DT_ST_STM32_GPIO_50008000_LABEL
|
|
#define DT_GPIO_STM32_GPIOG_SIZE \
|
|
DT_ST_STM32_GPIO_50008000_SIZE
|
|
#define DT_GPIO_STM32_GPIOG_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50008000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOG_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50008000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOH_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_50009000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOH_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_50009000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOH_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_50009000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOH_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_50009000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOH_LABEL \
|
|
DT_ST_STM32_GPIO_50009000_LABEL
|
|
#define DT_GPIO_STM32_GPIOH_SIZE \
|
|
DT_ST_STM32_GPIO_50009000_SIZE
|
|
#define DT_GPIO_STM32_GPIOH_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_50009000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOH_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_50009000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOI_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_5000A000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOI_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_5000A000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOI_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_5000A000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOI_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_5000A000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOI_LABEL \
|
|
DT_ST_STM32_GPIO_5000A000_LABEL
|
|
#define DT_GPIO_STM32_GPIOI_SIZE \
|
|
DT_ST_STM32_GPIO_5000A000_SIZE
|
|
#define DT_GPIO_STM32_GPIOI_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_5000A000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOI_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_5000A000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOJ_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_5000B000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOJ_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_5000B000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOJ_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_5000B000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOJ_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_5000B000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOJ_LABEL \
|
|
DT_ST_STM32_GPIO_5000B000_LABEL
|
|
#define DT_GPIO_STM32_GPIOJ_SIZE \
|
|
DT_ST_STM32_GPIO_5000B000_SIZE
|
|
#define DT_GPIO_STM32_GPIOJ_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_5000B000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOJ_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_5000B000_CLOCK_BUS
|
|
|
|
#define DT_GPIO_STM32_GPIOK_BASE_ADDRESS \
|
|
DT_ST_STM32_GPIO_5000C000_BASE_ADDRESS
|
|
#define DT_GPIO_STM32_GPIOK_CLOCK_BITS_0 \
|
|
DT_ST_STM32_GPIO_5000C000_CLOCK_BITS_0
|
|
#define DT_GPIO_STM32_GPIOK_CLOCK_BUS_0 \
|
|
DT_ST_STM32_GPIO_5000C000_CLOCK_BUS_0
|
|
#define DT_GPIO_STM32_GPIOK_CLOCK_CONTROLLER \
|
|
DT_ST_STM32_GPIO_5000C000_CLOCK_CONTROLLER
|
|
#define DT_GPIO_STM32_GPIOK_LABEL \
|
|
DT_ST_STM32_GPIO_5000C000_LABEL
|
|
#define DT_GPIO_STM32_GPIOK_SIZE \
|
|
DT_ST_STM32_GPIO_5000C000_SIZE
|
|
#define DT_GPIO_STM32_GPIOK_CLOCK_BITS \
|
|
DT_ST_STM32_GPIO_5000C000_CLOCK_BITS
|
|
#define DT_GPIO_STM32_GPIOK_CLOCK_BUS \
|
|
DT_ST_STM32_GPIO_5000C000_CLOCK_BUS
|
|
|
|
#define DT_I2C_5_BASE_ADDRESS DT_ST_STM32_I2C_V2_40015000_BASE_ADDRESS
|
|
#define DT_I2C_5_EVENT_IRQ_PRI DT_ST_STM32_I2C_V2_40015000_IRQ_EVENT_PRIORITY
|
|
#define DT_I2C_5_ERROR_IRQ_PRI DT_ST_STM32_I2C_V2_40015000_IRQ_ERROR_PRIORITY
|
|
#define DT_I2C_5_NAME DT_ST_STM32_I2C_V2_40015000_LABEL
|
|
#define DT_I2C_5_EVENT_IRQ DT_ST_STM32_I2C_V2_40015000_IRQ_EVENT
|
|
#define DT_I2C_5_ERROR_IRQ DT_ST_STM32_I2C_V2_40015000_IRQ_ERROR
|
|
#define DT_I2C_5_BITRATE DT_ST_STM32_I2C_V2_40015000_CLOCK_FREQUENCY
|
|
#define DT_I2C_5_CLOCK_BITS DT_ST_STM32_I2C_V2_40015000_CLOCK_BITS
|
|
#define DT_I2C_5_CLOCK_BUS DT_ST_STM32_I2C_V2_40015000_CLOCK_BUS
|
|
|
|
/* End of SoC Level DTS fixup file */
|