Module Name: src
Committed By: kiyohara
Date: Thu Mar 18 13:58:38 UTC 2010
Modified Files:
src/sys/arch/powerpc/conf: files.ibm4xx
src/sys/arch/powerpc/ibm4xx/openbios: locore.S
src/sys/arch/powerpc/ibm4xx/pci: pci_machdep.c
src/sys/arch/powerpc/powerpc: bus_space.c
Log Message:
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/.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/conf/files.ibm4xx
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/ibm4xx/openbios/locore.S
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/powerpc/bus_space.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/conf/files.ibm4xx
diff -u src/sys/arch/powerpc/conf/files.ibm4xx:1.10 src/sys/arch/powerpc/conf/files.ibm4xx:1.11
--- src/sys/arch/powerpc/conf/files.ibm4xx:1.10 Mon Mar 13 15:31:11 2006
+++ src/sys/arch/powerpc/conf/files.ibm4xx Thu Mar 18 13:58:38 2010
@@ -1,9 +1,12 @@
-# $NetBSD: files.ibm4xx,v 1.10 2006/03/13 15:31:11 shige Exp $
+# $NetBSD: files.ibm4xx,v 1.11 2010/03/18 13:58:38 kiyohara Exp $
#
# IBM 4xx specific configuration info
include "arch/powerpc/fpu/files.fpu"
+defflag opt_uic.h MULTIUIC
+file arch/powerpc/ibm4xx/intr.c
+
# Board Properties
file arch/powerpc/ibm4xx/board_prop.c
@@ -37,9 +40,32 @@
# On-chip ethernet device(s)
device emac: ether, ifnet, arp, mii
attach emac at opb
-file arch/powerpc/ibm4xx/dev/if_emac.c emac
+file arch/powerpc/ibm4xx/dev/if_emac.c emac needs-flag
+file arch/powerpc/ibm4xx/dev/mal.c emac
+defflag opt_emac.h EMAC_ZMII_PHY EMAC_RGMII_PHY
+#file arch/powerpc/ibm4xx/dev/zmii.c emac_zmii_phy
+file arch/powerpc/ibm4xx/dev/rgmii.c emac_rgmii_phy
# Watchdog timer
device wdog: sysmon_wdog
attach wdog at opb
file arch/powerpc/ibm4xx/dev/wdog.c wdog
+
+
+# Machine-independent I2O drivers.
+include "dev/i2o/files.i2o"
+
+# PCI bus support
+include "dev/pci/files.pci"
+
+# On-chip PCI bridge
+device pchb : pcibus
+attach pchb at plb
+file arch/powerpc/ibm4xx/pci/pchb.c pchb
+file arch/powerpc/ibm4xx/pci/pci_machdep.c pci
+file arch/powerpc/ibm4xx/dev/ibm405gp.c pchb | pci
+
+# On-chip IIC controller
+device gpiic: i2cbus, i2c_bitbang
+attach gpiic at opb
+file arch/powerpc/ibm4xx/dev/gpiic_opb.c gpiic
Index: src/sys/arch/powerpc/ibm4xx/openbios/locore.S
diff -u src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.7 src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.8
--- src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.7 Thu Feb 25 23:31:47 2010
+++ src/sys/arch/powerpc/ibm4xx/openbios/locore.S Thu Mar 18 13:58:38 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.7 2010/02/25 23:31:47 matt Exp $ */
+/* $NetBSD: locore.S,v 1.8 2010/03/18 13:58:38 kiyohara 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/pmap.h>
-#include <powerpc/ibm4xx/dcr405gp.h>
+#include <powerpc/ibm4xx/dcr4xx.h>
/* Function pointer for requesting board_config_data from openbios*/
#define BOARD_CFG_FP 0xFFFE0B50
Index: src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.6 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.7
--- src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.6 Fri May 30 19:26:35 2008
+++ src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c Thu Mar 18 13:58:38 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.6 2008/05/30 19:26:35 ad Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.7 2010/03/18 13:58:38 kiyohara Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.6 2008/05/30 19:26:35 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.7 2010/03/18 13:58:38 kiyohara Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -100,17 +100,6 @@
#endif
}
-int
-pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
-{
-
- /*
- * Bus number is irrelevant. Configuration Mechanism 1 is in
- * use, can have devices 0-32 (i.e. the `normal' range).
- */
- return 31;
-}
-
pcitag_t
pci_make_tag(pci_chipset_tag_t pc, int bus, int device, int function)
{
Index: src/sys/arch/powerpc/powerpc/bus_space.c
diff -u src/sys/arch/powerpc/powerpc/bus_space.c:1.21 src/sys/arch/powerpc/powerpc/bus_space.c:1.22
--- src/sys/arch/powerpc/powerpc/bus_space.c:1.21 Thu Feb 25 23:31:48 2010
+++ src/sys/arch/powerpc/powerpc/bus_space.c Thu Mar 18 13:58:38 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.c,v 1.21 2010/02/25 23:31:48 matt Exp $ */
+/* $NetBSD: bus_space.c,v 1.22 2010/03/18 13:58:38 kiyohara Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.21 2010/02/25 23:31:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.22 2010/03/18 13:58:38 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -660,12 +660,22 @@
#endif /* defined (PPC_OEA) || defined(PPC_OEA601) */
bpa = pa - t->pbs_offset;
+#ifdef PPC_IBM4XX
+ /*
+ * XXX: Temporary kludge.
+ * Don't bother checking the extent during very early bootstrap.
+ */
+ if (extent_flags) {
+#endif
if (extent_free(t->pbs_extent, bpa, size, EX_NOWAIT | extent_flags)) {
printf("memio_unmap: %s 0x%lx, size 0x%lx\n",
(t->pbs_flags & _BUS_SPACE_IO_TYPE) ? "port" : "mem",
(unsigned long)bpa, (unsigned long)size);
printf("memio_unmap: can't free region\n");
}
+#ifdef PPC_IBM4XX
+ }
+#endif
unmapiodev(va, size);
}