Move selection for CONFIG_SERIAL_TERMIOS out of MCU Kconfigs to common drivers/serial/Kconfig. Add CONFIG_ARCH_HAVE_SERIAL_TERMIOS to indicate if an MCU supports TERMIOS

This commit is contained in:
Gregory Nutt 2014-10-27 11:31:16 -06:00
parent 1252286845
commit 60d2547cd7
8 changed files with 83 additions and 84 deletions

View File

@ -22,41 +22,49 @@ config A1X_UART0
bool "UART 0"
default n
select ARCH_HAVE_UART0
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART1
bool "UART 1"
default n
select ARCH_HAVE_UART1
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART2
bool "UART 2"
default n
select ARCH_HAVE_UART2
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART3
bool "UART 3"
default n
select ARCH_HAVE_UART3
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART4
bool "UART 4"
default n
select ARCH_HAVE_UART4
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART5
bool "UART 5"
default n
select ARCH_HAVE_UART5
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART6
bool "UART 6"
default n
select ARCH_HAVE_UART6
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_UART7
bool "UART 7"
default n
select ARCH_HAVE_UART7
select ARCH_HAVE_SERIAL_TERMIOS
config A1X_IR0
bool "IR 0"

View File

@ -169,28 +169,33 @@ config LPC17_SDCARD
config LPC17_UART0
bool "UART0"
select ARCH_HAVE_UART0
default n
select ARCH_HAVE_UART0
select ARCH_HAVE_SERIAL_TERMIOS
config LPC17_UART1
bool "UART1"
select ARCH_HAVE_UART1
default n
select ARCH_HAVE_UART1
select ARCH_HAVE_SERIAL_TERMIOS
config LPC17_UART2
bool "UART2"
select ARCH_HAVE_UART2
default n
select ARCH_HAVE_UART2
select ARCH_HAVE_SERIAL_TERMIOS
config LPC17_UART3
bool "UART3"
select ARCH_HAVE_UART3
default n
select ARCH_HAVE_UART3
select ARCH_HAVE_SERIAL_TERMIOS
config LPC17_UART4
bool "UART4"
select ARCH_HAVE_UART4
default n
select ARCH_HAVE_UART4
select ARCH_HAVE_SERIAL_TERMIOS
config LPC17_CAN1
bool "CAN1"
@ -465,15 +470,6 @@ endmenu
menu "Serial driver options"
depends on LPC17_UART0 || LPC17_UART1 || LPC17_UART2 || LPC17_UART3 || LPC17_UART4
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on LPC17_UART0 || LPC17_UART1 || LPC17_UART2 || LPC17_UART3
default n
---help---
Serial driver supports termios.h interfaces (tcsetattr, tcflush, etc.).
If this is not defined, then the terminal settings (baud, parity, etc).
are not configurable at runtime; serial streams cannot be flushed, etc..
config UART1_RINGINDICATOR
bool "UART1 ring indicator"
depends on LPC17_UART1

View File

@ -254,23 +254,27 @@ config LPC43_TMR3
config LPC43_USART0
bool "USART0"
select ARCH_HAVE_USART0
default n
select ARCH_HAVE_USART0
select ARCH_HAVE_SERIAL_TERMIOS
config LPC43_UART1
bool "UART1"
select ARCH_HAVE_UART1
default n
select ARCH_HAVE_UART1
select ARCH_HAVE_SERIAL_TERMIOS
config LPC43_USART2
bool "USART2"
select ARCH_HAVE_USART2
default n
select ARCH_HAVE_USART2
select ARCH_HAVE_SERIAL_TERMIOS
config LPC43_USART3
bool "USART3"
select ARCH_HAVE_USART3
default n
select ARCH_HAVE_USART3
select ARCH_HAVE_SERIAL_TERMIOS
config LPC43_USB0
bool "USB0"
@ -290,12 +294,3 @@ config LPC43_WWDT
default n
endmenu
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3
default n
---help---
Serial driver supports termios.h interfaces (tcsetattr, tcflush, etc.).
If this is not defined, then the terminal settings (baud, parity, etc).
are not configurable at runtime; serial streams cannot be flushed, etc..

View File

@ -315,17 +315,20 @@ config NUC_UART0
bool "UART0"
default y
select ARCH_HAVE_UART0
select ARCH_HAVE_SERIAL_TERMIOS
config NUC_UART1
bool "UART1"
default n
select ARCH_HAVE_UART1
select ARCH_HAVE_SERIAL_TERMIOS
config NUC_UART2
bool "UART2"
default n
depends on NUC_HAVE_UART1
depends on NUC_HAVE_UART2
select ARCH_HAVE_UART2
select ARCH_HAVE_SERIAL_TERMIOS
config NUC_USBD
bool "USB 2.0 FS device controller"

View File

@ -616,8 +616,8 @@ config STM32_VALUELINE
bool
default n
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -637,8 +637,8 @@ config STM32_CONNECTIVITYLINE
default n
select STM32_HAVE_OTGFS
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -656,8 +656,8 @@ config STM32_PERFORMANCELINE
default n
select STM32_HAVE_USBDEV
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -671,8 +671,8 @@ config STM32_HIGHDENSITY
default n
select STM32_HAVE_FSMC
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -686,8 +686,8 @@ config STM32_MEDIUMDENSITY
bool
default n
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -701,8 +701,8 @@ config STM32_LOWDENSITY
bool
default n
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -721,8 +721,8 @@ config STM32_STM32F207
select STM32_HAVE_OTGFS
select STM32_HAVE_FSMC
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_USART6
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
@ -801,8 +801,8 @@ config STM32_STM32F405
select STM32_HAVE_FSMC
select STM32_HAVE_CCM
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_USART6
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
@ -827,8 +827,8 @@ config STM32_STM32F407
select STM32_HAVE_FSMC
select STM32_HAVE_CCM
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_USART6
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
@ -855,11 +855,11 @@ config STM32_STM32F427
select STM32_HAVE_FSMC
select STM32_HAVE_CCM
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_USART6
select STM32_HAVE_USART7
select STM32_HAVE_USART8
select STM32_HAVE_UART7
select STM32_HAVE_UART8
select STM32_HAVE_TIM1
select STM32_HAVE_TIM5
select STM32_HAVE_TIM6
@ -889,11 +889,11 @@ config STM32_STM32F429
select STM32_HAVE_FSMC
select STM32_HAVE_CCM
select STM32_HAVE_USART3
select STM32_HAVE_USART4
select STM32_HAVE_USART5
select STM32_HAVE_UART4
select STM32_HAVE_UART5
select STM32_HAVE_USART6
select STM32_HAVE_USART7
select STM32_HAVE_USART8
select STM32_HAVE_UART7
select STM32_HAVE_UART8
select STM32_HAVE_TIM1
select STM32_HAVE_TIM6
select STM32_HAVE_TIM7
@ -948,11 +948,11 @@ config STM32_HAVE_USART3
bool
default n
config STM32_HAVE_USART4
config STM32_HAVE_UART4
bool
default n
config STM32_HAVE_USART5
config STM32_HAVE_UART5
bool
default n
@ -960,11 +960,11 @@ config STM32_HAVE_USART6
bool
default n
config STM32_HAVE_USART7
config STM32_HAVE_UART7
bool
default n
config STM32_HAVE_USART8
config STM32_HAVE_UART8
bool
default n
@ -1375,32 +1375,37 @@ config STM32_USART1
bool "USART1"
default n
select ARCH_HAVE_USART1
select ARCH_HAVE_SERIAL_TERMIOS
select STM32_USART
config STM32_USART2
bool "USART2"
default n
select ARCH_HAVE_USART2
select ARCH_HAVE_SERIAL_TERMIOS
select STM32_USART
config STM32_USART3
bool "USART3"
default n
depends on STM32_HAVE_USART3
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_USART3
select STM32_USART
config STM32_UART4
bool "UART4"
default n
depends on STM32_HAVE_USART4
depends on STM32_HAVE_UART4
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_UART4
select STM32_USART
config STM32_UART5
bool "UART5"
default n
depends on STM32_HAVE_USART5
depends on STM32_HAVE_UART5
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_UART5
select STM32_USART
@ -1408,20 +1413,23 @@ config STM32_USART6
bool "USART6"
default n
depends on STM32_HAVE_USART6
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_USART6
select STM32_USART
config STM32_UART7
bool "UART7"
default n
depends on STM32_HAVE_USART7
depends on STM32_HAVE_UART7
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_UART7
select STM32_USART
config STM32_UART8
bool "UART8"
default n
depends on STM32_HAVE_USART7
depends on STM32_HAVE_UART8
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_UART8
select STM32_USART
@ -3057,15 +3065,6 @@ config UART8_RXDMA
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 || STM32_UART7 || STM32_UART8
default n
---help---
Serial driver supports termios.h interfaces (tcsetattr, tcflush, etc.).
If this is not defined, then the terminal settings (baud, parity, etc).
are not configurable at runtime; serial streams cannot be flushed, etc..
config SERIAL_DISABLE_REORDERING
bool "Disable reordering of ttySx devices."
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 || STM32_UART7 || STM32_UART8

View File

@ -65,19 +65,19 @@
* device.
*/
#if STM32_NUSART < 8 || !defined(CONFIG_STM32_HAVE_USART8)
#if STM32_NUSART < 8 || !defined(CONFIG_STM32_HAVE_UART8)
# undef CONFIG_STM32_UART8
#endif
#if STM32_NUSART < 7 || !defined(CONFIG_STM32_HAVE_USART7)
#if STM32_NUSART < 7 || !defined(CONFIG_STM32_HAVE_UART7)
# undef CONFIG_STM32_UART7
#endif
#if STM32_NUSART < 6 || !defined(CONFIG_STM32_HAVE_USART6)
# undef CONFIG_STM32_USART6
#endif
#if STM32_NUSART < 5 || !defined(CONFIG_STM32_HAVE_USART5)
#if STM32_NUSART < 5 || !defined(CONFIG_STM32_HAVE_UART5)
# undef CONFIG_STM32_UART5
#endif
#if STM32_NUSART < 4 || !defined(CONFIG_STM32_HAVE_USART4)
#if STM32_NUSART < 4 || !defined(CONFIG_STM32_HAVE_UART4)
# undef CONFIG_STM32_UART4
#endif
#if STM32_NUSART < 3 || !defined(CONFIG_STM32_HAVE_USART3)

View File

@ -14,6 +14,7 @@ config ARCH_CHIP_PIC32MX
select ARCH_HAVE_IRQPRIO
select ARCH_VECNOTIRQ
select ARCH_HAVE_RAMFUNCS
select ARCH_HAVE_SERIAL_TERMIOS
---help---
Microchip PIC32MX320F032H (MIPS32)

View File

@ -565,31 +565,37 @@ config PIC32MX_UART1
bool "UART1"
default n
select ARCH_HAVE_UART1
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_UART2
bool "UART2"
default n
select ARCH_HAVE_UART2
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_UART3
bool "UART3"
default n
select ARCH_HAVE_UART3
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_UART4
bool "UART4"
default n
select ARCH_HAVE_UART4
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_UART5
bool "UART5"
default n
select ARCH_HAVE_UART5
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_UART6
bool "UART6"
default n
select ARCH_HAVE_UART6
select ARCH_HAVE_SERIAL_TERMIOS
config PIC32MX_ADC
bool "ADC1"
@ -990,15 +996,6 @@ config PIC32MX_USBPRIO
endmenu
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on PIC32MX_UART1 || PIC32MX_UART2 || PIC32MX_UART3 || PIC32MX_UART4 || PIC32MX_UART5 || PIC32MX_UART6
default n
---help---
Serial driver supports termios.h interfaces (tcsetattr, tcflush, etc.).
If this is not defined, then the terminal settings (baud, parity, etc).
are not configurable at runtime; serial streams cannot be flushed, etc..
menu "PIC32MX PHY/Ethernet device driver settings"
depends on PIC32MX_ETHERNET