Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jun 1999 22:03:31 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        arch@freebsd.org
Subject:   Comments on the following change to bus space (machine/bus.h)
Message-ID:  <199906270403.WAA08216@harmony.village.org>

next in thread | raw e-mail | index | archive | help
I'd like to increase the compatibility of FreeBSD's machine/bus.h (not 
to be confused with sys/bus.h) with NetBSD/OpenBSD's.  I'm in the
process of porting several newconfig drivers and ran into this (and
other) issues.  I've included the change for i386, and a similar
change can be made to alpha.

What this does is say that if the driver writer has given no hints
about programmed I/O vs memory mapped I/O, then include both.  This
brings it back to being at least compatible enough with NetBSD for
many drivers which use this to port over w/o major hassle in this
area.

Comments?

Warner

Index: bus.h
===================================================================
RCS file: /home/imp/FreeBSD/CVS/src/sys/i386/include/bus.h,v
retrieving revision 1.4
diff -u -r1.4 bus.h
--- bus.h	1998/09/29 09:06:00	1.4
+++ bus.h	1999/06/27 01:07:20
@@ -75,6 +75,15 @@
 #include <machine/cpufunc.h>
 
 /*
+ * To remain compatible with NetBSD's interface, default to both memio and
+ * pio when neither of them is defined.
+ */ 
+#if !defined(_I386_BUS_PIO_H_) && !defined(_I386_BUS_MEMIO_H_)
+#define _I386_BUS_PIO_H_
+#define _I386_BUS_MEMIO_H_
+#endif
+
+/*
  * Values for the i386 bus space tag, not to be used directly by MI code.
  */
 #define	I386_BUS_SPACE_IO	0	/* space is i/o space */


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906270403.WAA08216>