Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint - use options PIC_MPCSOC to replace PIC_O...



details:   https://anonhg.NetBSD.org/src/rev/7c5314e3ad6a
branches:  trunk
changeset: 746742:7c5314e3ad6a
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Wed Aug 19 06:28:06 2009 +0000

description:
- use options PIC_MPCSOC to replace PIC_OPENPIC.

diffstat:

 sys/arch/sandpoint/conf/ENCPP1          |   5 ++-
 sys/arch/sandpoint/conf/GENERIC         |  25 ++---------------
 sys/arch/sandpoint/conf/SANDPOINT       |   5 ++-
 sys/arch/sandpoint/conf/std.sandpoint   |   5 +--
 sys/arch/sandpoint/include/openpicreg.h |  14 +---------
 sys/arch/sandpoint/sandpoint/machdep.c  |  46 +++++++-------------------------
 6 files changed, 22 insertions(+), 78 deletions(-)

diffs (230 lines):

diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/conf/ENCPP1
--- a/sys/arch/sandpoint/conf/ENCPP1    Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/conf/ENCPP1    Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ENCPP1,v 1.5 2008/11/24 11:41:14 ad Exp $
+# $NetBSD: ENCPP1,v 1.6 2009/08/19 06:28:06 nisimura Exp $
 #
 # Ampro EnCorePP1 machine description file
 # 
@@ -19,10 +19,11 @@
 # device.
 
 include        "arch/sandpoint/conf/std.sandpoint"
+options        PIC_I8259
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "ENCPP1-$Revision: 1.5 $"
+#ident                 "ENCPP1-$Revision: 1.6 $"
 
 maxusers       32
 
diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/conf/GENERIC
--- a/sys/arch/sandpoint/conf/GENERIC   Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/conf/GENERIC   Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.43 2009/01/24 05:06:07 mrg Exp $
+# $NetBSD: GENERIC,v 1.44 2009/08/19 06:28:06 nisimura Exp $
 #
 # GENERIC machine description file
 # 
@@ -19,10 +19,11 @@
 # device.
 
 include        "arch/sandpoint/conf/std.sandpoint"
+options        PIC_I8259
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.43 $"
+#ident                 "GENERIC-$Revision: 1.44 $"
 
 maxusers       32
 
@@ -238,32 +239,12 @@
 com1   at isa? port 0x2f8 irq 3
 
 #lpt0  at isa? port 0x278 irq 7        # standard PC parallel ports
-
 #fdc0  at isa? port 0x3f0 irq 6 drq 2  # standard PC floppy controllers
 #fd*   at fdc? drive ?                 # the drives themselves
 
-#adw*  at pci? dev ? function ?        # AdvanSys 9x0UW[D], 3940U[2,3]W SCSI
-#dpt*  at pci? dev ? function ?        # DPT SmartCache/SmartRAID
-siop*  at pci? dev ? function ?        # NCR/Symbios 53c8xx SCSI
-
-#scsibus* at adw?
-#scsibus* at dpt?
-scsibus* at siop?
 scsibus* at umass?
 
 sd*    at scsibus? target ? lun ?      # SCSI disk drives
-#st*   at scsibus? target ? lun ?      # SCSI tape drives
-#cd*   at scsibus? target ? lun ?      # SCSI CD-ROM drives
-#ch*   at scsibus? target ? lun ?      # SCSI autochangers
-#ses*  at scsibus? target ? lun ?      # SCSI Enclosure Services devices
-#ss*   at scsibus? target ? lun ?      # SCSI scanners
-#uk*   at scsibus? target ? lun ?      # SCSI unknown
-
-#atapibus* at atapi?
-#cd*   at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
-#sd*   at atapibus? drive ? flags 0x0000       # ATAPI disk drives
-#st*   at atapibus? drive ? flags 0x0000       # ATAPI tape drives
-#uk*   at atapibus? drive ? flags 0x0000       # ATAPI unknown
 
 # Veriexec
 #
diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/conf/SANDPOINT
--- a/sys/arch/sandpoint/conf/SANDPOINT Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/conf/SANDPOINT Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: SANDPOINT,v 1.4 2008/11/24 11:41:14 ad Exp $
+# $NetBSD: SANDPOINT,v 1.5 2009/08/19 06:28:06 nisimura Exp $
 #
 # Sandpoint X3/X2 machine description file
 # 
@@ -19,10 +19,11 @@
 # device.
 
 include        "arch/sandpoint/conf/std.sandpoint"
+options        PIC_I8259
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "SANDPOINT-$Revision: 1.4 $"
+#ident                 "SANDPOINT-$Revision: 1.5 $"
 
 maxusers       32
 
diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/conf/std.sandpoint
--- a/sys/arch/sandpoint/conf/std.sandpoint     Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/conf/std.sandpoint     Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: std.sandpoint,v 1.13 2007/10/27 15:36:29 nisimura Exp $
+#      $NetBSD: std.sandpoint,v 1.14 2009/08/19 06:28:06 nisimura Exp $
 #
 # standard, required NetBSD/sandpoint 'options'
 
@@ -12,8 +12,7 @@
 options        EXEC_ELF32      # exec ELF binaries
 options        EXEC_SCRIPT     # exec #! scripts
 
-options        PIC_OPENPIC
-options        PIC_I8259
+options        PIC_MPCSOC
 
 options        INTSTK=0x2000
 
diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/include/openpicreg.h
--- a/sys/arch/sandpoint/include/openpicreg.h   Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/include/openpicreg.h   Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openpicreg.h,v 1.4 2007/10/17 19:56:56 garbled Exp $   */
+/*     $NetBSD: openpicreg.h,v 1.5 2009/08/19 06:28:06 nisimura Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,16 +35,4 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
- * This file provides an interface between OPENPIC code and
- * MPC107/MPC824x EPIC register definition.  Consult machdep.c
- * to see EPIC register location.
- */
-
-/* XXX XXX XXX */
-extern unsigned epicsteer[];
-
-#define OPENPIC_SRC_VECTOR(irq)                (epicsteer[(irq)])
-#define OPENPIC_IDEST(irq)             (epicsteer[(irq)] + 0x10)
-
 #include <powerpc/openpicreg.h>
diff -r 5b1fd922cadd -r 7c5314e3ad6a sys/arch/sandpoint/sandpoint/machdep.c
--- a/sys/arch/sandpoint/sandpoint/machdep.c    Wed Aug 19 06:22:54 2009 +0000
+++ b/sys/arch/sandpoint/sandpoint/machdep.c    Wed Aug 19 06:28:06 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.47 2009/07/03 10:35:31 nisimura Exp $    */
+/*     $NetBSD: machdep.c,v 1.48 2009/08/19 06:28:07 nisimura Exp $    */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,12 +32,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2009/07/03 10:35:31 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48 2009/08/19 06:28:07 nisimura Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_ipkdb.h"
 #include "opt_modular.h"
+#include "opt_interrupt.h"
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -239,16 +240,20 @@
         */
        baseaddr = (void *)(SANDPOINT_BUS_SPACE_EUMB + 0x40000);
        pic_init();
+
+#ifdef PIC_I8259
        isa_pic = setup_i8259();
-       (void)setup_openpic(baseaddr, 0);
+       (void)setup_mpcpic(baseaddr);
        primary_pic = 1;
-
-#if (NPCIB > 0)
        /*
         * set up i8259 as a cascade on EPIC irq 0.
         * XXX exceptional SP2 has 17
         */
        intr_establish(16, IST_LEVEL, IPL_NONE, pic_handle_intr, isa_pic);
+#else
+       mpcpic_reserv16();
+       (void)setup_mpcpic(baseaddr);
+       primary_pic = 0;
 #endif
 
        oea_install_extint(pic_ext_intr);
@@ -489,37 +494,6 @@
        return (end + 1); /* recongize this as the amount of SDRAM */
 }
 
-/* XXX needs to make openpic.c implementation-neutral XXX */
-
-unsigned epicsteer[] = {
-       0x10200,        /* external irq 0 direct/serial */
-       0x10220,        /* external irq 1 direct/serial */
-       0x10240,        /* external irq 2 direct/serial */
-       0x10260,        /* external irq 3 direct/serial */
-       0x10280,        /* external irq 4 direct/serial */
-       0x102a0,        /* external irq 5 serial mode */
-       0x102c0,        /* external irq 6 serial mode */
-       0x102e0,        /* external irq 7 serial mode */
-       0x10300,        /* external irq 8 serial mode */
-       0x10320,        /* external irq 9 serial mode */
-       0x10340,        /* external irq 10 serial mode */
-       0x10360,        /* external irq 11 serial mode */
-       0x10380,        /* external irq 12 serial mode */
-       0x103a0,        /* external irq 13 serial mode */
-       0x103c0,        /* external irq 14 serial mode */
-       0x103e0,        /* external irq 15 serial mode */
-       0x11020,        /* I2C */
-       0x11040,        /* DMA 0 */
-       0x11060,        /* DMA 1 */
-       0x110c0,        /* MU/I2O */
-       0x01120,        /* Timer 0 */
-       0x01160,        /* Timer 1 */
-       0x011a0,        /* Timer 2 */
-       0x011e0,        /* Timer 3 */
-       0x11120,        /* DUART 0, MPC8245 */
-       0x11140,        /* DUART 1, MPC8245 */
-};
-
 /* XXX XXX debug purpose only XXX XXX */
 
 static dev_type_cninit(kcomcninit);



Home | Main Index | Thread Index | Old Index