/* Simple VGA output */
#ifdef __i386__
-#define VGABASE __pa(__PAGE_OFFSET + 0xb8000UL)
+#define VGABASE (__ISA_IO_base + 0xb8000)
#else
#define VGABASE 0xffffffff800b8000UL
#endif
#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);
port = 0;
early_serial_base = bases[port];
}
+ s += strcspn(s, ",");
+ if (*s == ',')
+ s++;
}
outb(0x3, early_serial_base + LCR); /* 8n1 */
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;