drivers/serial/Kconfig: Kconfig is too big, divide into Kconfig, Kconfig-uart, Kconfig-usart, Kconfig-sci, Kconfig-16550. More than one MCU supports LPUARTs. Add Kconfig-lpuart and remove MCU-specific LPUART definitions. Affects Kinetis and STM32L4.

This commit is contained in:
Gregory Nutt
2018-03-14 10:33:27 -06:00
parent 4a21c64f68
commit 9c1efc7ab9
8 changed files with 2470 additions and 1917 deletions
+2 -159
View File
@@ -394,7 +394,7 @@ config KINETIS_LPUART0
bool "Low power LPUART0"
default n
depends on KINETIS_HAVE_LPUART0
select OTHER_UART_SERIALDRIVER
select LPUART0_SERIALDRIVER
select KINETIS_LPUART
select KINETIS_SERIALDRIVER
select ARCH_HAVE_SERIAL_TERMIOS
@@ -405,7 +405,7 @@ config KINETIS_LPUART1
bool "Low power LPUART1"
default n
depends on KINETIS_HAVE_LPUART1
select OTHER_UART_SERIALDRIVER
select LPUART1_SERIALDRIVER
select KINETIS_LPUART
select KINETIS_SERIALDRIVER
select ARCH_HAVE_SERIAL_TERMIOS
@@ -998,163 +998,6 @@ config KINETIS_UARTFIFOS
endmenu # Kinetis UART Configuration
menu "Kinetis LPUART0 Configuration"
depends on KINETIS_LPUART0
config LPUART0_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config LPUART0_TXBUFSIZE
int "Transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config LPUART0_BAUD
int "BAUD rate"
default 115200
---help---
The configured BAUD of the UART.
config LPUART0_BITS
int "Character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config LPUART0_PARITY
int "Parity setting"
range 0 2
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config LPUART0_2STOP
int "use 2 stop bits"
default 0
---help---
1=Two stop bits
config LPUART0_IFLOWCONTROL
bool "LPUART0 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable LPUART0 RTS flow control
config LPUART0_OFLOWCONTROL
bool "LPUART0 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable LPUART0 CTS flow control
config LPUART0_DMA
bool "LPUART0 DMA support"
default n
select SERIAL_DMA
---help---
Enable DMA transfers on LPUART0
endmenu # Kinetis LPUART0 Configuration
menu "Kinetis LPUART1 Configuration"
depends on KINETIS_LPUART1
config LPUART1_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config LPUART1_TXBUFSIZE
int "Transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config LPUART1_BAUD
int "BAUD rate"
default 115200
---help---
The configured BAUD of the UART.
config LPUART1_BITS
int "Character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config LPUART1_PARITY
int "Parity setting"
range 0 2
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config LPUART1_2STOP
int "use 2 stop bits"
default 0
---help---
1=Two stop bits
config LPUART1_IFLOWCONTROL
bool "LPUART1 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable LPUART1 RTS flow control
config LPUART1_OFLOWCONTROL
bool "LPUART1 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable LPUART1 CTS flow control
config LPUART1_DMA
bool "LPUART1 DMA support"
default n
select SERIAL_DMA
---help---
Enable DMA transfers on LPUART1
endmenu # Kinetis LPUART1 Configuration
choice
prompt "Kinetis LPUART Serial Console"
default NO_LPUART_SERIAL_CONSOLE
depends on DEV_CONSOLE && KINETIS_LPUART
config LPUART0_SERIAL_CONSOLE
bool "Use LPUART0 as the serial console"
depends on KINETIS_LPUART0
select OTHER_SERIAL_CONSOLE
---help---
Use the LPUART0 device as the serial console
config LPUART1_SERIAL_CONSOLE
bool "Use LPUART1 as the serial console"
depends on KINETIS_LPUART1
select OTHER_SERIAL_CONSOLE
---help---
Use the LPUART1 device as the serial console
config NO_LPUART_SERIAL_CONSOLE
bool "No LPUART serial console"
---help---
No serial LPUART based console OR some other serial device provides
the serial console
endchoice # Kinetis LPUART Serial Console
config KINETIS_MERGE_TTY
bool "Kinetis Merge TTY names for LPUARTS"
default n
+1
View File
@@ -1238,6 +1238,7 @@ config STM32L4_LPTIM1
config STM32L4_LPUART1
bool "LPUART1"
default n
select LPUART1_SERIALDRIVER
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_LPUART1
+51 -1758
View File
File diff suppressed because it is too large Load Diff
+333
View File
@@ -0,0 +1,333 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
if 16550_UART
config 16550_UART0
bool "16550 UART0"
default n
if 16550_UART0
config 16550_UART0_BASE
hex "16550 UART0 base address"
config 16550_UART0_CLOCK
int "16550 UART0 clock"
config 16550_UART0_IRQ
int "16550 UART0 IRQ number"
config 16550_UART0_BAUD
int "16550 UART0 BAUD"
default 115200
config 16550_UART0_PARITY
int "16550 UART0 parity"
default 0
range 0 2
---help---
16550 UART0 parity. 0=None, 1=Odd, 2=Even. Default: None
config 16550_UART0_BITS
int "16550 UART0 number of bits"
default 8
---help---
16550 UART0 number of bits. Default: 8
config 16550_UART0_2STOP
int "16550 UART0 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config 16550_UART0_RXBUFSIZE
int "16550 UART0 Rx buffer size"
default 256
---help---
16550 UART0 Rx buffer size. Default: 256
config 16550_UART0_TXBUFSIZE
int "16550 UART0 Tx buffer size"
default 256
---help---
16550 UART0 Tx buffer size. Default: 256
config 16550_UART0_IFLOWCONTROL
bool "16550 UART0 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable 16550 UART0 RTS flow control
config 16550_UART0_OFLOWCONTROL
bool "16550 UART0 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable 16550 UART0 CTS flow control
endif # 16550_UART0
config 16550_UART1
bool "16550 UART1"
default n
if 16550_UART1
config 16550_UART1_BASE
hex "16550 UART1 base address"
config 16550_UART1_CLOCK
int "16550 UART1 clock"
config 16550_UART1_IRQ
int "16550 UART1 IRQ number"
config 16550_UART1_BAUD
int "16550 UART1 BAUD"
default 115200
config 16550_UART1_PARITY
int "16550 UART1 parity"
default 0
range 0 2
---help---
16550 UART1 parity. 0=None, 1=Odd, 2=Even. Default: None
config 16550_UART1_BITS
int "16550 UART1 number of bits"
default 8
---help---
16550 UART1 number of bits. Default: 8
config 16550_UART1_2STOP
int "16550 UART1 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config 16550_UART1_RXBUFSIZE
int "16550 UART1 Rx buffer size"
default 256
---help---
16550 UART1 Rx buffer size. Default: 256
config 16550_UART1_TXBUFSIZE
int "16550 UART1 Tx buffer size"
default 256
---help---
16550 UART1 Tx buffer size. Default: 256
config 16550_UART1_IFLOWCONTROL
bool "16550 UART1 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable 16550 UART1 RTS flow control
config 16550_UART1_OFLOWCONTROL
bool "16550 UART1 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable 16550 UART1 CTS flow control
endif # 16550_UART1
config 16550_UART2
bool "16550 UART2"
default n
if 16550_UART2
config 16550_UART2_BASE
hex "16550 UART2 base address"
config 16550_UART2_CLOCK
int "16550 UART2 clock"
config 16550_UART2_IRQ
int "16550 UART2 IRQ number"
config 16550_UART2_BAUD
int "16550 UART2 BAUD"
default 115200
config 16550_UART2_PARITY
int "16550 UART2 parity"
default 0
range 0 2
---help---
16550 UART2 parity. 0=None, 1=Odd, 2=Even. Default: None
config 16550_UART2_BITS
int "16550 UART2 number of bits"
default 8
---help---
16550 UART2 number of bits. Default: 8
config 16550_UART2_2STOP
int "16550 UART2 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config 16550_UART2_RXBUFSIZE
int "16550 UART2 Rx buffer size"
default 256
---help---
16550 UART2 Rx buffer size. Default: 256
config 16550_UART2_TXBUFSIZE
int "16550 UART2 Tx buffer size"
default 256
---help---
16550 UART2 Tx buffer size. Default: 256
config 16550_UART2_IFLOWCONTROL
bool "16550 UART2 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable 16550 UART2 RTS flow control
config 16550_UART2_OFLOWCONTROL
bool "16550 UART2 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable 16550 UART2 CTS flow control
endif # 16550_UART2
config 16550_UART3
bool "16550 UART3"
default n
if 16550_UART3
config 16550_UART3_BASE
hex "16550 UART3 base address"
config 16550_UART3_CLOCK
int "16550 UART3 clock"
config 16550_UART3_IRQ
int "16550 UART3 IRQ number"
config 16550_UART3_BAUD
int "16550 UART3 BAUD"
default 115200
config 16550_UART3_PARITY
int "16550 UART3 parity"
default 0
range 0 2
---help---
16550 UART3 parity. 0=None, 1=Odd, 2=Even. Default: None
config 16550_UART3_BITS
int "16550 UART3 number of bits"
default 8
---help---
16550 UART3 number of bits. Default: 8
config 16550_UART3_2STOP
int "16550 UART3 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config 16550_UART3_RXBUFSIZE
int "16550 UART3 Rx buffer size"
default 256
---help---
16550 UART3 Rx buffer size. Default: 256
config 16550_UART3_TXBUFSIZE
int "16550 UART3 Tx buffer size"
default 256
---help---
16550 UART3 Tx buffer size. Default: 256
config 16550_UART3_IFLOWCONTROL
bool "16550 UART3 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable 16550 UART3 RTS flow control
config 16550_UART3_OFLOWCONTROL
bool "16550 UART3 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable 16550 UART3 CTS flow control
endif # 16550_UART3
choice
prompt "16550 Serial Console"
default 16550_NO_SERIAL_CONSOLE
depends on DEV_CONSOLE
config 16550_UART0_SERIAL_CONSOLE
bool "16550 UART0 serial console"
depends on 16550_UART0
select SERIAL_CONSOLE
config 16550_UART1_SERIAL_CONSOLE
bool "16550 UART1 serial console"
depends on 16550_UART1
select SERIAL_CONSOLE
config 16550_UART2_SERIAL_CONSOLE
bool "16550 UART2 serial console"
depends on 16550_UART2
select SERIAL_CONSOLE
config 16550_UART3_SERIAL_CONSOLE
bool "16550 UART3 serial console"
depends on 16550_UART3
select SERIAL_CONSOLE
config 16550_NO_SERIAL_CONSOLE
bool "No 16550 serial console"
endchoice # 16550 Serial Console
config 16550_SUPRESS_CONFIG
bool "Suppress 16550 configuration"
default n
---help---
This option is useful, for example, if you are using a bootloader
that configures the 16550_UART. In that case, you may want to
just leave the existing console configuration in place. Default: n
config SERIAL_UART_ARCH_IOCTL
bool "Platform has own custom IOCTL"
default n
config 16550_REGINCR
int "Address increment between 16550 registers"
default 1
---help---
The address increment between 16550 registers. Options are 1, 2, or 4.
Default: 1
config 16550_REGWIDTH
int "Bit width of 16550 registers"
default 8
---help---
The bit width of registers. Options are 8, 16, or 32. Default: 8
config 16550_ADDRWIDTH
int "Address width of 16550 registers"
default 8
---help---
The bit width of registers. Options are 8, 16, or 32. Default: 8
endif # 16550_UART
File diff suppressed because it is too large Load Diff
+102
View File
@@ -0,0 +1,102 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config SCI0_SERIALDRIVER
bool
default n
select MCU_SERIAL
config SCI1_SERIALDRIVER
bool
default n
select MCU_SERIAL
menu "SCI0 Configuration"
depends on SCI0_SERIALDRIVER
config SCI0_RXBUFSIZE
int "SCI0 receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config SCI0_TXBUFSIZE
int "SCI0 transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config SCI0_BAUD
int "SCI0 BAUD rate"
default 115200
---help---
The configured BAUD of the SCI.
config SCI0_BITS
int "SCI0 character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config SCI0_PARITY
int "Parity setting"
default 0
range 0 2
---help---
0=no parity, 1=odd parity, 2=even parity
config SCI0_2STOP
int "SCI0 use 2 stop bits"
default 0
---help---
1=Two stop bits
endmenu # SCI0 Configuration
menu "SCI1 Configuration"
depends on SCI1_SERIALDRIVER
config SCI1_RXBUFSIZE
int "SCI1 receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config SCI1_TXBUFSIZE
int "SCI1 transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config SCI1_BAUD
int "SCI1 BAUD rate"
default 115200
---help---
The configured BAUD of the SCI.
config SCI1_BITS
int "SCI1 character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config SCI1_PARITY
int "Parity setting"
default 0
range 0 2
---help---
0=no parity, 1=odd parity, 2=even parity
config SCI1_2STOP
int "SCI1 use 2 stop bits"
default 0
---help---
1=Two stop bits
endmenu # SCI1 Configuration
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff