Messages in this thread Patch in this message | | | From | n0ano@n0ano ... | Date | Tue, 14 Oct 2008 17:30:31 -0600 | Subject | Re: [PATCH] Enable console on PCI serial devices |
| |
On Tue, Oct 14, 2008 at 03:39:44PM -0700, Yinghai Lu wrote: > ... > Did you check > > console=uart8250,io,0xe880,115200n8 > > hope you can expand that to support CCC > > YH
Good suggestion. Here is a much simpler patch that just expands the early printk to add a clock frequency parameter, e.g. I use:
console=uart8250,io,0xe880,115200,921600
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
Documentation/kernel-parameters.txt | 9 ++++++--- drivers/serial/8250_early.c | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 2443f5b..95ab44f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -505,12 +505,15 @@ and is between 256 and 4096 characters. It is defined in the file Documentation/networking/netconsole.txt for an alternative. - uart[8250],io,<addr>[,options] - uart[8250],mmio,<addr>[,options] + uart[8250],io,<addr>[,options[,clk]] + uart[8250],mmio,<addr>[,options[,clk]] Start an early, polled-mode console on the 8250/16550 UART at the specified I/O port or MMIO address, switching to the matching ttyS device later. The - options are the same as for ttyS, above. + "options" are the same as for ttyS, above. "clk" + is the crystal frequency which defaults to 1843200 + (115200 * 16) but some hardware uses different + crystal. If the device connected to the port is not a TTY but a braille device, prepend "brl," before the device type, for instance diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c index f279745..edd5803 100644 --- a/drivers/serial/8250_early.c +++ b/drivers/serial/8250_early.c @@ -180,6 +180,11 @@ static int __init parse_options(struct early_serial8250_device *device, snprintf(device->options, sizeof(device->options), "%u", device->baud); } + options = strchr(options, ','); + if (options) { + options++; + port->uartclk = simple_strtoul(options, NULL, 0) * 16; + } printk(KERN_INFO "Early serial console at %s 0x%llx (options '%s')\n", mmio ? "MMIO" : "I/O port",
| |