Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/malta/dev Fix compile for PCI_NETBSD_CONFIGURE



details:   https://anonhg.NetBSD.org/src/rev/e19c9733a91f
branches:  trunk
changeset: 346940:e19c9733a91f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Aug 07 10:45:19 2016 +0000

description:
Fix compile for PCI_NETBSD_CONFIGURE

diffstat:

 sys/arch/evbmips/malta/dev/mainbus.c |  23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diffs (55 lines):

diff -r c0c01af0bb70 -r e19c9733a91f sys/arch/evbmips/malta/dev/mainbus.c
--- a/sys/arch/evbmips/malta/dev/mainbus.c      Sun Aug 07 10:44:04 2016 +0000
+++ b/sys/arch/evbmips/malta/dev/mainbus.c      Sun Aug 07 10:45:19 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.12 2011/06/06 17:13:05 matt Exp $        */
+/*     $NetBSD: mainbus.c,v 1.13 2016/08/07 10:45:19 skrll Exp $       */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2011/06/06 17:13:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2016/08/07 10:45:19 skrll Exp $");
 
 #include "opt_pci.h"
 
@@ -108,12 +108,11 @@
 {
        struct mainbus_attach_args ma;
        const struct mainbusdev *md;
-#if defined(PCI_NETBSD_CONFIGURE)
-       struct extent *ioext, *memext;
+#if defined(PCI_NETBSD_ENABLE_IDE) || defined(PCI_NETBSD_CONFIGURE)
+       struct malta_config *mcp = &malta_configuration;
+       pci_chipset_tag_t pc = &mcp->mc_pc;
 #endif
 #if defined(PCI_NETBSD_ENABLE_IDE)
-       struct malta_config *mcp = &malta_configuration;
-       pci_chipset_tag_t pc = &mcp->mc_pc;
        pcitag_t idetag;
        pcireg_t idetim;
 #endif
@@ -122,13 +121,15 @@
        printf("\n");
 
 #if defined(PCI_NETBSD_CONFIGURE)
-       ioext = extent_create("pciio",  0x00001000, 0x0000efff,
-           M_DEVBUF, NULL, 0, EX_NOWAIT);
-       memext = extent_create("pcimem", MALTA_PCIMEM1_BASE,
+       struct mips_cache_info * const mci = &mips_cache_info;
+
+       struct extent *ioext = extent_create("pciio", 0x00001000, 0x0000efff,
+           NULL, 0, EX_NOWAIT);
+       struct extent *memext = extent_create("pcimem", MALTA_PCIMEM1_BASE,
            MALTA_PCIMEM1_BASE + MALTA_PCIMEM1_SIZE,
-           M_DEVBUF, NULL, 0, EX_NOWAIT);
+           NULL, 0, EX_NOWAIT);
 
-       pci_configure_bus(pc, ioext, memext, NULL, 0, mips_dcache_align);
+       pci_configure_bus(pc, ioext, memext, NULL, 0, mci->mci_dcache_align);
        extent_destroy(ioext);
        extent_destroy(memext);
 #endif /* PCI_NETBSD_CONFIGURE */



Home | Main Index | Thread Index | Old Index