This allows you to specify "dsscon=true" in the boot parameters, similar to what you can do for the 2.4 kernels. I have not tried a kernel with xmon using this enabled. - todd --- ../linux-2.1.DIST/arch/ppc/tcd/setup.c Fri May 31 16:28:13 2002 +++ arch/ppc/tcd/setup.c Fri Oct 3 15:11:35 2003 @@ -65,6 +65,7 @@ extern int root_mountflags; static int cpuclock; +int dsscon; void do_unblank_screen(void); void hard_reset_now(void); @@ -132,6 +133,7 @@ extern void register_console(void (*)(const char *)); unsigned int iocr; unsigned int br; + char *cp; /* HACK: check for first 5 chars == Root=. If so, rewrite root= and disable console */ @@ -141,6 +143,9 @@ saved_boot_params[0] = 'r'; s403_ready = -1; } + /* must check for dsscon before initializing the s403 */ + if ((cp = strstr(saved_boot_params, "dsscon="))) + dsscon = strncmp(cp, "true", 4); #if 1 s403_virtualinit(); register_console(s403_print); --- ../linux-2.1.DIST/arch/ppc/tcd/403serial.c Fri May 31 16:28:13 2002 +++ arch/ppc/tcd/403serial.c Fri Oct 3 14:48:34 2003 @@ -16,21 +16,27 @@ { __asm__( "eieio " : : ); } -static volatile unsigned char *S403_BASE = (volatile unsigned char *) IOBASE_UART; +static volatile unsigned char *S403_BASE; int s403_ready = 0; void s403_virtualinit(void) { + extern int dsscon; + s403_ready = 0; - S403_BASE = (volatile unsigned char *)IOBASE_UART; + S403_BASE = dsscon ? (volatile unsigned char *)IOBASE_DSSUART : + (volatile unsigned char *)IOBASE_UART; s403_init(); } void s403_realinit(void) { + extern int dsscon; + s403_ready = 0; - S403_BASE = (volatile unsigned char *) IOBASE_UART; + S403_BASE = dsscon ? (volatile unsigned char *)IOBASE_DSSUART : + (volatile unsigned char *)IOBASE_UART; s403_init(); } --- ../linux-2.1.DIST/drivers/char/serial.c Fri May 31 16:28:14 2002 +++ drivers/char/serial.c Fri Oct 3 14:50:03 2003 @@ -3704,6 +3708,7 @@ unsigned char status1, status2, scratch, scratch2; struct async_struct *info, scr_info; unsigned long flags; + extern int dsscon; state->type = PORT_UNKNOWN; @@ -3721,16 +3726,18 @@ #ifdef SERIAL_DEBUG_OPEN printk("autoconfig, port=0x%x, irq=%d\n", state->port, state->irq); #endif - if (state->port == IOBASE_SERIAL) { - state->type = PORT_S403; + /* XXX - init the 403 console at all when dsscon is spec'd? (millert) */ + if (state->port == IOBASE_SERIAL || (dsscon && state->port == IOBASE_DSSUART)) { + state->type = state->port == IOBASE_SERIAL ? PORT_S403 : PORT_16550A; #ifdef SERIAL_DEBUG_OPEN - printk("autoconfig, type=403\n"); + printk("autoconfig, type=%s\n", + state->type == PORT_S403 ? "403" : "16550A"); #endif /* * If the AUTO_IRQ flag is set, try to do the automatic IRQ * detection. */ - state->irq = RS_FAKE_S403; + state->irq = state->type == PORT_S403 ? RS_FAKE_S403 : RS_FAKE_DSSUART; state->xmit_fifo_size = uart_config[state->type].dfl_xmit_fifo_size;