summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-01-08 22:13:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-01-08 22:13:55 +0000
commit687611b4c09c72da0db4003e669403add017bbda (patch)
treeeafd60657e1185082e440b3b3522cf06707e82e9 /sys/arch
parent5b92cae14980930e1a1d9ef789383ae87f970061 (diff)
Only use one set of DIO size and address defines, from <dev/dioreg.h>
rather than <include/cpu.h>.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/dev/dca.c4
-rw-r--r--sys/arch/hp300/dev/dcm.c4
-rw-r--r--sys/arch/hp300/dev/grf_dv.c7
-rw-r--r--sys/arch/hp300/dev/grf_gb.c5
-rw-r--r--sys/arch/hp300/dev/grf_hy.c7
-rw-r--r--sys/arch/hp300/dev/grf_rb.c7
-rw-r--r--sys/arch/hp300/dev/grf_tc.c7
-rw-r--r--sys/arch/hp300/hp300/machdep.c15
-rw-r--r--sys/arch/hp300/include/cpu.h27
9 files changed, 32 insertions, 51 deletions
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index b0dbe036149..903c5536ec9 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.20 2004/09/29 07:35:52 miod Exp $ */
+/* $OpenBSD: dca.c,v 1.21 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -1020,7 +1020,7 @@ dca_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
return (0);
}
diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c
index 1a268611b19..8de1361e110 100644
--- a/sys/arch/hp300/dev/dcm.c
+++ b/sys/arch/hp300/dev/dcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcm.c,v 1.19 2004/09/29 07:35:52 miod Exp $ */
+/* $OpenBSD: dcm.c,v 1.20 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */
/*
@@ -1546,7 +1546,7 @@ dcm_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
return (0);
}
diff --git a/sys/arch/hp300/dev/grf_dv.c b/sys/arch/hp300/dev/grf_dv.c
index cf152646d88..8928c9e33de 100644
--- a/sys/arch/hp300/dev/grf_dv.c
+++ b/sys/arch/hp300/dev/grf_dv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_dv.c,v 1.9 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: grf_dv.c,v 1.10 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: grf_dv.c,v 1.11 1997/03/31 07:34:14 scottr Exp $ */
/*
@@ -57,6 +57,7 @@
#include <dev/cons.h>
+#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
#include <hp300/dev/intiovar.h>
@@ -231,7 +232,7 @@ dv_init(gp, scode, addr)
gi->gd_fbsize = gi->gd_fbwidth * gi->gd_fbheight;
fboff = (dbp->fbomsb << 8) | dbp->fbolsb;
gi->gd_fbaddr = (caddr_t) (*((u_char *)addr + fboff) << 16);
- if (gi->gd_regaddr >= (caddr_t)DIOIIBASE) {
+ if (gi->gd_regaddr >= (caddr_t)DIOII_BASE) {
/*
* For DIO II space the fbaddr just computed is
* the offset from the select code base (regaddr)
@@ -652,7 +653,7 @@ dvbox_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
}
return (0);
diff --git a/sys/arch/hp300/dev/grf_gb.c b/sys/arch/hp300/dev/grf_gb.c
index 1832eb58dc2..db747e790d3 100644
--- a/sys/arch/hp300/dev/grf_gb.c
+++ b/sys/arch/hp300/dev/grf_gb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_gb.c,v 1.8 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: grf_gb.c,v 1.9 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: grf_gb.c,v 1.11 1997/03/31 07:34:15 scottr Exp $ */
/*
@@ -61,6 +61,7 @@
#include <dev/cons.h>
+#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
#include <hp300/dev/intiovar.h>
@@ -602,7 +603,7 @@ gbox_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
}
return (0);
diff --git a/sys/arch/hp300/dev/grf_hy.c b/sys/arch/hp300/dev/grf_hy.c
index 94bac3bcd0d..25ad65b9f95 100644
--- a/sys/arch/hp300/dev/grf_hy.c
+++ b/sys/arch/hp300/dev/grf_hy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_hy.c,v 1.9 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: grf_hy.c,v 1.10 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: grf_hy.c,v 1.9 1997/03/31 07:34:16 scottr Exp $ */
/*
@@ -59,6 +59,7 @@
#include <dev/cons.h>
+#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
#include <hp300/dev/intiovar.h>
@@ -189,7 +190,7 @@ hy_init(gp, scode, addr)
gi->gd_fbsize = (gi->gd_fbwidth * gi->gd_fbheight) >> 3;
fboff = (hy->fbomsb << 8) | hy->fbolsb;
gi->gd_fbaddr = (caddr_t) (*((u_char *)addr + fboff) << 16);
- if (gi->gd_regaddr >= (caddr_t)DIOIIBASE) {
+ if (gi->gd_regaddr >= (caddr_t)DIOII_BASE) {
/*
* For DIO II space the fbaddr just computed is
* the offset from the select code base (regaddr)
@@ -752,7 +753,7 @@ hyper_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
}
return (0);
diff --git a/sys/arch/hp300/dev/grf_rb.c b/sys/arch/hp300/dev/grf_rb.c
index 95808ea44b3..b9604dbb5ad 100644
--- a/sys/arch/hp300/dev/grf_rb.c
+++ b/sys/arch/hp300/dev/grf_rb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_rb.c,v 1.10 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: grf_rb.c,v 1.11 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: grf_rb.c,v 1.11 1997/03/31 07:34:17 scottr Exp $ */
/*
@@ -57,6 +57,7 @@
#include <dev/cons.h>
+#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
#include <hp300/dev/intiovar.h>
@@ -230,7 +231,7 @@ rb_init(gp, scode, addr)
gi->gd_fbsize = gi->gd_fbwidth * gi->gd_fbheight;
fboff = (rbp->fbomsb << 8) | rbp->fbolsb;
gi->gd_fbaddr = (caddr_t) (*((u_char *)addr + fboff) << 16);
- if (gi->gd_regaddr >= (caddr_t)DIOIIBASE) {
+ if (gi->gd_regaddr >= (caddr_t)DIOII_BASE) {
/*
* For DIO II space the fbaddr just computed is
* the offset from the select code base (regaddr)
@@ -599,7 +600,7 @@ rbox_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
}
return (0);
diff --git a/sys/arch/hp300/dev/grf_tc.c b/sys/arch/hp300/dev/grf_tc.c
index d6eeff7c23a..5f407139c0e 100644
--- a/sys/arch/hp300/dev/grf_tc.c
+++ b/sys/arch/hp300/dev/grf_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_tc.c,v 1.11 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: grf_tc.c,v 1.12 2005/01/08 22:13:53 miod Exp $ */
/* $NetBSD: grf_tc.c,v 1.11 1997/03/31 07:34:18 scottr Exp $ */
/*
@@ -57,6 +57,7 @@
#include <dev/cons.h>
+#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
#include <hp300/dev/intiovar.h>
@@ -300,7 +301,7 @@ tc_init(gp, scode, addr)
gi->gd_fbsize = gi->gd_fbwidth * gi->gd_fbheight;
fboff = (tp->fbomsb << 8) | tp->fbolsb;
gi->gd_fbaddr = (caddr_t) (*((u_char *)addr + fboff) << 16);
- if (gi->gd_regaddr >= (caddr_t)DIOIIBASE) {
+ if (gi->gd_regaddr >= (caddr_t)DIOII_BASE) {
/*
* For DIO II space the fbaddr just computed is the
* offset from the select code base (regaddr) of the
@@ -713,7 +714,7 @@ topcat_console_scan(scode, va, arg)
dioiidev = (u_char *)va;
return ((dioiidev[0x101] + 1) * 0x100000);
}
- return (DIOCSIZE);
+ return (DIO_DEVSIZE);
}
return (0);
}
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 4131b3a7717..348dd17c261 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.94 2004/12/30 21:26:14 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.95 2005/01/08 22:13:54 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -89,11 +89,12 @@
#define MAXMEM 64*1024 /* XXX - from cmap.h */
#include <uvm/uvm_extern.h>
-#include <arch/hp300/dev/hilreg.h>
-#include <arch/hp300/dev/hilioctl.h>
-#include <arch/hp300/dev/hilvar.h>
+#include <hp300/dev/dioreg.h>
+#include <hp300/dev/hilreg.h>
+#include <hp300/dev/hilioctl.h>
+#include <hp300/dev/hilvar.h>
#ifdef USELEDS
-#include <arch/hp300/hp300/leds.h>
+#include <hp300/hp300/leds.h>
#endif
/* the following is used externally (sysctl_hw) */
@@ -146,9 +147,9 @@ extern struct emul emul_sunos;
* Some storage space must be allocated statically because of the
* early console initialization.
* We know that console initialization will not try to map more than
- * DIOCSIZE bytes. Play safe and allow for twice this size.
+ * DIO_DEVSIZE bytes. Play safe and allow for twice this size.
*/
-char extiospace[EXTENT_FIXED_STORAGE_SIZE(2 * DIOCSIZE / PAGE_SIZE)];
+char extiospace[EXTENT_FIXED_STORAGE_SIZE(2 * DIO_DEVSIZE / PAGE_SIZE)];
extern int eiomapsize;
/* prototypes for local functions */
diff --git a/sys/arch/hp300/include/cpu.h b/sys/arch/hp300/include/cpu.h
index 183dbb8ded8..c1bbbb624d9 100644
--- a/sys/arch/hp300/include/cpu.h
+++ b/sys/arch/hp300/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.24 2004/06/13 21:49:13 niklas Exp $ */
+/* $OpenBSD: cpu.h,v 1.25 2005/01/08 22:13:54 miod Exp $ */
/* $NetBSD: cpu.h,v 1.28 1998/02/13 07:41:51 scottr Exp $ */
/*
@@ -217,31 +217,6 @@ int kvtop(caddr_t);
#define IIOMAPSIZE btoc(INTIOTOP-INTIOBASE) /* 2mb */
/*
- * External IO space:
- *
- * DIO ranges from select codes 0-63 at physical addresses given by:
- * 0x600000 + (sc - 32) * 0x10000
- * DIO cards are addressed in the range 0-31 [0x600000-0x800000) for
- * their control space and the remaining areas, [0x200000-0x400000) and
- * [0x800000-0x1000000), are for additional space required by a card;
- * e.g. a display framebuffer.
- *
- * DIO-II ranges from select codes 132-255 at physical addresses given by:
- * 0x1000000 + (sc - 132) * 0x400000
- * The address range of DIO-II space is thus [0x1000000-0x20000000).
- *
- * DIO/DIO-II space is too large to map in its entirety, instead devices
- * are mapped into kernel virtual address space allocated from a range
- * of EIOMAPSIZE pages (vmparam.h) starting at ``extiobase''.
- */
-#define DIOBASE (0x600000)
-#define DIOTOP (0x1000000)
-#define DIOCSIZE (0x10000)
-#define DIOIIBASE (0x01000000)
-#define DIOIITOP (0x20000000)
-#define DIOIICSIZE (0x00400000)
-
-/*
* HP MMU
*/
#define MMUBASE IIOPOFF(0x5F4000)