diff options
-rw-r--r-- | sys/arch/aviion/dev/dart.c | 16 | ||||
-rw-r--r-- | sys/arch/aviion/dev/dart_syscon.c | 6 | ||||
-rw-r--r-- | sys/arch/aviion/include/av400.h | 4 | ||||
-rw-r--r-- | sys/arch/aviion/include/avcommon.h | 4 |
4 files changed, 13 insertions, 17 deletions
diff --git a/sys/arch/aviion/dev/dart.c b/sys/arch/aviion/dev/dart.c index c21cb48d54b..ece394bbe46 100644 --- a/sys/arch/aviion/dev/dart.c +++ b/sys/arch/aviion/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.2 2007/12/12 20:37:31 miod Exp $ */ +/* $OpenBSD: dart.c,v 1.3 2007/12/19 21:52:46 miod Exp $ */ /* * Mach Operating System @@ -40,8 +40,7 @@ #include <dev/cons.h> -#include <machine/av400.h> -#include <aviion/dev/sysconreg.h> +#include <machine/avcommon.h> #include <aviion/dev/dartreg.h> #define SPKRDIS 0x10 /* disable speaker on OP3 */ #include <aviion/dev/dartvar.h> @@ -177,9 +176,6 @@ dart_common_attach(struct dartsoftc *sc) #endif dart_write(sc, DART_IMR, sc->sc_sv_reg->sv_imr); dart_write(sc, DART_OPCR, OPSET | SPKRDIS); -#if 0 - dart_write(sc, DART_IVR, SYSCON_VECT + SYSCV_SCC); -#endif sc->sc_dart[A_PORT].tty = sc->sc_dart[B_PORT].tty = NULL; sc->sc_dart[A_PORT].dart_swflags = sc->sc_dart[B_PORT].dart_swflags = 0; @@ -195,7 +191,7 @@ const struct dart_s { int dspeed; } dart_speeds[] = { { B0, 0 }, /* 0 baud, special HUP condition */ - { B50, NOBAUD }, /* 50 baud, not implemented */ + { B50, NOBAUD }, /* 50 baud, not implemented */ { B75, BD75 }, /* 75 baud */ { B110, BD110 }, /* 110 baud */ { B134, BD134 }, /* 134.5 baud */ @@ -869,9 +865,9 @@ dartintr(void *arg) #define dart_cnwrite(reg, val) dart_write(sc, (reg), (val)) #else #define dart_cnread(reg) \ - *(volatile u_int8_t *)(DART_BASE + 3 + ((reg) << 2)) + *(volatile u_int8_t *)(CONSOLE_DART_BASE + 3 + ((reg) << 2)) #define dart_cnwrite(reg, val) \ - *(volatile u_int8_t *)(DART_BASE + 3 + ((reg) << 2)) = (val) + *(volatile u_int8_t *)(CONSOLE_DART_BASE + 3 + ((reg) << 2)) = (val) #endif void @@ -879,7 +875,7 @@ dartcnprobe(struct consdev *cp) { int maj; - if (badaddr(DART_BASE, 4) != 0) + if (badaddr(CONSOLE_DART_BASE, 4) != 0) return; #ifdef USE_PROM_CONSOLE diff --git a/sys/arch/aviion/dev/dart_syscon.c b/sys/arch/aviion/dev/dart_syscon.c index 73d63540e40..d44fd619473 100644 --- a/sys/arch/aviion/dev/dart_syscon.c +++ b/sys/arch/aviion/dev/dart_syscon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart_syscon.c,v 1.1 2006/05/09 18:13:37 miod Exp $ */ +/* $OpenBSD: dart_syscon.c,v 1.2 2007/12/19 21:52:46 miod Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat * @@ -31,7 +31,7 @@ #include <machine/autoconf.h> #include <machine/cpu.h> -#include <machine/av400.h> +#include <machine/avcommon.h> #include <aviion/dev/sysconreg.h> #include <aviion/dev/dartvar.h> @@ -82,7 +82,7 @@ dart_syscon_attach(struct device *parent, struct device *self, void *aux) } sc->sc_ioh = ioh; - if (ca->ca_paddr == DART_BASE) { + if (ca->ca_paddr == CONSOLE_DART_BASE) { vec = SYSCV_SCC; sc->sc_console = 1; /* XXX for now */ printf(": console"); diff --git a/sys/arch/aviion/include/av400.h b/sys/arch/aviion/include/av400.h index 2926ae8eda1..e156daf1fbc 100644 --- a/sys/arch/aviion/include/av400.h +++ b/sys/arch/aviion/include/av400.h @@ -1,4 +1,4 @@ -/* $OpenBSD: av400.h,v 1.3 2006/05/21 12:22:03 miod Exp $ */ +/* $OpenBSD: av400.h,v 1.4 2007/12/19 21:52:47 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -174,8 +174,6 @@ #define MASK_LVL_6 (LVL7) #define MASK_LVL_7 (IRQ_ABORT) -#define DART_BASE 0xfff82000 - /* * CMMU addresses */ diff --git a/sys/arch/aviion/include/avcommon.h b/sys/arch/aviion/include/avcommon.h index 68400fc5e81..32b391e958e 100644 --- a/sys/arch/aviion/include/avcommon.h +++ b/sys/arch/aviion/include/avcommon.h @@ -1,4 +1,4 @@ -/* $OpenBSD: avcommon.h,v 1.2 2006/05/21 22:43:54 miod Exp $ */ +/* $OpenBSD: avcommon.h,v 1.3 2007/12/19 21:52:47 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -182,4 +182,6 @@ #define CIO_CIP 0x20 /* CTC Clear interrupt pending */ #define CIO_IP 0x20 /* CTC Interrupt pending */ +#define CONSOLE_DART_BASE 0xfff82000 + #endif /* __MACHINE_AVCOMMON_H__ */ |