diff options
| author | Florian Eckert | 2023-03-07 11:02:26 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-07-13 15:32:00 +0000 |
| commit | b93bb3dc629d50cd8885b8ee11e379e3b2a3c4b6 (patch) | |
| tree | df2539656b90a80a361af0e8f8f5ec7f838d96aa | |
| parent | 1c6cb6d5be10281d3b45ef8deec50b9e1e9aa8bb (diff) | |
| download | openwrt-b93bb3dc629d50cd8885b8ee11e379e3b2a3c4b6.tar.gz | |
kernel: make tty count for 8250 configurable
The number of serial interfaces for the chip 8250 can be configured at
build time. This is currently not configurable and is always set to 16
interfaces. This is too little for some small embedded devices and too much
for others (x86_64). Therefore, this commit creates the possibility to set
this at compile time.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/19217
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | package/kernel/linux/modules/other.mk | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 53b1043a53..42c7ab06e8 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -566,8 +566,6 @@ define KernelPackage/serial-8250 DEPENDS:=@!TARGET_uml KCONFIG:= CONFIG_SERIAL_8250 \ CONFIG_SERIAL_8250_PCI \ - CONFIG_SERIAL_8250_NR_UARTS=16 \ - CONFIG_SERIAL_8250_RUNTIME_UARTS=16 \ CONFIG_SERIAL_8250_EXTENDED=y \ CONFIG_SERIAL_8250_MANY_PORTS=y \ CONFIG_SERIAL_8250_SHARE_IRQ=y \ @@ -585,6 +583,31 @@ define KernelPackage/serial-8250/description Kernel module for 8250 UART based serial ports endef +define KernelPackage/serial-8250/config +menu "Configuration" + depends on PACKAGE_kmod-serial-8250 + +config KERNEL_SERIAL_8250_NR_UARTS + int "Maximum number of 8250/16550 serial ports" + default "16" + help + Set this to the number of serial ports you want the driver + to support. This includes any ports discovered via ACPI or + PCI enumeration and any ports that may be added at run-time + via hot-plug, or any ISA multi-port serial cards. + +config KERNEL_SERIAL_8250_RUNTIME_UARTS + int "Number of 8250/16550 serial ports to register at runtime" + range 0 KERNEL_SERIAL_8250_NR_UARTS + default "16" + help + Set this to the maximum number of serial ports you want + the kernel to register at boot time. This can be overridden + with the module parameter "nr_uarts", or boot-time parameter + 8250.nr_uarts +endmenu +endef + $(eval $(call KernelPackage,serial-8250)) |