Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/pci Do the additional PCI memory initializati...



details:   https://anonhg.NetBSD.org/src/rev/5452defaf6a6
branches:  trunk
changeset: 499777:5452defaf6a6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Nov 29 06:29:10 2000 +0000

description:
Do the additional PCI memory initialization after configuring DMA.

diffstat:

 sys/arch/alpha/pci/irongate.c         |  10 ++++++++--
 sys/arch/alpha/pci/irongate_bus_mem.c |  10 +++-------
 sys/arch/alpha/pci/irongatevar.h      |   4 +++-
 3 files changed, 14 insertions(+), 10 deletions(-)

diffs (92 lines):

diff -r f6aebb7ea1ad -r 5452defaf6a6 sys/arch/alpha/pci/irongate.c
--- a/sys/arch/alpha/pci/irongate.c     Wed Nov 29 06:21:12 2000 +0000
+++ b/sys/arch/alpha/pci/irongate.c     Wed Nov 29 06:29:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $ */
+/* $NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -157,6 +157,12 @@
 
        irongate_dma_init(icp);
 
+       /*
+        * Do PCI memory initialization that needs to be deferred until
+        * malloc is safe.
+        */
+       irongate_bus_mem_init2(&icp->ic_memt, icp);
+
        switch (cputype) {
 #ifdef API_UP1000
        case ST_API_NAUTILUS:
diff -r f6aebb7ea1ad -r 5452defaf6a6 sys/arch/alpha/pci/irongate_bus_mem.c
--- a/sys/arch/alpha/pci/irongate_bus_mem.c     Wed Nov 29 06:21:12 2000 +0000
+++ b/sys/arch/alpha/pci/irongate_bus_mem.c     Wed Nov 29 06:29:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irongate_bus_mem.c,v 1.5 2000/11/29 05:56:49 thorpej Exp $ */
+/* $NetBSD: irongate_bus_mem.c,v 1.6 2000/11/29 06:29:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(1, "$NetBSD: irongate_bus_mem.c,v 1.5 2000/11/29 05:56:49 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: irongate_bus_mem.c,v 1.6 2000/11/29 06:29:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,8 +53,6 @@
 #include <alpha/pci/irongatereg.h>
 #include <alpha/pci/irongatevar.h>
 
-void   irongate_bus_mem_init_hook(bus_space_tag_t, void *);
-
 #define        CHIP            irongate
 
 #define        CHIP_EX_MALLOC_SAFE(v)  (((struct irongate_config *)(v))->ic_mallocsafe)
@@ -62,8 +60,6 @@
 
 #define        CHIP_MEM_SYS_START(v)   IRONGATE_MEM_BASE
 
-#define        CHIP_MEM_INIT_HOOK(t, v) irongate_bus_mem_init_hook((t), (v))
-
 /* 
  * AMD 751 core logic appears on EV6.  We require at least EV56 
  * support for the assembler to emit BWX opcodes. 
@@ -78,7 +74,7 @@
 extern int mem_cluster_cnt;
 
 void
-irongate_bus_mem_init_hook(bus_space_tag_t t, void *v)
+irongate_bus_mem_init2(bus_space_tag_t t, void *v)
 {
        int i, error;
 
diff -r f6aebb7ea1ad -r 5452defaf6a6 sys/arch/alpha/pci/irongatevar.h
--- a/sys/arch/alpha/pci/irongatevar.h  Wed Nov 29 06:21:12 2000 +0000
+++ b/sys/arch/alpha/pci/irongatevar.h  Wed Nov 29 06:29:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irongatevar.h,v 1.2 2000/11/18 05:56:20 thorpej Exp $ */
+/* $NetBSD: irongatevar.h,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -73,4 +73,6 @@
 void   irongate_bus_io_init(bus_space_tag_t, void *);
 void   irongate_bus_mem_init(bus_space_tag_t, void *);
 
+void   irongate_bus_mem_init2(bus_space_tag_t, void *);
+
 pcireg_t irongate_conf_read0(void *, pcitag_t, int);



Home | Main Index | Thread Index | Old Index