Submitter | Uwe Hermann |
---|---|
Date | 2009-10-16 21:43:17 |
Message ID | <20091016214317.GD15511@greenwood> |
Download | mbox | patch |
Permalink | /patch/429/ |
State | Accepted |
Headers | show |
Comments
On Fri, Oct 16, 2009 at 3:43 PM, Uwe Hermann <uwe@hermann-uwe.de> wrote: > See patch. > Acked-by: Myles Watson <mylesgw@gmail.com> Thanks, Myles
Uwe Hermann wrote: > Make COM port selection and BAUD rate a "choice" for better usability. Must they be called COM ports? And how come BAUD is all caps? > +choice > + prompt "COM port" "Serial port" ? > + default CONSOLE_SERIAL_COM1 CONSOLE_SERIAL_1 ? > config TTYS0_BASE And here it's called TTYS0. This is a little too much variation. > - hex "I/O base for the serial port" > + hex > depends on CONSOLE_SERIAL8250 > - default 0x3f8 > + default 0x3f8 if CONSOLE_SERIAL_COM1 > + default 0x2f8 if CONSOLE_SERIAL_COM2 > + default 0x3e8 if CONSOLE_SERIAL_COM3 > + default 0x2e8 if CONSOLE_SERIAL_COM4 These I/O ports <-> serial ports aren't neccessarily true. Maybe have the I/O visible in the options? I like the choice for speed! //Peter
On Fri, Oct 16, 2009 at 04:17:35PM -0600, Myles Watson wrote:
> Acked-by: Myles Watson <mylesgw@gmail.com>
Thanks, r4798.
I forgot to add a small paragraph for mapping BAUD rates to integers,
added now.
Uwe.
On Sat, Oct 17, 2009 at 12:28:40AM +0200, Peter Stuge wrote: > > Make COM port selection and BAUD rate a "choice" for better usability. > > Must they be called COM ports? And how come BAUD is all caps? Baud is now fixed. I'd like to keep COM1 etc. visible in menuconfig as that is what most users will recognize, and also what is printed on silkscreen on many board PCBs. I added the I/O port in addition, though. > > +choice > > + prompt "COM port" > > "Serial port" ? Done. > > config TTYS0_BASE > > And here it's called TTYS0. This is a little too much variation. That's a legacy name, not changed in my patch. I agree we should probably change it to SERIAL_PORT_BASE or something like that. (there's no TTYS1_BASE in the whole repo btw.) > > - hex "I/O base for the serial port" > > + hex > > depends on CONSOLE_SERIAL8250 > > - default 0x3f8 > > + default 0x3f8 if CONSOLE_SERIAL_COM1 > > + default 0x2f8 if CONSOLE_SERIAL_COM2 > > + default 0x3e8 if CONSOLE_SERIAL_COM3 > > + default 0x2e8 if CONSOLE_SERIAL_COM4 > > These I/O ports <-> serial ports aren't neccessarily true. Maybe > have the I/O visible in the options? Done. Thanks, Uwe.
Patch
Make COM port selection and BAUD rate a "choice" for better usability. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Index: src/console/Kconfig =================================================================== --- src/console/Kconfig (Revision 4795) +++ src/console/Kconfig (Arbeitskopie) @@ -2,22 +2,73 @@ # TODO: Rename to SERIAL_CONSOLE once Kconfig transition is complete. config CONSOLE_SERIAL8250 - bool "Enable serial port console output" + bool "Serial port console output" default y help Send coreboot debug output to a serial port console. -# TODO: COM1, COM2 etc. +choice + prompt "COM port" + default CONSOLE_SERIAL_COM1 + depends on CONSOLE_SERIAL8250 + +config CONSOLE_SERIAL_COM1 + bool "COM1/ttyS0" + help + Serial console on COM1/ttyS0. +config CONSOLE_SERIAL_COM2 + bool "COM2/ttyS1" + help + Serial console on COM2/ttyS1. +config CONSOLE_SERIAL_COM3 + bool "COM3/ttyS2" + help + Serial console on COM3/ttyS2. +config CONSOLE_SERIAL_COM4 + bool "COM4/ttyS3" + help + Serial console on COM4/ttyS3. + +endchoice + config TTYS0_BASE - hex "I/O base for the serial port" + hex depends on CONSOLE_SERIAL8250 - default 0x3f8 + default 0x3f8 if CONSOLE_SERIAL_COM1 + default 0x2f8 if CONSOLE_SERIAL_COM2 + default 0x3e8 if CONSOLE_SERIAL_COM3 + default 0x2e8 if CONSOLE_SERIAL_COM4 + help + Map the COM port names to the respective I/O port. -config TTYS0_BAUD - int "Serial port BAUD rate" +choice + prompt "BAUD rate" + default CONSOLE_SERIAL_115200 depends on CONSOLE_SERIAL8250 - default 115200 +config CONSOLE_SERIAL_115200 + bool "115200" + help + Set serial port BAUD rate to 115200. +config CONSOLE_SERIAL_57600 + bool "57600" + help + Set serial port BAUD rate to 57600. +config CONSOLE_SERIAL_38400 + bool "38400" + help + Set serial port BAUD rate to 38400. +config CONSOLE_SERIAL_19200 + bool "19200" + help + Set serial port BAUD rate to 19200. +config CONSOLE_SERIAL_9600 + bool "9600" + help + Set serial port BAUD rate to 9600. + +endchoice + # TODO: Allow user-friendly selection of settings other than 8n1. config TTYS0_LCS int @@ -25,7 +76,7 @@ depends on CONSOLE_SERIAL8250 config SERIAL_POST - bool "Enable POST output on the serial port console" + bool "Show POST codes on the serial port console" depends on CONSOLE_SERIAL8250 default n help