Skip to content

Commit

Permalink
uartlite: Adding a kernel parameter for the number of uartlites
Browse files Browse the repository at this point in the history
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 <kernel.development@povil.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sam Povilus authored and Greg Kroah-Hartman committed Mar 17, 2017
1 parent 81e33b5 commit b44b96a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions drivers/tty/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,15 @@ config SERIAL_UARTLITE_CONSOLE
console (the system console is the device which receives all kernel
messages and warnings and which allows logins in single user mode).

config SERIAL_UARTLITE_NR_UARTS
int "Maximum number of uartlite serial ports"
depends on SERIAL_UARTLITE
range 1 256
default 1
help
Set this to the number of uartlites in your system, or the number
you think you might implement.

config SERIAL_SUNCORE
bool
depends on SPARC
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define ULITE_NAME "ttyUL"
#define ULITE_MAJOR 204
#define ULITE_MINOR 187
#define ULITE_NR_UARTS 16
#define ULITE_NR_UARTS CONFIG_SERIAL_UARTLITE_NR_UARTS

/* ---------------------------------------------------------------------
* Register definitions
Expand Down

0 comments on commit b44b96a

Please sign in to comment.