Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys Files added on trunk.



details:   https://anonhg.NetBSD.org/src/rev/1467f2d863ca
branches:  thorpej_scsipi
changeset: 477355:1467f2d863ca
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Jan 08 14:56:10 2001 +0000

description:
Files added on trunk.

diffstat:

 sys/arch/alpha/sableio/com_sableio.c           |   146 +
 sys/arch/alpha/sableio/fdc_sableio.c           |   138 +
 sys/arch/alpha/sableio/lpt_sableio.c           |   127 +
 sys/arch/alpha/sableio/pckbc_sableio.c         |   162 ++
 sys/arch/alpha/sableio/sableio.c               |   215 ++
 sys/arch/alpha/sableio/sableiovar.h            |    60 +
 sys/arch/dreamcast/Makefile                    |    30 +
 sys/arch/dreamcast/conf/GENERIC                |   138 +
 sys/arch/dreamcast/conf/GENERIC.local          |     5 +
 sys/arch/dreamcast/conf/Makefile.dreamcast.inc |     4 +
 sys/arch/dreamcast/conf/files.dreamcast        |    16 +
 sys/arch/dreamcast/conf/files.shbus            |    69 +
 sys/arch/dreamcast/conf/shl.x                  |    50 +
 sys/arch/dreamcast/conf/std.dreamcast          |    10 +
 sys/arch/dreamcast/dreamcast/conf.c            |   326 ++++
 sys/arch/dreamcast/dreamcast/genassym.cf       |   110 +
 sys/arch/dreamcast/dreamcast/locore.s          |  1722 +++++++++++++++++++++
 sys/arch/dreamcast/dreamcast/machdep.c         |  1241 +++++++++++++++
 sys/arch/dreamcast/dreamcast/shb.c             |   849 ++++++++++
 sys/arch/dreamcast/include/Makefile            |    14 +
 sys/arch/dreamcast/include/ansi.h              |     7 +
 sys/arch/dreamcast/include/aout_machdep.h      |     7 +
 sys/arch/dreamcast/include/asm.h               |     7 +
 sys/arch/dreamcast/include/bootinfo.h          |     7 +
 sys/arch/dreamcast/include/bswap.h             |     7 +
 sys/arch/dreamcast/include/bus.h               |     7 +
 sys/arch/dreamcast/include/cdefs.h             |     7 +
 sys/arch/dreamcast/include/coff_machdep.h      |     7 +
 sys/arch/dreamcast/include/conf.h              |    47 +
 sys/arch/dreamcast/include/cpu.h               |     7 +
 sys/arch/dreamcast/include/cpufunc.h           |     7 +
 sys/arch/dreamcast/include/cputypes.h          |     7 +
 sys/arch/dreamcast/include/db_machdep.h        |     7 +
 sys/arch/dreamcast/include/disklabel.h         |     7 +
 sys/arch/dreamcast/include/elf_machdep.h       |     7 +
 sys/arch/dreamcast/include/endian.h            |     3 +
 sys/arch/dreamcast/include/endian_machdep.h    |     4 +
 sys/arch/dreamcast/include/float.h             |     7 +
 sys/arch/dreamcast/include/frame.h             |     7 +
 sys/arch/dreamcast/include/ieee.h              |     7 +
 sys/arch/dreamcast/include/ieeefp.h            |     7 +
 sys/arch/dreamcast/include/int_types.h         |     3 +
 sys/arch/dreamcast/include/intr.h              |    39 +
 sys/arch/dreamcast/include/limits.h            |     7 +
 sys/arch/dreamcast/include/lock.h              |     4 +
 sys/arch/dreamcast/include/math.h              |     3 +
 sys/arch/dreamcast/include/mmeye.h             |    23 +
 sys/arch/dreamcast/include/param.h             |   182 ++
 sys/arch/dreamcast/include/pcb.h               |     7 +
 sys/arch/dreamcast/include/pio.h               |     7 +
 sys/arch/dreamcast/include/pmap.h              |     7 +
 sys/arch/dreamcast/include/proc.h              |     7 +
 sys/arch/dreamcast/include/profile.h           |     7 +
 sys/arch/dreamcast/include/psl.h               |     7 +
 sys/arch/dreamcast/include/pte.h               |     7 +
 sys/arch/dreamcast/include/ptrace.h            |     7 +
 sys/arch/dreamcast/include/reg.h               |     7 +
 sys/arch/dreamcast/include/segments.h          |     7 +
 sys/arch/dreamcast/include/setjmp.h            |     7 +
 sys/arch/dreamcast/include/shbvar.h            |     7 +
 sys/arch/dreamcast/include/signal.h            |     7 +
 sys/arch/dreamcast/include/stdarg.h            |     7 +
 sys/arch/dreamcast/include/trap.h              |     7 +
 sys/arch/dreamcast/include/types.h             |     7 +
 sys/arch/dreamcast/include/varargs.h           |     7 +
 sys/arch/dreamcast/include/vmparam.h           |     7 +
 sys/compat/aoutm68k/Makefile                   |    12 +
 sys/compat/aoutm68k/aoutm68k_exec.c            |    79 +
 sys/compat/aoutm68k/aoutm68k_ioctl.c           |    61 +
 sys/compat/aoutm68k/aoutm68k_misc.c            |   470 +++++
 sys/compat/aoutm68k/aoutm68k_stat.c            |   416 +++++
 sys/compat/aoutm68k/aoutm68k_stat.h            |   107 +
 sys/compat/aoutm68k/aoutm68k_syscall.h         |   822 ++++++++++
 sys/compat/aoutm68k/aoutm68k_syscallargs.h     |   612 +++++++
 sys/compat/aoutm68k/aoutm68k_syscalls.c        |   566 +++++++
 sys/compat/aoutm68k/aoutm68k_sysent.c          |   962 ++++++++++++
 sys/compat/aoutm68k/aoutm68k_util.h            |    50 +
 sys/compat/aoutm68k/files.aoutm68k             |    13 +
 sys/compat/aoutm68k/syscalls.conf              |    12 +
 sys/compat/aoutm68k/syscalls.master            |   765 +++++++++
 sys/dev/microcode/daic/Makefile                |    31 +
 sys/dev/microcode/daic/dnload.h-dist           |    42 +
 sys/dev/microcode/daic/gendnloadh              |    47 +
 sys/lib/libkern/arch/arm/Makefile.inc          |    11 +
 sys/lib/libkern/arch/arm/_memcpy.S             |   462 +++++
 sys/lib/libkern/arch/arm/bcopy.S               |    48 +
 sys/lib/libkern/arch/arm/byte_swap_2.S         |    52 +
 sys/lib/libkern/arch/arm/byte_swap_4.S         |    53 +
 sys/lib/libkern/arch/arm/bzero.S               |    44 +
 sys/lib/libkern/arch/arm/divsi3.S              |   401 +++++
 sys/lib/libkern/arch/arm/memcpy.S              |    48 +
 sys/lib/libkern/arch/arm/memmove.S             |    48 +
 sys/lib/libkern/arch/arm/memset.S              |   134 +
 sys/lkm/compat/aout/Makefile                   |    19 +
 sys/lkm/compat/aout/lkminit_emul.c             |    84 +
 sys/lkm/compat/aoutm68k/Makefile               |    21 +
 sys/lkm/compat/aoutm68k/lkminit_emul.c         |    84 +
 sys/lkm/compat/hpux/Makefile                   |    26 +
 sys/lkm/compat/hpux/lkminit_emul.c             |    69 +
 sys/lkm/compat/ibcs2/Makefile                  |    26 +
 sys/lkm/compat/ibcs2/lkminit_emul.c            |    66 +
 sys/lkm/compat/netbsd32/Makefile               |    25 +
 sys/lkm/compat/netbsd32/lkminit_emul.c         |    69 +
 sys/lkm/compat/osf1/Makefile                   |    30 +
 sys/lkm/compat/osf1/lkminit_emul.c             |    69 +
 sys/lkm/compat/ultrix/Makefile                 |    25 +
 sys/lkm/compat/ultrix/lkminit_emul.c           |    69 +
 sys/lkm/exec/Makefile                          |    42 +
 sys/lkm/exec/Makefile.inc                      |     5 +
 sys/lkm/exec/freebsd_aout/Makefile             |    16 +
 sys/lkm/exec/freebsd_aout/lkminit_exec.c       |    76 +
 sys/lkm/exec/freebsd_elf/Makefile              |    25 +
 sys/lkm/exec/freebsd_elf/lkminit_exec.c        |    80 +
 sys/lkm/exec/hpux_aout/Makefile                |    16 +
 sys/lkm/exec/hpux_aout/lkminit_exec.c          |    75 +
 sys/lkm/exec/ibcs2_coff/Makefile               |    16 +
 sys/lkm/exec/ibcs2_coff/lkminit_exec.c         |    75 +
 sys/lkm/exec/ibcs2_elf/Makefile                |    16 +
 sys/lkm/exec/ibcs2_elf/lkminit_exec.c          |    79 +
 sys/lkm/exec/ibcs2_xout/Makefile               |    16 +
 sys/lkm/exec/ibcs2_xout/lkminit_exec.c         |    74 +
 sys/lkm/exec/linux_aout/Makefile               |    16 +
 sys/lkm/exec/linux_aout/lkminit_exec.c         |    75 +
 sys/lkm/exec/linux_elf/Makefile                |    30 +
 sys/lkm/exec/linux_elf/lkminit_exec.c          |    80 +
 sys/lkm/exec/m68k4k/Makefile                   |    16 +
 sys/lkm/exec/m68k4k/lkminit_exec.c             |    73 +
 sys/lkm/exec/netbsd32_aout/Makefile            |    16 +
 sys/lkm/exec/netbsd32_aout/lkminit_exec.c      |    74 +
 sys/lkm/exec/netbsd32_elf/Makefile             |    16 +
 sys/lkm/exec/netbsd32_elf/lkminit_exec.c       |    79 +
 sys/lkm/exec/osf1_ecoff/Makefile               |    16 +
 sys/lkm/exec/osf1_ecoff/lkminit_exec.c         |    78 +
 sys/lkm/exec/sunos_aout/Makefile               |    16 +
 sys/lkm/exec/sunos_aout/lkminit_exec.c         |    73 +
 sys/lkm/exec/svr4_elf/Makefile                 |    16 +
 sys/lkm/exec/svr4_elf/lkminit_exec.c           |    79 +
 sys/lkm/exec/ultrix_ecoff/Makefile             |    21 +
 sys/lkm/exec/ultrix_ecoff/lkminit_exec.c       |    75 +
 sys/lkm/exec/vax1k/Makefile                    |    16 +
 sys/lkm/exec/vax1k/lkminit_exec.c              |    73 +
 sys/lkm/misc/Makefile                          |     8 +
 sys/lkm/misc/Makefile.inc                      |     5 +
 sys/lkm/misc/example/Makefile                  |    12 +
 sys/lkm/misc/example/README                    |    88 +
 sys/lkm/misc/example/example_misc.c            |    78 +
 sys/lkm/misc/example/lkminit_misc.c            |   188 ++
 sys/lkm/misc/example/test/Makefile             |    27 +
 sys/lkm/misc/example/test/testmisc.c           |    60 +
 sys/lkm/syscall/Makefile                       |     8 +
 sys/lkm/syscall/Makefile.inc                   |     5 +
 sys/lkm/syscall/example/Makefile               |    15 +
 sys/lkm/syscall/example/README                 |    95 +
 sys/lkm/syscall/example/example_syscall.c      |    74 +
 sys/lkm/syscall/example/lkminit_syscall.c      |   111 +
 sys/lkm/syscall/example/test/Makefile          |    27 +
 sys/lkm/syscall/example/test/testsyscall.c     |    60 +
 sys/netisdn/Makefile                           |     9 +
 sys/netisdn/i4b_cause.h                        |   149 +
 sys/netisdn/i4b_ctl.c                          |   376 ++++
 sys/netisdn/i4b_debug.h                        |   304 +++
 sys/netisdn/i4b_global.h                       |   151 +
 sys/netisdn/i4b_i4bdrv.c                       |  1049 +++++++++++++
 sys/netisdn/i4b_iframe.c                       |   292 +++
 sys/netisdn/i4b_ioctl.h                        |   698 ++++++++
 sys/netisdn/i4b_ipr.c                          |  1241 +++++++++++++++
 sys/netisdn/i4b_isdnq931.h                     |   168 ++
 sys/netisdn/i4b_isppp.c                        |   830 ++++++++++
 sys/netisdn/i4b_isppp.h                        |   251 +++
 sys/netisdn/i4b_l1l2.h                         |    96 +
 sys/netisdn/i4b_l2.c                           |   412 +++++
 sys/netisdn/i4b_l2.h                           |   360 ++++
 sys/netisdn/i4b_l2fsm.c                        |  1601 ++++++++++++++++++++
 sys/netisdn/i4b_l2fsm.h                        |    84 +
 sys/netisdn/i4b_l2if.c                         |   650 ++++++++
 sys/netisdn/i4b_l2l3.h                         |   118 +
 sys/netisdn/i4b_l2timer.c                      |   257 +++
 sys/netisdn/i4b_l3.h                           |    82 +
 sys/netisdn/i4b_l3fsm.c                        |  1047 +++++++++++++
 sys/netisdn/i4b_l3fsm.h                        |   107 +
 sys/netisdn/i4b_l3l4.h                         |   286 +++
 sys/netisdn/i4b_l3timer.c                      |   353 ++++
 sys/netisdn/i4b_l4.c                           |  1091 +++++++++++++
 sys/netisdn/i4b_l4.h                           |    73 +
 sys/netisdn/i4b_l4if.c                         |   346 ++++
 sys/netisdn/i4b_l4mgmt.c                       |   488 ++++++
 sys/netisdn/i4b_l4timer.c                      |   109 +
 sys/netisdn/i4b_lme.c                          |   163 ++
 sys/netisdn/i4b_mbuf.c                         |   242 +++
 sys/netisdn/i4b_mbuf.h                         |    57 +
 sys/netisdn/i4b_q931.c                         |   712 ++++++++
 sys/netisdn/i4b_q931.h                         |   120 +
 sys/netisdn/i4b_q932fac.c                      |   570 +++++++
 sys/netisdn/i4b_q932fac.h                      |   169 ++
 sys/netisdn/i4b_rbch.c                         |  1082 +++++++++++++
 sys/netisdn/i4b_rbch_ioctl.h                   |    55 +
 sys/netisdn/i4b_sframe.c                       |   230 ++
 sys/netisdn/i4b_tei.c                          |   333 ++++
 sys/netisdn/i4b_tel.c                          |  1899 ++++++++++++++++++++++++
 sys/netisdn/i4b_tel_ioctl.h                    |    94 +
 sys/netisdn/i4b_trace.c                        |   569 +++++++
 sys/netisdn/i4b_trace.h                        |    92 +
 sys/netisdn/i4b_uframe.c                       |   299 +++
 sys/netisdn/i4b_util.c                         |   330 ++++
 sys/netsmb/Makefile                            |     9 +
 sys/netsmb/iconv.c                             |   493 ++++++
 sys/netsmb/iconv.h                             |   175 ++
 sys/netsmb/netbios.h                           |   134 +
 sys/netsmb/smb.h                               |   387 ++++
 sys/netsmb/smb_conn.c                          |  1373 +++++++++++++++++
 sys/netsmb/smb_conn.h                          |   445 +++++
 sys/netsmb/smb_crypt.c                         |   139 +
 sys/netsmb/smb_dev.c                           |   532 ++++++
 sys/netsmb/smb_dev.h                           |   218 ++
 sys/netsmb/smb_lib.h                           |   207 ++
 sys/netsmb/smb_lock.c                          |    73 +
 sys/netsmb/smb_lock.h                          |    20 +
 sys/netsmb/smb_rap.h                           |    75 +
 sys/netsmb/smb_rq.c                            |  1050 +++++++++++++
 sys/netsmb/smb_rq.h                            |   133 +
 sys/netsmb/smb_smb.c                           |   630 +++++++
 sys/netsmb/smb_subr.c                          |   408 +++++
 sys/netsmb/smb_subr.h                          |   177 ++
 sys/netsmb/smb_tran.h                          |    89 +
 sys/netsmb/smb_trantcp.c                       |   761 +++++++++
 sys/netsmb/smb_trantcp.h                       |    99 +
 sys/netsmb/smb_usr.c                           |   479 ++++++
 sys/smbfs/Makefile                             |     8 +
 sys/smbfs/smbfs.h                              |   105 +
 sys/smbfs/smbfs_io.c                           |   677 ++++++++
 sys/smbfs/smbfs_ioctl.c                        |    63 +
 sys/smbfs/smbfs_node.c                         |   352 ++++
 sys/smbfs/smbfs_node.h                         |   102 +
 sys/smbfs/smbfs_smb.c                          |  1235 +++++++++++++++
 sys/smbfs/smbfs_subr.c                         |   337 ++++
 sys/smbfs/smbfs_subr.h                         |   184 ++
 sys/smbfs/smbfs_vfsops.c                       |   575 +++++++
 sys/smbfs/smbfs_vnops.c                        |  1405 +++++++++++++++++
 238 files changed, 48702 insertions(+), 0 deletions(-)

diffs (truncated from 49654 to 300 lines):

diff -r 2929a4f35864 -r 1467f2d863ca sys/arch/alpha/sableio/com_sableio.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/sableio/com_sableio.c      Mon Jan 08 14:56:10 2001 +0000
@@ -0,0 +1,146 @@
+/* $NetBSD: com_sableio.c,v 1.1.2.2 2001/01/08 14:56:10 bouyer Exp $ */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
+
+__KERNEL_RCSID(0, "$NetBSD: com_sableio.c,v 1.1.2.2 2001/01/08 14:56:10 bouyer Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/ioctl.h>
+#include <sys/select.h>
+#include <sys/tty.h>
+#include <sys/proc.h>
+#include <sys/user.h>
+#include <sys/conf.h>
+#include <sys/file.h>
+#include <sys/uio.h>
+#include <sys/kernel.h>
+#include <sys/syslog.h>
+#include <sys/types.h>
+#include <sys/device.h>
+
+#include <machine/intr.h>
+#include <machine/bus.h>
+
+#include <dev/ic/comreg.h>
+#include <dev/ic/comvar.h>
+
+#include <dev/pci/pcivar.h>
+#include <dev/isa/isavar.h>
+
+#include <alpha/sableio/sableiovar.h>
+
+struct com_sableio_softc {
+       struct  com_softc sc_com;       /* real "com" softc */
+
+       /* STDIO-specific goo. */
+       void    *sc_ih;                 /* interrupt handler */
+};
+
+int    com_sableio_match(struct device *, struct cfdata *, void *);
+void   com_sableio_attach(struct device *, struct device *, void *);
+void   com_sableio_cleanup(void *);
+
+struct cfattach com_sableio_ca = {
+       sizeof(struct com_sableio_softc), com_sableio_match, com_sableio_attach
+};
+
+int
+com_sableio_match(struct device *parent, struct cfdata *match, void *aux)
+{
+       struct sableio_attach_args *sa = aux;
+
+       /* Always present. */
+       if (strcmp(sa->sa_name, match->cf_driver->cd_name) == 0)
+               return (1);
+
+       return (0);
+}
+
+void
+com_sableio_attach(struct device *parent, struct device *self, void *aux)
+{
+       struct com_sableio_softc *ssc = (void *)self;
+       struct com_softc *sc = &ssc->sc_com;
+       struct sableio_attach_args *sa = aux;
+       const char *intrstr;
+
+       sc->sc_iot = sa->sa_iot;
+       sc->sc_iobase = sa->sa_ioaddr;
+
+       if (com_is_console(sc->sc_iot, sc->sc_iobase, &sc->sc_ioh) == 0 &&
+           bus_space_map(sc->sc_iot, sc->sc_iobase, COM_NPORTS, 0,
+                         &sc->sc_ioh) != 0) {
+               printf(": can't map i/o space\n");
+               return;
+       }
+
+       sc->sc_frequency = COM_FREQ;
+
+       com_attach_subr(sc);
+
+       intrstr = pci_intr_string(sa->sa_pc, sa->sa_sableirq[0]);
+       ssc->sc_ih = pci_intr_establish(sa->sa_pc, sa->sa_sableirq[0],
+           IPL_SERIAL, comintr, sc);
+       if (ssc->sc_ih == NULL) {
+               printf("%s: unable to establish interrupt",
+                   sc->sc_dev.dv_xname);
+               if (intrstr != NULL)
+                       printf(" at %s", intrstr);
+               printf("\n");
+               return;
+       }
+       printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
+
+       /*
+        * Shutdown hook for buggy BIOSs that don't recognize the UART
+        * without a disabled FIFO.
+        */
+       if (shutdownhook_establish(com_sableio_cleanup, sc) == NULL)
+               panic("com_sableio_attach: could not establish shutdown hook");
+}
+
+void
+com_sableio_cleanup(void *arg)
+{
+       struct com_softc *sc = arg;
+
+       if (ISSET(sc->sc_hwflags, COM_HW_FIFO))
+               bus_space_write_1(sc->sc_iot, sc->sc_ioh, com_fifo, 0);
+}
diff -r 2929a4f35864 -r 1467f2d863ca sys/arch/alpha/sableio/fdc_sableio.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/sableio/fdc_sableio.c      Mon Jan 08 14:56:10 2001 +0000
@@ -0,0 +1,138 @@
+/* $NetBSD: fdc_sableio.c,v 1.1.2.2 2001/01/08 14:56:10 bouyer Exp $ */
+
+/*-
+ * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
+
+__KERNEL_RCSID(0, "$NetBSD: fdc_sableio.c,v 1.1.2.2 2001/01/08 14:56:10 bouyer Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/callout.h>
+#include <sys/device.h>
+#include <sys/buf.h>
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
+#include <machine/bus.h>
+#include <machine/intr.h>
+
+#include <dev/isa/isavar.h>
+#include <dev/isa/isadmavar.h>
+
+#include <dev/isa/fdreg.h>
+#include <dev/isa/fdcvar.h>
+
+#include <dev/pci/pcivar.h>
+
+#include <alpha/sableio/sableiovar.h>
+
+int    fdc_sableio_match(struct device *, struct cfdata *, void *);
+void   fdc_sableio_attach(struct device *, struct device *, void *);
+
+struct fdc_sableio_softc {
+       struct  fdc_softc sc_fdc;       /* real "fdc" softc */
+
+       bus_space_handle_t sc_baseioh;  /* base I/O handle */
+};
+
+struct cfattach fdc_sableio_ca = {
+       sizeof(struct fdc_sableio_softc), fdc_sableio_match, fdc_sableio_attach
+};
+
+int
+fdc_sableio_match(struct device *parent, struct cfdata *match, void *aux)
+{
+       struct sableio_attach_args *sa = aux;
+
+       /* Always present. */
+       if (strcmp(sa->sa_name, match->cf_driver->cd_name) == 0)
+               return (1);
+
+       return (0);
+}
+
+void
+fdc_sableio_attach(struct device *parent, struct device *self, void *aux)
+{
+       struct fdc_softc *fdc = (void *) self;
+       struct fdc_sableio_softc *sfdc = (void *) self;
+       struct sableio_attach_args *sa = aux;
+       const char *intrstr;
+
+       printf("\n");
+
+       fdc->sc_iot = sa->sa_iot;
+       fdc->sc_ic = sa->sa_ic;
+       fdc->sc_drq = sa->sa_drq;
+
+       if (bus_space_map(fdc->sc_iot, sa->sa_ioaddr, 6 /* FDC_NPORT */, 0,
+           &sfdc->sc_baseioh)) {
+               printf("%s: unable to map I/O space\n", fdc->sc_dev.dv_xname);
+               return;
+       }
+
+       if (bus_space_subregion(fdc->sc_iot, sfdc->sc_baseioh, 2, 4,
+           &fdc->sc_ioh)) {
+               printf("%s: unable to subregion I/O space\n",
+                   fdc->sc_dev.dv_xname);
+               return;
+       }
+
+       if (bus_space_map(fdc->sc_iot, sa->sa_ioaddr + fdctl + 2, 1, 0,
+           &fdc->sc_fdctlioh)) {
+               printf("%s: unable to map CTL I/O space\n",
+                   fdc->sc_dev.dv_xname);
+               return;
+       }
+
+       intrstr = pci_intr_string(sa->sa_pc, sa->sa_sableirq[0]);
+       fdc->sc_ih = pci_intr_establish(sa->sa_pc, sa->sa_sableirq[0],
+           IPL_BIO, fdcintr, fdc);
+       if (fdc->sc_ih == NULL) {
+               printf("%s: unable to establish interrupt",
+                   fdc->sc_dev.dv_xname);
+               if (intrstr != NULL)
+                       printf(" at %s", intrstr);
+               printf("\n");
+               return;
+       }
+       printf("%s: interrupting at %s\n", fdc->sc_dev.dv_xname, intrstr);
+
+       fdcattach(fdc);
+}
diff -r 2929a4f35864 -r 1467f2d863ca sys/arch/alpha/sableio/lpt_sableio.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/sableio/lpt_sableio.c      Mon Jan 08 14:56:10 2001 +0000
@@ -0,0 +1,127 @@
+/* $NetBSD: lpt_sableio.c,v 1.1.2.2 2001/01/08 14:56:10 bouyer Exp $ */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.



Home | Main Index | Thread Index | Old Index