X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Fearly_printk.c;h=750bcd0655dc00275c0fd58f5c71543fb8d284af;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=98041f50e0ea85ef7d76143c968d2074122c00c9;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 98041f50e..750bcd065 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -8,9 +8,9 @@ /* Simple VGA output */ #ifdef __i386__ -#define VGABASE __pa(__PAGE_OFFSET + 0xb8000UL) +#define VGABASE (__ISA_IO_base + 0xb8000) #else -#define VGABASE 0xffffffff800b8000UL +#define VGABASE ((void __iomem *)0xffffffff800b8000UL) #endif #define MAX_YPOS 25 @@ -99,18 +99,17 @@ static void early_serial_write(struct console *con, const char *s, unsigned n) #define DEFAULT_BAUD 9600 -static __init void early_serial_init(char *opt) +static __init void early_serial_init(char *s) { unsigned char c; unsigned divisor; unsigned baud = DEFAULT_BAUD; - char *s, *e; + char *e; - if (*opt == ',') - ++opt; + if (*s == ',') + ++s; - s = strsep(&opt, ","); - if (s != NULL) { + if (*s) { unsigned port; if (!strncmp(s,"0x",2)) { early_serial_base = simple_strtoul(s, &e, 16); @@ -124,6 +123,9 @@ static __init void early_serial_init(char *opt) port = 0; early_serial_base = bases[port]; } + s += strcspn(s, ","); + if (*s == ',') + s++; } outb(0x3, early_serial_base + LCR); /* 8n1 */ @@ -131,8 +133,7 @@ static __init void early_serial_init(char *opt) outb(0, early_serial_base + FCR); /* no fifo */ outb(0x3, early_serial_base + MCR); /* DTR + RTS */ - s = strsep(&opt, ","); - if (s != NULL) { + if (*s) { baud = simple_strtoul(s, &e, 0); if (baud == 0 || s == e) baud = DEFAULT_BAUD; @@ -197,9 +198,6 @@ int __init setup_early_printk(char *opt) early_console = &early_serial_console; } else if (!strncmp(buf, "vga", 3)) { early_console = &early_vga_console; - } else { - early_console = NULL; - return -1; } early_console_initialized = 1; register_console(early_console);