Source-Changes-HG archive

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

[src/trunk]: src/sys/arch adapted to new interrupt code and shb changes.



details:   https://anonhg.NetBSD.org/src/rev/588183787592
branches:  trunk
changeset: 524365:588183787592
user:      uch <uch%NetBSD.org@localhost>
date:      Sun Mar 24 18:21:08 2002 +0000

description:
adapted to new interrupt code and shb changes.

diffstat:

 sys/arch/dreamcast/conf/files.shbus     |   39 -
 sys/arch/dreamcast/dev/g2/g2bus.c       |    4 +-
 sys/arch/dreamcast/dev/g2/g2busvar.h    |    4 +-
 sys/arch/dreamcast/dev/g2/gapspci_pci.c |   12 +-
 sys/arch/dreamcast/dev/gdrom.c          |   17 +-
 sys/arch/dreamcast/dev/maple/maple.c    |    7 +-
 sys/arch/dreamcast/dev/pvr.c            |    8 +-
 sys/arch/dreamcast/dreamcast/autoconf.c |    3 +-
 sys/arch/dreamcast/dreamcast/locore.S   |   78 +---
 sys/arch/dreamcast/dreamcast/machdep.c  |   38 +-
 sys/arch/dreamcast/dreamcast/shb.c      |  630 ----------------------------
 sys/arch/dreamcast/dreamcast/sysasic.c  |  151 ++----
 sys/arch/dreamcast/include/Makefile     |    6 +-
 sys/arch/dreamcast/include/intr.h       |   92 ++-
 sys/arch/dreamcast/include/shbvar.h     |    7 -
 sys/arch/dreamcast/include/sysasicvar.h |   16 +-
 sys/arch/evbsh3/conf/COMPUTEX7750       |  100 +----
 sys/arch/evbsh3/conf/COMPUTEXEVB        |  140 +------
 sys/arch/evbsh3/conf/CQREEKSH3          |  125 +-----
 sys/arch/evbsh3/conf/KZSH401            |  103 +----
 sys/arch/evbsh3/conf/files.shbus        |   71 ---
 sys/arch/evbsh3/evbsh3/autoconf.c       |    3 +-
 sys/arch/evbsh3/evbsh3/locore.S         |   78 +---
 sys/arch/evbsh3/evbsh3/machdep.c        |  104 ++++-
 sys/arch/evbsh3/evbsh3/shb.c            |  705 --------------------------------
 sys/arch/evbsh3/include/Makefile        |    4 +-
 sys/arch/evbsh3/include/intr.h          |   92 ++-
 sys/arch/evbsh3/include/shbvar.h        |    7 -
 sys/arch/hpcsh/conf/files.shbus         |   35 -
 sys/arch/hpcsh/dev/hd64461/hd64461.c    |   15 +-
 sys/arch/hpcsh/dev/hd64465/hd64465.c    |    9 +-
 sys/arch/hpcsh/hpcsh/autoconf.c         |    3 +-
 sys/arch/hpcsh/hpcsh/locore.S           |   76 +---
 sys/arch/hpcsh/hpcsh/machdep.c          |   54 +-
 sys/arch/hpcsh/hpcsh/shb.c              |  501 ----------------------
 sys/arch/hpcsh/include/Makefile         |    4 +-
 sys/arch/hpcsh/include/intr.h           |   91 ++-
 sys/arch/hpcsh/include/shbvar.h         |    7 -
 sys/arch/mmeye/conf/GENERIC             |   17 +-
 sys/arch/mmeye/conf/files.shbus         |   61 --
 sys/arch/mmeye/include/intr.h           |   93 ++-
 sys/arch/mmeye/include/mmeye.h          |   13 +-
 sys/arch/mmeye/include/shbvar.h         |    3 -
 sys/arch/mmeye/mmeye/locore.S           |   86 +---
 sys/arch/mmeye/mmeye/machdep.c          |  154 ++++--
 sys/arch/mmeye/mmeye/shb.c              |  634 ----------------------------
 46 files changed, 637 insertions(+), 3863 deletions(-)

diffs (truncated from 5460 to 300 lines):

diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/conf/files.shbus
--- a/sys/arch/dreamcast/conf/files.shbus       Sun Mar 24 18:15:03 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#      $NetBSD: files.shbus,v 1.6 2002/03/03 14:27:24 uch Exp $
-#
-# Config file and device description for machine-independent SHBus code.
-# Included by ports that need it.  Requires that the SCSI files be
-# defined first.
-
-# ports should specify appropriate major numbers for the following
-# devices:
-#      mcd, scd, wd, wt
-
-device shb {[port = -1], [size = 0],
-            [iomem = -1], [iosiz = 0],
-            [irq = -1], [drq = -1], [drq2 = -1]}
-attach shb at mainbus
-
-file arch/dreamcast/dreamcast/shb.c            shb needs-flag
-file arch/dreamcast/dreamcast/sysasic.c                shb
-
-# Misc devices
-
-device wdog
-attach wdog at shb
-file   arch/sh3/dev/wdog.c             wdog    needs-flag
-
-#
-# Serial drivers
-#
-
-defflag        opt_sci.h       SCICONSOLE
-defparam opt_sci.h     SCICN_SPEED
-device sci: tty
-attach sci at shb
-file   arch/sh3/dev/sci.c              sci needs-flag
-
-defflag        opt_scif.h      SCIFCONSOLE
-defparam opt_scif.h    SCIFCN_SPEED
-device scif: tty
-attach scif at shb
-file   arch/sh3/dev/scif.c             scif needs-flag
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/g2/g2bus.c
--- a/sys/arch/dreamcast/dev/g2/g2bus.c Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/g2/g2bus.c Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: g2bus.c,v 1.1 2001/01/31 18:33:24 thorpej Exp $        */
+/*     $NetBSD: g2bus.c,v 1.2 2002/03/24 18:21:24 uch Exp $    */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -55,12 +55,10 @@
 int
 g2busmatch(struct device *parent, struct cfdata *cf, void *aux)
 {
-       struct shb_attach_args *sa = aux;
 
        if (strcmp("g2bus", cf->cf_driver->cd_name))
                return (0);
 
-       sa->ia_iosize = 0 /* */;
         return (1);
 }
 
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/g2/g2busvar.h
--- a/sys/arch/dreamcast/dev/g2/g2busvar.h      Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/g2/g2busvar.h      Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: g2busvar.h,v 1.1 2001/01/31 18:33:24 thorpej Exp $     */
+/*     $NetBSD: g2busvar.h,v 1.2 2002/03/24 18:21:24 uch Exp $ */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -35,7 +35,7 @@
 #ifndef _DREAMCAST_G2BUSVAR_H_
 #define _DREAMCAST_G2BUSVAR_H_
 
-#include <sh3/shbvar.h>
+#include <machine/bus.h>
 
 /*
  * G2 driver attach arguments
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/g2/gapspci_pci.c
--- a/sys/arch/dreamcast/dev/g2/gapspci_pci.c   Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/g2/gapspci_pci.c   Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gapspci_pci.c,v 1.2 2001/04/24 19:43:25 marcus Exp $   */
+/*     $NetBSD: gapspci_pci.c,v 1.3 2002/03/24 18:21:24 uch Exp $      */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt.
@@ -46,7 +46,6 @@
  
 #include <machine/cpu.h>
 #include <machine/bus.h>
-#include <machine/shbvar.h>
 #include <machine/sysasicvar.h>
 
 #include <dev/pci/pcivar.h>
@@ -165,8 +164,7 @@
 gaps_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
 {
 
-       /* We interrupt at the CPU's irq 11. */
-       *ihp = 11;
+       *ihp = SYSASIC_EVENT_EXT;
        return (0);
 }
 
@@ -174,15 +172,15 @@
 gaps_intr_string(void *v, pci_intr_handle_t ih)
 {
 
-       return ("SH4 irq 11");
+       return ("SH4 IRL 11");
 }
 
 void *
 gaps_intr_establish(void *v, pci_intr_handle_t ih, int level,
     int (*func)(void *), void *arg)
 {
-       return sysasic_intr_establish(ih, SYSASIC_EVENT_EXT,
-                                     level, func, arg);
+
+       return (sysasic_intr_establish(ih, func, arg));
 }
 
 void
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/gdrom.c
--- a/sys/arch/dreamcast/dev/gdrom.c    Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/gdrom.c    Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gdrom.c,v 1.6 2001/12/04 15:27:37 atatat Exp $ */
+/*     $NetBSD: gdrom.c,v 1.7 2002/03/24 18:21:23 uch Exp $    */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -36,10 +36,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
-#include <sys/kernel.h>
 #include <sys/device.h>
-#include <sys/malloc.h>
-#include <sys/conf.h>
 
 #include <sys/buf.h>
 #include <sys/ioctl.h>
@@ -49,11 +46,6 @@
 #include <sys/cdio.h>
 #include <sys/proc.h>
 
-#include <machine/conf.h>
-#include <machine/cpu.h>
-#include <machine/bus.h>
-
-#include <machine/shbvar.h>
 #include <machine/sysasicvar.h>
 
 int    gdrommatch __P((struct device *, struct cfdata *, void *));
@@ -380,13 +372,12 @@
        void *auxp;
 {
        static int gdrom_matched = 0;
-       struct shb_attach_args *sa = auxp;
 
        /* Allow only once instance. */
        if (strcmp("gdrom", cfp->cf_driver->cd_name) || gdrom_matched)
                return(0);
        gdrom_matched = 1;
-       sa->ia_iosize = 0 /* 0x100 */;
+
        return(1);
 }
 
@@ -401,7 +392,7 @@
 
        BUFQ_INIT(&sc->bufq);
 
-       printf("\n");
+       printf(": SH4 IRL 9\n");
 
        /*
         * Initialize and attach the disk structure.
@@ -421,7 +412,7 @@
            x = ((volatile u_int32_t *)0xa0000000)[p];
        }
 
-       sysasic_intr_establish(9, SYSASIC_EVENT_GDROM, 0, gdrom_intr, sc);
+       sysasic_intr_establish(SYSASIC_EVENT_GDROM, gdrom_intr, sc);
 }
 
 int
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/maple/maple.c
--- a/sys/arch/dreamcast/dev/maple/maple.c      Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/maple/maple.c      Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: maple.c,v 1.10 2001/12/04 15:27:35 atatat Exp $        */
+/*     $NetBSD: maple.c,v 1.11 2002/03/24 18:21:25 uch Exp $   */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -45,16 +45,15 @@
 
 #include <machine/cpu.h>
 #include <machine/bus.h>
-#include <sh3/shbvar.h>
 #include <sh3/pmap.h>
 
-
 #include <dreamcast/dev/maple/maple.h>
 #include <dreamcast/dev/maple/mapleconf.h>
 #include <dreamcast/dev/maple/maplevar.h>
 #include <dreamcast/dev/maple/maplereg.h>
 #include <dreamcast/dev/maple/mapleio.h>
 
+#include "locators.h"
 
 /* Internal macros, functions, and variables. */
 
@@ -111,12 +110,10 @@
        struct cfdata *cf;
        void *aux;
 {
-       struct shb_attach_args *sa = aux;
 
        if (strcmp("maple", cf->cf_driver->cd_name))
          return (0);
 
-       sa->ia_iosize = 0 /* 0x100 */;
        return (1);
 }
 
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dev/pvr.c
--- a/sys/arch/dreamcast/dev/pvr.c      Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dev/pvr.c      Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pvr.c,v 1.10 2002/03/17 19:40:36 atatat Exp $  */
+/*     $NetBSD: pvr.c,v 1.11 2002/03/24 18:21:23 uch Exp $     */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt.
@@ -65,7 +65,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.10 2002/03/17 19:40:36 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.11 2002/03/24 18:21:23 uch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,8 +91,6 @@
 #include <dreamcast/dev/pvrvar.h>
 #include <dreamcast/dev/maple/mkbdvar.h>
 
-#include <sh3/shbvar.h>
-
 #include "mkbd.h"
 
 struct fb_devconfig {
@@ -172,12 +170,10 @@
 int
 pvr_match(struct device *parent, struct cfdata *match, void *aux)
 {
-       struct shb_attach_args *sa = aux;
 
        if (strcmp("pvr", match->cf_driver->cd_name) != 0)
                return (0);
 
-       sa->ia_iosize = 0; /* 0x1400 */;
        return (1);
 }
 
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dreamcast/autoconf.c
--- a/sys/arch/dreamcast/dreamcast/autoconf.c   Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dreamcast/autoconf.c   Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.3 2002/03/08 13:22:11 uch Exp $ */
+/*     $NetBSD: autoconf.c,v 1.4 2002/03/24 18:21:10 uch Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -43,6 +43,7 @@
 {
        /* Start configuration */
        splhigh();
+       softintr_init();
 
        if (config_rootfound("mainbus", NULL) == NULL)
                panic("no mainbus found");
diff -r e4d9a7cf7be7 -r 588183787592 sys/arch/dreamcast/dreamcast/locore.S
--- a/sys/arch/dreamcast/dreamcast/locore.S     Sun Mar 24 18:15:03 2002 +0000
+++ b/sys/arch/dreamcast/dreamcast/locore.S     Sun Mar 24 18:21:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.3 2002/03/17 14:05:10 uch Exp $   */
+/*     $NetBSD: locore.S,v 1.4 2002/03/24 18:21:10 uch Exp $   */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.



Home | Main Index | Thread Index | Old Index