void apciinit(struct consdev *cp) { struct apciregs *apci = (struct apciregs *)apcicnaddr; /* * The only system on which this will happen is a 425e, * which does not currently have a framebuffer console * driver. We use the ROM's output method to let the * operator know we're switching to the APCI. */ userom = 1; printf("Switching to APCI console.\n"); userom = 0; apci->ap_cfcr = CFCR_DLAB; apci->ap_data = APCIBRD(9600) & 0xff; apci->ap_ier = (APCIBRD(9600) >> 8) & 0xff; apci->ap_cfcr = CFCR_8BITS; apci->ap_fifo = FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_1; apci->ap_mcr = MCR_DTR | MCR_RTS; }
/* * Routines shared by the apci and dnkbd drivers. */ #include <sys/param.h> #include <sys/systm.h> #include <sys/tty.h> #include <sys/kernel.h> #include <hp300/dev/apcireg.h> #include <hp300/dev/apcivar.h> #include <hp300/dev/dcareg.h> const struct speedtab apcispeedtab[] = { { 0, 0 }, { 50, APCIBRD(50) }, { 75, APCIBRD(75) }, { 110, APCIBRD(110) }, { 134, APCIBRD(134) }, { 150, APCIBRD(150) }, { 200, APCIBRD(200) }, { 300, APCIBRD(300) }, { 600, APCIBRD(600) }, { 1200, APCIBRD(1200) }, { 1800, APCIBRD(1800) }, { 2400, APCIBRD(2400) }, { 4800, APCIBRD(4800) }, { 9600, APCIBRD(9600) }, { 19200, APCIBRD(19200) }, { 38400, APCIBRD(38400) }, { -1, -1 },