Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/loongson Make PCI_NETBSD_CONFIGURE compile



details:   https://anonhg.NetBSD.org/src/rev/17871cbf3162
branches:  trunk
changeset: 347435:17871cbf3162
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Aug 26 13:58:27 2016 +0000

description:
Make PCI_NETBSD_CONFIGURE compile

diffstat:

 sys/arch/evbmips/loongson/mainbus.c |  28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diffs (57 lines):

diff -r 80616172a344 -r 17871cbf3162 sys/arch/evbmips/loongson/mainbus.c
--- a/sys/arch/evbmips/loongson/mainbus.c       Fri Aug 26 13:53:36 2016 +0000
+++ b/sys/arch/evbmips/loongson/mainbus.c       Fri Aug 26 13:58:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.1 2011/08/27 13:42:45 bouyer Exp $       */
+/*     $NetBSD: mainbus.c,v 1.2 2016/08/26 13:58:27 skrll Exp $        */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.1 2011/08/27 13:42:45 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2016/08/26 13:58:27 skrll Exp $");
 
 #include "opt_pci.h"
 
@@ -59,6 +59,9 @@
 #include <mips/bonito/bonitoreg.h>
 
 #include <evbmips/loongson/autoconf.h>
+#if defined(PCI_NETBSD_CONFIGURE)
+#include <evbmips/loongson/loongson_bus_defs.h>
+#endif
 
 #include "locators.h"
 #include "pci.h"
@@ -100,19 +103,16 @@
        aprint_normal("\n");
 
 #if defined(PCI_NETBSD_CONFIGURE)
-       {
-               struct extent *ioext, *memext;
+       struct extent *ioext = extent_create("pciio",  0x00001000, 0x00003fff,
+           NULL, 0, EX_NOWAIT);
+       struct extent *memext = extent_create("pcimem", 0, BONITO_PCILO_SIZE,
+           NULL, 0, EX_NOWAIT);
+       struct mips_cache_info * const mci = &mips_cache_info;
 
-               ioext = extent_create("pciio",  0x00001000, 0x00003fff,
-                   M_DEVBUF, NULL, 0, EX_NOWAIT);
-               memext = extent_create("pcimem", 0, BONITO_PCILO_SIZE,
-                   M_DEVBUF, NULL, 0, EX_NOWAIT);
-
-               pci_configure_bus(&gdium_configuration.gc_pc, ioext, memext,
-                   NULL, 0, mips_dcache_align);
-               extent_destroy(ioext);
-               extent_destroy(memext);
-       }
+       pci_configure_bus(&bonito_pc, ioext, memext,
+           NULL, 0, mci->mci_dcache_align);
+       extent_destroy(ioext);
+       extent_destroy(memext);
 #endif /* PCI_NETBSD_CONFIGURE */
 
        for (i = 0; i < __arraycount(mainbusdevs); i++) {



Home | Main Index | Thread Index | Old Index