In dc_ds_consinit(), choose the address of the dc device based on

systype.  Fixes lockup on 5000/200 - tested on 5000/200, 3100 and
5100.
This commit is contained in:
simonb 1999-12-08 04:03:28 +00:00
parent 8c9f01b5c5
commit 09af3823bf

View File

@ -1,4 +1,4 @@
/* $NetBSD: dc_ds.c,v 1.11 1999/12/08 00:13:33 simonb Exp $ */
/* $NetBSD: dc_ds.c,v 1.12 1999/12/08 04:03:28 simonb Exp $ */
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
@ -29,6 +29,9 @@
#include <pmax/dev/dc_cons.h>
#include <pmax/dev/dc_ds_cons.h>
#include <pmax/pmax/kn01.h>
#include <pmax/pmax/kn02.h>
#include <pmax/pmax/kn230.h>
#include <pmax/pmax/pmaxtype.h>
/*
* Autoconfig definition of driver front-end
@ -48,14 +51,26 @@ int
dc_ds_consinit(dev)
dev_t dev;
{
#if defined(DEBUG) && 1 /* XXX untested */
printf("dc_ds(%d,%d): serial console at 0x%x\n",
minor(dev) >> 2, minor(dev) & 03,
MIPS_PHYS_TO_KSEG1(KN01_SYS_DZ));
#endif
/* let any pending PROM output from boot drain */
u_int32_t dcaddr;
switch (systype) {
case DS_PMAX:
dcaddr = KN01_SYS_DZ;
break;
case DS_3MAX:
dcaddr = KN02_SYS_DZ;
break;
case DS_MIPSMATE:
dcaddr = KN230_SYS_DZ0;
break;
default:
/* XXX error?? */
break;
}
/* let any pending PROM output from boot drain */
DELAY(100000);
dc_consinit(dev, (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_DZ));
dc_consinit(dev, (void *)MIPS_PHYS_TO_KSEG1(dcaddr));
return (1);
}