Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga Initial IOBlix support. Only lpt and com; lpt...



details:   https://anonhg.NetBSD.org/src/rev/4034735b320a
branches:  trunk
changeset: 484047:4034735b320a
user:      is <is%NetBSD.org@localhost>
date:      Thu Mar 23 22:44:42 2000 +0000

description:
Initial IOBlix support. Only lpt and com; lpt untested; com assumes 24 MHz
clock (needs autoprobe of clock speed).

diffstat:

 sys/arch/amiga/amiga/amiga_bus_simple_16.c |   43 +++++++
 sys/arch/amiga/conf/GENERIC                |   42 ++++++-
 sys/arch/amiga/conf/files.amiga            |   11 +-
 sys/arch/amiga/dev/ioblix_zbus.c           |  162 +++++++++++++++++++++++++++++
 sys/arch/amiga/include/bus.h               |    3 +-
 5 files changed, 255 insertions(+), 6 deletions(-)

diffs (truncated from 401 to 300 lines):

diff -r 54cfe8ca2dee -r 4034735b320a sys/arch/amiga/amiga/amiga_bus_simple_16.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/amiga/amiga_bus_simple_16.c        Thu Mar 23 22:44:42 2000 +0000
@@ -0,0 +1,43 @@
+/* $NetBSD: amiga_bus_simple_16.c,v 1.1 2000/03/23 22:44:43 is Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Ignatios Souvatzis.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define AMIGA_SIMPLE_BUS_STRIDE 16             /* 1 byte per 16 bytes */
+/*#define AMIGA_SIMPLE_BUS_WORD_METHODS*/
+
+#include "simple_busfuncs.c"
+
diff -r 54cfe8ca2dee -r 4034735b320a sys/arch/amiga/conf/GENERIC
--- a/sys/arch/amiga/conf/GENERIC       Thu Mar 23 22:23:03 2000 +0000
+++ b/sys/arch/amiga/conf/GENERIC       Thu Mar 23 22:44:42 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC,v 1.139 2000/02/29 06:32:22 simonb Exp $
+#      $NetBSD: GENERIC,v 1.140 2000/03/23 22:44:42 is Exp $
 
 #
 #if 0
@@ -8,6 +8,7 @@
 #
 # make AMIGA extracts the AMIGA configuration file.
 # make DRACO extracts the DRACO configuration file.
+# make INSTALL extracts the INSTALL configuration file.
 #
 # commit them, too.
 #endif
@@ -15,7 +16,7 @@
 
 include "arch/amiga/conf/std.amiga"
 
-#ident                 "GENERIC-$Revision: 1.139 $"
+#ident                 "GENERIC-$Revision: 1.140 $"
 
 maxusers       8
 options        RTC_OFFSET=0
@@ -72,6 +73,8 @@
 #options       IPSEC_DEBUG     # debug for IP security
 #options       GATEWAY         # Packet forwarding
 #options       DIRECTED_BROADCAST      # Broadcast across subnets
+
+#ifndef INSTALL_CONFIGURATION
 #options       MROUTING        # Multicast routing
 options        NS              # XNS
 #options       NSIP            # XNS tunneling over IP
@@ -79,6 +82,8 @@
 options        EON             # OSI tunneling over IP
 options        CCITT,LLC,HDLC  # X.25
 options        NETATALK        # AppleTalk networking protocols
+#endif
+
 options        PPP_BSDCOMP     # BSD-Compress compression support for PPP
 options        PPP_DEFLATE     # Deflate compression support for PPP
 options        PPP_FILTER      # Active filter support for PPP (requires bpf)
@@ -89,31 +94,46 @@
 file-system    FFS             # Berkeley fast file system
 file-system    EXT2FS          # second extended file system (linux)
 #file-system   LFS             # log-structured filesystem (experimental)
+
+#ifndef INSTALL_CONFIGURATION
 file-system    MFS             # Memory based filesystem
+#endif
+
 file-system    NFS             # Network File System client side code
 file-system    ADOSFS          # AmigaDOS file system
 file-system    CD9660          # ISO 9660 + Rock Ridge filesystem
 file-system    MSDOSFS         # MS-DOS filesystem
+
+file-system    KERNFS          # kernel data-structure filesystem
+
+#ifndef INSTALL_CONFIGURATION
 file-system    FDESC           # user file descriptor filesystem
-file-system    KERNFS          # kernel data-structure filesystem
 file-system    NULLFS          # loopback filesystem
 file-system    OVERLAY         # overlay filesystem
 #file-system   PORTAL          # Portal filesystem
 file-system    PROCFS          # /proc filesystem
 file-system    UMAPFS          # NULLFS + uid and gid remapping
 file-system    UNION           # union filesystem
+#endif
 
 # Filesystem options
+
+#options       FFS_EI          # FFS Endian Independant support
+
+#ifndef INSTALL_CONFIGURATION
 options        QUOTA           # User and group quotas in FFS
-#options       FFS_EI          # FFS Endian Independant support
 #options       SOFTDEP         # FFS soft updates support.
 options        NFSSERVER       # Network File System server side code
+#endif
+
 #options       EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
                                # immutable) behave as system flags.
 
 #
 # Compatability options for various existing systems
 #
+
+#ifndef INSTALL_CONFIGURATION
 options        TCP_COMPAT_42   # compatibility with 4.2BSD TCP/IP
 options        COMPAT_43       # compatibility with 4.3BSD interfaces
 options        COMPAT_09       # compatibility with NetBSD 0.9
@@ -126,25 +146,34 @@
 options        COMPAT_NOMID    # allow nonvalid machine id executables
 #options       COMPAT_LINUX    # Support to run Linux/m68k executables
 options        EXEC_ELF32      # 32-bit ELF executables (Linux, SVR4)
+#endif
 
+#ifndef INSTALL_CONFIGURATION
 #
 # Support for System V IPC facilities.
 #
 options        SYSVSHM         # System V-like shared memory
 options        SYSVMSG         # System V-like messages
 options        SYSVSEM         # System V-like semaphores
+#endif
 
 #
 # Support for various kernel options
 #
+
+#ifndef INSTALL_CONFIGURATION
 options        KTRACE          # system call tracing support
 options        LKM             # Loadable kernel modules
 options        UCONSOLE        # anyone can redirect a virtual console
+#endif
+
 #options       INSECURE        # allow, among other insecure stuff, LKM 
                                # loading in multi-user mode.
 options        SCSIVERBOSE     # Verbose SCSI errors
 
+#ifndef INSTALL_CONFIGURATION
 options        NTP             # NTP phase/frequency locked loop
+#endif
 
 #
 # Misc. debugging options
@@ -270,6 +299,11 @@
 com*           at hyper? port ?        # Hypercom3/4 serial ports
 lpt*           at hyper? port ?        # Hypercom3+/4+ parallel port
 
+# not enabled yet... needs more testing and clock frequency autodetection
+#iobl*         at zbus?                # zbus IOBlix
+#com*          at iobl? port ?         # IOBlix serial ports
+#lpt*          at iobl? port ?         # IOBlix parallel ports
+
 #ifdef AMIGA_CONFIGURATION
 #
 # Amiga Mainboard devices (sans graphics and keyboard)
diff -r 54cfe8ca2dee -r 4034735b320a sys/arch/amiga/conf/files.amiga
--- a/sys/arch/amiga/conf/files.amiga   Thu Mar 23 22:23:03 2000 +0000
+++ b/sys/arch/amiga/conf/files.amiga   Thu Mar 23 22:44:42 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.amiga,v 1.97 2000/03/14 15:56:52 oster Exp $
+#      $NetBSD: files.amiga,v 1.98 2000/03/23 22:44:42 is Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16                       # NOTE THAT AMIGA IS SPECIAL!
@@ -40,6 +40,9 @@
 define amibus_wb
 file   arch/amiga/amiga/amiga_bus_simple_1word.c
 
+define amibus_b16
+file   arch/amiga/amiga/amiga_bus_simple_16.c  amibus_b16
+
 # zorro expansion bus.
 device zbus {}
 attach zbus at mainbus
@@ -229,6 +232,12 @@
 attach hyper at zbus
 file   arch/amiga/dev/hyper.c          hyper
 
+# IOBlix
+device iobl: supio, amibus_b16
+attach iobl at zbus with iobl_zbus
+file   arch/amiga/dev/ioblix_zbus.c    iobl_zbus
+
+
 attach com at supio with com_supio
 file   arch/amiga/dev/com_supio.c      com_supio
 
diff -r 54cfe8ca2dee -r 4034735b320a sys/arch/amiga/dev/ioblix_zbus.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/dev/ioblix_zbus.c  Thu Mar 23 22:44:42 2000 +0000
@@ -0,0 +1,162 @@
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Ignatios Souvatzis.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* IOBlix Zorro driver */
+/* XXX to be done: we need to probe the com clock speed! */
+
+#include <sys/types.h>
+
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/systm.h>
+#include <sys/param.h>
+
+#include <machine/bus.h>
+#include <machine/conf.h>
+
+#include <amiga/include/cpu.h>
+
+#include <amiga/amiga/device.h>
+#include <amiga/amiga/drcustom.h>
+
+#include <amiga/dev/supio.h>
+#include <amiga/dev/zbusvar.h>
+
+
+struct iobz_softc {
+       struct device sc_dev;
+       struct bus_space_tag sc_bst;
+};
+
+int iobzmatch __P((struct device *, struct cfdata *, void *));
+void iobzattach __P((struct device *, struct device *, void *));
+int iobzprint __P((void *auxp, const char *));
+
+struct cfattach iobl_zbus_ca = {
+       sizeof(struct iobz_softc), iobzmatch, iobzattach
+};
+
+int
+iobzmatch(parent, cfp, auxp)
+       struct device *parent;
+       struct cfdata *cfp;
+       void *auxp;
+{



Home | Main Index | Thread Index | Old Index