}
}
-#if defined(CONFIG_SERIAL_CONSOLE) || defined(DEBUG_SERIAL)
-int mac_sccb_console_wait_key(struct console *co)
-{
- int i;
- do {
- for( i = uSEC; i > 0; --i )
- barrier();
- } while( !(scc.cha_b_ctrl & 0x01) ); /* wait for rx buf filled */
- for( i = uSEC; i > 0; --i )
- barrier();
- return( scc.cha_b_data );
-}
-
-#endif
/* The following two functions do a quick'n'dirty initialization of the MFP or
* SCC serial ports. They're used by the debugging interface, kgdb, and the
/* Mac printer port */
mac_init_scc_port( B9600|CS8, 1 );
mac_console_driver.write = mac_sccb_console_write;
-#ifdef CONFIG_SERIAL_CONSOLE
- mac_console_driver.wait_key = mac_sccb_console_wait_key;
-#endif
scc_port = 1;
}
#endif
custom.intena = IF_SETCLR | (intena & IF_TBE);
}
-/*
- * Receive character from the serial port
- */
-static int serial_console_wait_key(struct console *co)
-{
- unsigned short intena = custom.intenar;
- int ch;
-
- custom.intena = IF_RBF;
-
- while (!(custom.intreqr & IF_RBF))
- barrier();
- ch = custom.serdatr & 0xff;
- custom.intreq = IF_RBF;
-
- custom.intena = IF_SETCLR | (intena & IF_RBF);
-
- return ch;
-}
-
static kdev_t serial_console_device(struct console *c)
{
return mk_kdev(TTY_MAJOR, 64);
}
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- NULL,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ .name = "ttyS",
+ .write = serial_console_write,
+ .device = serial_console_device,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
};
/*