Maarten, Your commit was what made me think of this, I had a kernel released from before it and was using 8 uarts and only 4 of them showed up. Suffice it to say finding that was interesting. Anyway, yeah it's probably not bad to bring the default down to 1. Hopefully every uartlite user will see the new option when they add the module or at least know to look for it. I know Xilinx has some tools that auto add modules based on what IP cores you have, and some of their users might not notice the reduction, but I don't think we can make everything obvious to everyone. --Sam On Sat, Feb 18, 2017 at 3:17 AM, Maarten Brock <m.brock@xxxxxxxxxxxxx> wrote: > Hi Sam, > > This is a good enhancement. I should have thought of this when I posted the > patch to get ULITE_NR_UARTS incremented from 4 to 16 > (commit acf5e6c88914333f8e1b66d9968c65112a97e846). > > With this config option it might be sane to revert the default back to 4 or > even scale it down to 1 or 2. I expect all uartlite users will configure > and build their own kernel, but do not want to copy and modify the sources. > > Kind regards, > Maarten > > > On 2017-02-16 14:58, Sam Povilus wrote: >> >> 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@xxxxxxxx> >> --- >> drivers/tty/serial/Kconfig | 9 +++++++++ >> drivers/tty/serial/uartlite.c | 2 +- >> 2 files changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig >> index e9cf5b67f1b7..56d34e233002 100644 >> --- a/drivers/tty/serial/Kconfig >> +++ b/drivers/tty/serial/Kconfig >> @@ -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 16 >> + 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 >> diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c >> index 817bb0d3f326..c9b8d702dadc 100644 >> --- a/drivers/tty/serial/uartlite.c >> +++ b/drivers/tty/serial/uartlite.c >> @@ -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 > > -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html