Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Support PowerPC 405EX/EXr.
details: https://anonhg.NetBSD.org/src/rev/2f572f909a12
branches: trunk
changeset: 753147:2f572f909a12
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Thu Mar 18 13:47:04 2010 +0000
description:
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
diffstat:
sys/arch/evbppc/conf/WALNUT | 4 +-
sys/arch/evbppc/conf/files.obs200 | 30 +-
sys/arch/evbppc/conf/files.obs405 | 21 +-
sys/arch/evbppc/conf/files.virtex | 19 +-
sys/arch/evbppc/conf/files.walnut | 20 +-
sys/arch/evbppc/conf/std.virtex | 3 +-
sys/arch/evbppc/obs405/obs200_autoconf.c | 9 +-
sys/arch/evbppc/obs405/obs200_locore.S | 4 +-
sys/arch/evbppc/obs405/obs200_machdep.c | 25 +-
sys/arch/evbppc/obs405/obs266_machdep.c | 24 +-
sys/arch/evbppc/walnut/pci/pci_machdep.c | 281 -----
sys/arch/powerpc/conf/files.ibm405gp | 21 -
sys/arch/powerpc/ibm4xx/cpu.c | 19 +-
sys/arch/powerpc/ibm4xx/dev/ecc_plb.c | 6 +-
sys/arch/powerpc/ibm4xx/dev/emacreg.h | 130 ++-
sys/arch/powerpc/ibm4xx/dev/gpio_opb.c | 3 +-
sys/arch/powerpc/ibm4xx/dev/if_emac.c | 1188 +++++++++++++----------
sys/arch/powerpc/ibm4xx/dev/if_emacvar.h | 32 +
sys/arch/powerpc/ibm4xx/dev/mal.c | 295 +++++
sys/arch/powerpc/ibm4xx/dev/malvar.h | 32 +
sys/arch/powerpc/ibm4xx/dev/opb.c | 191 ++-
sys/arch/powerpc/ibm4xx/dev/opbreg.h | 39 +-
sys/arch/powerpc/ibm4xx/dev/opbvar.h | 17 +-
sys/arch/powerpc/ibm4xx/dev/plb.c | 59 +-
sys/arch/powerpc/ibm4xx/dev/plbvar.h | 5 +-
sys/arch/powerpc/ibm4xx/dev/rgmii.c | 117 ++
sys/arch/powerpc/ibm4xx/dev/rgmiireg.h | 51 +
sys/arch/powerpc/ibm4xx/dev/rmiivar.h | 32 +
sys/arch/powerpc/ibm4xx/ibm4xx_autoconf.c | 25 +-
sys/arch/powerpc/ibm4xx/intr.c | 400 ++++++-
sys/arch/powerpc/include/cpu.h | 26 +-
sys/arch/powerpc/include/ibm4xx/amcc405ex.h | 92 +
sys/arch/powerpc/include/ibm4xx/cpu.h | 16 +-
sys/arch/powerpc/include/ibm4xx/dcr405gp.h | 206 ----
sys/arch/powerpc/include/ibm4xx/dcr405xx.h | 1250 -------------------------
sys/arch/powerpc/include/ibm4xx/dcr4xx.h | 275 +++++
sys/arch/powerpc/include/ibm4xx/ibm405gp.h | 3 +-
sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.h | 3 +-
sys/arch/powerpc/include/ibm4xx/spr.h | 3 +-
39 files changed, 2395 insertions(+), 2581 deletions(-)
diffs (truncated from 6470 to 300 lines):
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/WALNUT
--- a/sys/arch/evbppc/conf/WALNUT Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/WALNUT Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: WALNUT,v 1.45 2010/02/08 19:02:28 joerg Exp $
+# $NetBSD: WALNUT,v 1.46 2010/03/18 13:47:04 kiyohara Exp $
#
# GENERIC -- everything that's currently supported
#
@@ -39,7 +39,7 @@
options DDB # in-kernel debugger
options DDB_HISTORY_SIZE=512 # enable history editing in DDB
options TRAP_PANICWAIT
-options SYMTAB_SPACE=410000 # size for embedded symbol table
+options SYMTAB_SPACE=420000 # size for embedded symbol table
makeoptions DEBUG="-g" # compile full symbol table
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/files.obs200
--- a/sys/arch/evbppc/conf/files.obs200 Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/files.obs200 Thu Mar 18 13:47:04 2010 +0000
@@ -1,36 +1,8 @@
-# $NetBSD: files.obs200,v 1.7 2008/02/20 21:43:34 drochner Exp $
+# $NetBSD: files.obs200,v 1.8 2010/03/18 13:47:04 kiyohara Exp $
# Original Tag: files.obs405,v 1.9 2005/01/24 18:47:37 shige Exp
#
# obs200-specific configuration info
-file arch/powerpc/ibm4xx/ibm4xx_autoconf.c
-file arch/powerpc/ibm4xx/ibm40x_machdep.c
-file arch/powerpc/ibm4xx/ibm4xx_machdep.c
-file arch/powerpc/ibm4xx/intr.c
file arch/evbppc/obs405/dev/century_bios.c
-file arch/evbppc/obs405/consinit.c
file arch/evbppc/obs405/obs200_autoconf.c
file arch/evbppc/obs405/obs200_machdep.c
-file arch/evbppc/obs405/obs405_autoconf.c
-file arch/evbppc/obs405/obs405_machdep.c
-
-# Memory Disk for install kernel
-file dev/md_root.c memory_disk_hooks
-
-# Machine-independent SCSI drivers
-include "dev/scsipi/files.scsipi"
-
-# Machine-independent ATA drivers
-include "dev/ata/files.ata"
-
-#
-# Machine-independent CardBus drivers
-#
-include "dev/cardbus/files.cardbus"
-include "dev/pcmcia/files.pcmcia"
-
-file arch/evbppc/obs405/rbus_machdep.c cardbus
-
-include "dev/usb/files.usb"
-
-include "dev/ieee1394/files.ieee1394"
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/files.obs405
--- a/sys/arch/evbppc/conf/files.obs405 Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/files.obs405 Thu Mar 18 13:47:04 2010 +0000
@@ -1,15 +1,10 @@
-# $NetBSD: files.obs405,v 1.20 2008/07/04 17:31:07 kiyohara Exp $
+# $NetBSD: files.obs405,v 1.21 2010/03/18 13:47:04 kiyohara Exp $
#
# obs405-specific configuration info
file arch/powerpc/ibm4xx/ibm4xx_autoconf.c
file arch/powerpc/ibm4xx/ibm40x_machdep.c
file arch/powerpc/ibm4xx/ibm4xx_machdep.c
-file arch/powerpc/ibm4xx/intr.c
-file arch/powerpc/ibm4xx/openbios/openbios.c
-file arch/evbppc/obs405/consinit.c
-file arch/evbppc/obs405/obs266_autoconf.c
-file arch/evbppc/obs405/obs266_machdep.c
file arch/evbppc/obs405/obs405_autoconf.c
file arch/evbppc/obs405/obs405_machdep.c
@@ -21,17 +16,3 @@
# Machine-independent ATA drivers
include "dev/ata/files.ata"
-
-#
-# Machine-independent CardBus drivers
-#
-include "dev/cardbus/files.cardbus"
-include "dev/pcmcia/files.pcmcia"
-
-file arch/evbppc/obs405/rbus_machdep.c cardbus
-
-include "dev/usb/files.usb"
-
-include "dev/ieee1394/files.ieee1394"
-
-include "dev/bluetooth/files.bluetooth"
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/files.virtex
--- a/sys/arch/evbppc/conf/files.virtex Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/files.virtex Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.virtex,v 1.3 2008/02/20 21:43:34 drochner Exp $
+# $NetBSD: files.virtex,v 1.4 2010/03/18 13:47:04 kiyohara Exp $
#
# Xilinx Virtex specific configuration
@@ -10,8 +10,6 @@
defparam opt_xintc.h DCR_XINTC_BASE
defparam opt_cons.h CONADDR CONSDEV
-file arch/powerpc/ibm4xx/intr.c
-
file arch/evbppc/virtex/autoconf.c
file arch/evbppc/virtex/consinit.c
file arch/evbppc/virtex/machdep.c
@@ -20,14 +18,9 @@
file arch/evbppc/virtex/design_gsrd1.c design_gsrd1
file arch/evbppc/virtex/design_gsrd2.c design_gsrd2 | design_dfc
-# Board Properties
-file arch/powerpc/ibm4xx/board_prop.c
-
# Memory Disk for install kernel
file dev/md_root.c memory_disk_hooks
-# FPU emulation
-include "arch/powerpc/fpu/files.fpu"
# MI drivers
include "dev/pckbport/files.pckbport"
@@ -37,16 +30,6 @@
define plbus { } # PLB
define xcvbus { } # generic
-# Processor Local Bus XXX files.ibm4xx
-device plb { [irq = -1] }
-attach plb at root
-file arch/powerpc/ibm4xx/dev/plb.c plb
-
-# Processor XXX files.ibm4xx
-device cpu { }
-attach cpu at plb
-file arch/powerpc/ibm4xx/cpu.c
-
# Effective mainbus
device xcvbus: xcvbus, plbus, llbus
attach xcvbus at plb
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/files.walnut
--- a/sys/arch/evbppc/conf/files.walnut Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/files.walnut Thu Mar 18 13:47:04 2010 +0000
@@ -1,39 +1,21 @@
-# $NetBSD: files.walnut,v 1.15 2008/02/20 21:43:34 drochner Exp $
+# $NetBSD: files.walnut,v 1.16 2010/03/18 13:47:04 kiyohara Exp $
#
# walnut-specific configuration info
file arch/evbppc/walnut/autoconf.c
file arch/evbppc/walnut/consinit.c
file arch/evbppc/walnut/machdep.c
-file arch/powerpc/ibm4xx/intr.c
file arch/powerpc/ibm4xx/ibm4xx_autoconf.c
# Memory Disk for install kernel
file dev/md_root.c memory_disk_hooks
-# Machine-independent I2O drivers.
-include "dev/i2o/files.i2o"
-
# Machine-independent SCSI drivers
include "dev/scsipi/files.scsipi"
# Machine-independent ATA drivers
include "dev/ata/files.ata"
-# PCI bus support
-include "dev/pci/files.pci"
-
-# On-chip PCI bridge
-#
-# XXX: Move these to a 405gp-specific file and re-think the
-# layout of the powerpc/ibm4xx hierarchy to accommodate SoCs.
-#
-device pchb : pcibus
-attach pchb at plb
-file arch/evbppc/walnut/pci/pchb.c pchb
-file arch/evbppc/walnut/pci/pci_machdep.c pci
-file arch/powerpc/ibm4xx/dev/ibm405gp.c
-
# Off-chip peripheral bus
device pbus {[addr=-1], [irq=-1]}
attach pbus at plb
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/conf/std.virtex
--- a/sys/arch/evbppc/conf/std.virtex Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/conf/std.virtex Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.virtex,v 1.1 2006/12/02 22:18:47 freza Exp $
+# $NetBSD: std.virtex,v 1.2 2010/03/18 13:47:04 kiyohara Exp $
#
# Standard/required options for NetBSD/virtex.
@@ -21,4 +21,5 @@
options KERNBASE=0x25000
options INTSTK=16384
+include "arch/powerpc/conf/files.ibm4xx"
include "arch/evbppc/conf/files.virtex"
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/obs405/obs200_autoconf.c
--- a/sys/arch/evbppc/obs405/obs200_autoconf.c Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/obs405/obs200_autoconf.c Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obs200_autoconf.c,v 1.4 2006/10/07 14:59:53 tsutsui Exp $ */
+/* $NetBSD: obs200_autoconf.c,v 1.5 2010/03/18 13:47:04 kiyohara Exp $ */
/*
* Copyright 2004 Shigeyuki Fukushima.
@@ -33,14 +33,17 @@
* DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.4 2006/10/07 14:59:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.5 2010/03/18 13:47:04 kiyohara Exp $");
#include <sys/systm.h>
#include <sys/device.h>
#include <machine/obs200.h>
-#include <powerpc/ibm4xx/dcr405gp.h>
+#include <powerpc/ibm4xx/cpu.h>
+#include <powerpc/ibm4xx/dcr4xx.h>
+
+#include <dev/ic/comreg.h>
/*
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/obs405/obs200_locore.S
--- a/sys/arch/evbppc/obs405/obs200_locore.S Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/obs405/obs200_locore.S Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obs200_locore.S,v 1.8 2010/02/25 23:33:44 matt Exp $ */
+/* $NetBSD: obs200_locore.S,v 1.9 2010/03/18 13:47:04 kiyohara Exp $ */
/* Original Tag: locore.S,v 1.1 2003/09/23 15:21:58 shige Exp */
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
@@ -90,7 +90,7 @@
#include <powerpc/spr.h>
#include <powerpc/ibm4xx/spr.h>
-#include <powerpc/ibm4xx/dcr405gp.h>
+#include <powerpc/ibm4xx/dcr4xx.h>
#include <powerpc/ibm4xx/pmap.h>
/* Function pointer for requesting board_config_data from OpenBlockS S/R BIOS */
diff -r d3f7c86850db -r 2f572f909a12 sys/arch/evbppc/obs405/obs200_machdep.c
--- a/sys/arch/evbppc/obs405/obs200_machdep.c Thu Mar 18 13:45:54 2010 +0000
+++ b/sys/arch/evbppc/obs405/obs200_machdep.c Thu Mar 18 13:47:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obs200_machdep.c,v 1.10 2010/02/25 23:33:44 matt Exp $ */
+/* $NetBSD: obs200_machdep.c,v 1.11 2010/03/18 13:47:04 kiyohara Exp $ */
/* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp */
/*
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.10 2010/02/25 23:33:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.11 2010/03/18 13:47:04 kiyohara Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -92,8 +92,9 @@
#include <machine/century_bios.h>
#include <powerpc/spr.h>
#include <powerpc/ibm4xx/spr.h>
-#include <powerpc/ibm4xx/dcr405gp.h>
-
+#include <powerpc/ibm4xx/dcr4xx.h>
+#include <powerpc/ibm4xx/ibm405gp.h>
+#include <powerpc/ibm4xx/dev/comopbvar.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pciconf.h>
@@ -127,7 +128,7 @@
u_int memsize;
/* Disable all external interrupts */
- mtdcr(DCR_UIC0_ER, 0);
+ mtdcr(DCR_UIC0_BASE + DCR_UIC_ER, 0);
pllmode = mfdcr(DCR_CPC0_PLLMR);
psr = mfdcr(DCR_CPC0_PSR);
@@ -305,6 +306,17 @@
}
int
+pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
+{
+
+ /*
Home |
Main Index |
Thread Index |
Old Index