Skip to content

Commit b44b96a

Browse files
Sam Povilusgregkh
authored andcommitted
uartlite: Adding a kernel parameter for the number of uartlites
The number of uartlites should be set by a kernel parameter instead of using a #define. This allows the user to set the number of uartlites using only kconfig and not modifying kernel source. The uartlite is used by FPGAs that support a basically unlimited number of uarts so limiting it at 16 dosn't make sense as users might need more than that. Signed-off-by: Sam Povilus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 81e33b5 commit b44b96a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/tty/serial/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,15 @@ config SERIAL_UARTLITE_CONSOLE
630630
console (the system console is the device which receives all kernel
631631
messages and warnings and which allows logins in single user mode).
632632

633+
config SERIAL_UARTLITE_NR_UARTS
634+
int "Maximum number of uartlite serial ports"
635+
depends on SERIAL_UARTLITE
636+
range 1 256
637+
default 1
638+
help
639+
Set this to the number of uartlites in your system, or the number
640+
you think you might implement.
641+
633642
config SERIAL_SUNCORE
634643
bool
635644
depends on SPARC

drivers/tty/serial/uartlite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define ULITE_NAME "ttyUL"
2929
#define ULITE_MAJOR 204
3030
#define ULITE_MINOR 187
31-
#define ULITE_NR_UARTS 16
31+
#define ULITE_NR_UARTS CONFIG_SERIAL_UARTLITE_NR_UARTS
3232

3333
/* ---------------------------------------------------------------------
3434
* Register definitions

0 commit comments

Comments
 (0)