Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips Fix machine/ includes



details:   https://anonhg.NetBSD.org/src/rev/f817a02920d0
branches:  trunk
changeset: 767186:f817a02920d0
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jul 10 23:13:22 2011 +0000

description:
Fix machine/ includes

diffstat:

 sys/arch/mips/adm5120/adm5120_intr.c               |  12 +--
 sys/arch/mips/adm5120/dev/admpci.c                 |  47 +++++-----
 sys/arch/mips/adm5120/dev/if_admsw.c               |  24 ++---
 sys/arch/mips/adm5120/dev/if_admswvar.h            |  24 ++---
 sys/arch/mips/adm5120/dev/uart.c                   |  90 ++++++++++-----------
 sys/arch/mips/adm5120/dev/wdc_extio.c              |  18 +--
 sys/arch/mips/alchemy/au1000.c                     |   6 +-
 sys/arch/mips/alchemy/au1100.c                     |   8 +-
 sys/arch/mips/alchemy/au1500.c                     |   8 +-
 sys/arch/mips/alchemy/au1550.c                     |   8 +-
 sys/arch/mips/alchemy/au_chipdep.c                 |   6 +-
 sys/arch/mips/alchemy/au_himem_space.c             |   6 +-
 sys/arch/mips/alchemy/au_icu.c                     |  14 +-
 sys/arch/mips/alchemy/au_wired_space.c             |   6 +-
 sys/arch/mips/alchemy/aubus.c                      |  18 ++--
 sys/arch/mips/alchemy/dev/auspi.c                  |  13 +-
 sys/arch/mips/alchemy/dev/if_aumac.c               |  21 ++--
 sys/arch/mips/alchemy/include/auvar.h              |   4 +-
 sys/arch/mips/atheros/ar9344.c                     |   6 +-
 sys/arch/mips/atheros/dev/arpci.c                  |  16 ++-
 sys/arch/mips/atheros/include/ar9344reg.h          |   5 +-
 sys/arch/mips/bonito/bonito_iobc.c                 |   8 +-
 sys/arch/mips/bonito/bonito_pci.c                  |  12 +-
 sys/arch/mips/conf/files.atheros                   |   7 +-
 sys/arch/mips/mips/bus_dma.c                       |  21 ++--
 sys/arch/mips/mips/bus_space_alignstride_chipdep.c |   6 +-
 sys/arch/mips/mips/in_cksum.c                      |   8 +-
 sys/arch/mips/mips/mips3_clock.c                   |  11 +-
 sys/arch/mips/mips/mips3_clockintr.c               |   7 +-
 sys/arch/mips/mips/mips_softint.c                  |   8 +-
 sys/arch/mips/rmi/rmixl_gpio.c                     |  15 +--
 sys/arch/mips/rmi/rmixl_intr.c                     |  21 ++--
 sys/arch/mips/rmi/rmixl_obio.c                     |  13 +-
 sys/arch/mips/rmi/rmixl_pcie.c                     |  17 +--
 sys/arch/mips/rmi/rmixl_pcix.c                     |  15 +--
 35 files changed, 249 insertions(+), 280 deletions(-)

diffs (truncated from 1500 to 300 lines):

diff -r c3db7a8e6c2e -r f817a02920d0 sys/arch/mips/adm5120/adm5120_intr.c
--- a/sys/arch/mips/adm5120/adm5120_intr.c      Sun Jul 10 21:18:47 2011 +0000
+++ b/sys/arch/mips/adm5120/adm5120_intr.c      Sun Jul 10 23:13:22 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adm5120_intr.c,v 1.5 2011/07/01 18:38:48 dyoung Exp $  */
+/*     $NetBSD: adm5120_intr.c,v 1.6 2011/07/10 23:13:23 matt Exp $    */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -67,20 +67,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adm5120_intr.c,v 1.5 2011/07/01 18:38:48 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm5120_intr.c,v 1.6 2011/07/10 23:13:23 matt Exp $");
 
 #include "opt_ddb.h"
 #define __INTR_PRIVATE
 
 #include <sys/param.h>
-#include <sys/queue.h>
+#include <sys/intr.h>
 #include <sys/malloc.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-#include <sys/kernel.h>
-
-#include <sys/bus.h>
-#include <machine/intr.h>
 
 #include <mips/locore.h>
 #include <mips/adm5120/include/adm5120reg.h>
diff -r c3db7a8e6c2e -r f817a02920d0 sys/arch/mips/adm5120/dev/admpci.c
--- a/sys/arch/mips/adm5120/dev/admpci.c        Sun Jul 10 21:18:47 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/admpci.c        Sun Jul 10 23:13:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: admpci.c,v 1.7 2011/07/01 18:38:49 dyoung Exp $ */
+/* $NetBSD: admpci.c,v 1.8 2011/07/10 23:13:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 David Young.  All rights reserved.
@@ -61,9 +61,12 @@
 #include "pci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: admpci.c,v 1.7 2011/07/01 18:38:49 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: admpci.c,v 1.8 2011/07/10 23:13:23 matt Exp $");
 
 #include <sys/types.h>
+#include <sys/bus.h>
+#include <sys/cpu.h>
+
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/systm.h>
@@ -74,10 +77,6 @@
 
 #include <uvm/uvm_extern.h>
 
-#include <sys/bus.h>
-#include <machine/cpu.h>
-#include <machine/pte.h>
-
 #include <dev/pci/pcivar.h>
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pciconf.h>
@@ -86,6 +85,8 @@
 #include <mips/cache.h>
 #endif
 
+#include <mips/pte.h>
+
 #include <mips/adm5120/include/adm5120_mainbusvar.h>
 #include <mips/adm5120/include/adm5120reg.h>
 #include <mips/adm5120/include/adm5120var.h>
@@ -114,7 +115,7 @@
 #define        ADMPCI_MAX_DEVICE
 
 struct admpci_softc {
-       struct device                   sc_dev;
+       device_t                        sc_dev;
        struct mips_pci_chipset         sc_pc;
 
        bus_space_tag_t                 sc_memt;
@@ -125,11 +126,11 @@
        bus_space_handle_t              sc_datah;
 };
 
-int            admpcimatch(struct device *, struct cfdata *, void *);
-void           admpciattach(struct device *, struct device *, void *);
+int            admpcimatch(device_t, cfdata_t, void *);
+void           admpciattach(device_t, device_t, void *);
 
 #if NPCI > 0
-static void admpci_attach_hook(struct device *, struct device *,
+static void admpci_attach_hook(device_t, device_t,
     struct pcibus_attach_args *);
 static int admpci_bus_maxdevs(void *, int);
 static pcitag_t admpci_make_tag(void *, int, int, int);
@@ -150,7 +151,7 @@
 
 #endif /* NPCI > 0 */
 
-CFATTACH_DECL(admpci, sizeof(struct admpci_softc),
+CFATTACH_DECL_NEW(admpci, sizeof(struct admpci_softc),
     admpcimatch, admpciattach, NULL, NULL);
 
 int admpci_found = 0;
@@ -166,7 +167,7 @@
 #endif
 
 int
-admpcimatch(struct device *parent, struct cfdata *match, void *aux)
+admpcimatch(device_t parent, cfdata_t match, void *aux)
 {
        struct mainbus_attach_args *ma = (struct mainbus_attach_args *)aux;
 
@@ -174,10 +175,10 @@
 }
 
 void
-admpciattach(struct device *parent, struct device *self, void *aux)
+admpciattach(device_t parent, device_t self, void *aux)
 {
        struct adm5120_config           *admc = &adm5120_configuration;
-       struct admpci_softc             *sc = (struct admpci_softc *)self;
+       struct admpci_softc             *sc = device_private(self);
        struct mainbus_attach_args      *ma = (struct mainbus_attach_args *)aux;
 #if NPCI > 0
        u_long                          result;
@@ -187,24 +188,24 @@
        
        admpci_found = 1;
 
+       sc->sc_dev = self;
        sc->sc_conft = ma->ma_obiot;
        if (bus_space_map(sc->sc_conft, ADM5120_BASE_PCI_CONFDATA, 4, 0,
                &sc->sc_datah) != 0) {
-               printf(
-                   "\n%s: unable to map PCI Configuration Data register\n",
-                   device_xname(&sc->sc_dev));
+               aprint_error(
+                   ": unable to map PCI Configuration Data register\n");
                return;
        }
        if (bus_space_map(sc->sc_conft, ADM5120_BASE_PCI_CONFADDR, 4, 0,
                &sc->sc_addrh) != 0) {
-               printf(
-                   "\n%s: unable to map PCI Configuration Address register\n",
-                   device_xname(&sc->sc_dev));
+               aprint_error(
+                   ": unable to map PCI Configuration Address register\n");
                return;
        }
 
-       printf(": ADM5120 Host-PCI Bridge, data %"PRIxBSH" addr %"PRIxBSH", sc %p\n",
-           sc->sc_datah, sc->sc_addrh, (void *)sc);
+       aprint_normal(": ADM5120 Host-PCI Bridge, "
+           "data %"PRIxBSH" addr %"PRIxBSH", sc %p\n",
+           sc->sc_datah, sc->sc_addrh, sc);
 
 #if NPCI > 0
        sc->sc_memt = &admc->pcimem_space;
@@ -271,7 +272,7 @@
 #if NPCI > 0
 
 void
-admpci_attach_hook(struct device *parent, struct device *self,
+admpci_attach_hook(device_t parent, device_t self,
     struct pcibus_attach_args *pba)
 {
 }
diff -r c3db7a8e6c2e -r f817a02920d0 sys/arch/mips/adm5120/dev/if_admsw.c
--- a/sys/arch/mips/adm5120/dev/if_admsw.c      Sun Jul 10 21:18:47 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/if_admsw.c      Sun Jul 10 23:13:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.9 2011/07/01 18:38:49 dyoung Exp $ */
+/* $NetBSD: if_admsw.c,v 1.10 2011/07/10 23:13:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -76,20 +76,22 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.9 2011/07/01 18:38:49 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.10 2011/07/10 23:13:23 matt Exp $");
 
 
 #include <sys/param.h>
-#include <sys/systm.h>
+#include <sys/bus.h>
 #include <sys/callout.h>
-#include <sys/mbuf.h>
-#include <sys/malloc.h>
+#include <sys/device.h>
+#include <sys/endian.h>
+#include <sys/errno.h>
+#include <sys/intr.h>
+#include <sys/ioctl.h>
 #include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
 #include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/device.h>
-#include <sys/queue.h>
+#include <sys/systm.h>
 
 #include <prop/proplib.h>
 
@@ -102,10 +104,6 @@
 
 #include <net/bpf.h>
 
-#include <sys/bus.h>
-#include <machine/intr.h>
-#include <machine/endian.h>
-
 #include <dev/mii/mii.h>
 #include <dev/mii/miivar.h>
 
diff -r c3db7a8e6c2e -r f817a02920d0 sys/arch/mips/adm5120/dev/if_admswvar.h
--- a/sys/arch/mips/adm5120/dev/if_admswvar.h   Sun Jul 10 21:18:47 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/if_admswvar.h   Sun Jul 10 23:13:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admswvar.h,v 1.3 2011/07/01 18:38:49 dyoung Exp $ */
+/* $NetBSD: if_admswvar.h,v 1.4 2011/07/10 23:13:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -34,19 +34,21 @@
 #define        _IF_ADMSWVAR_H_
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_admswvar.h,v 1.3 2011/07/01 18:38:49 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admswvar.h,v 1.4 2011/07/10 23:13:23 matt Exp $");
 
 #include <sys/param.h>
-#include <sys/systm.h>
+#include <sys/bus.h>
 #include <sys/callout.h>
-#include <sys/mbuf.h>
-#include <sys/malloc.h>
+#include <sys/device.h>
+#include <sys/endian.h>
+#include <sys/errno.h>
+#include <sys/intr.h>
+#include <sys/ioctl.h>
 #include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
 #include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/device.h>
-#include <sys/queue.h>
+#include <sys/systm.h>
 #include <sys/wdog.h>
 
 #include <uvm/uvm_extern.h>            /* for PAGE_SIZE */
@@ -56,10 +58,6 @@
 #include <net/if_media.h>
 #include <net/if_ether.h>
 
-#include <sys/bus.h>
-#include <machine/intr.h>
-#include <machine/endian.h>
-
 #include <dev/mii/mii.h>
 #include <dev/mii/miivar.h>
 
diff -r c3db7a8e6c2e -r f817a02920d0 sys/arch/mips/adm5120/dev/uart.c
--- a/sys/arch/mips/adm5120/dev/uart.c  Sun Jul 10 21:18:47 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/uart.c  Sun Jul 10 23:13:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uart.c,v 1.8 2011/07/01 18:38:49 dyoung Exp $ */
+/* $NetBSD: uart.c,v 1.9 2011/07/10 23:13:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -32,30 +32,23 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uart.c,v 1.8 2011/07/01 18:38:49 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uart.c,v 1.9 2011/07/10 23:13:23 matt Exp $");
 
-#include <sys/types.h>
 #include <sys/param.h>
-#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/ioctl.h>
+#include <sys/intr.h>
+#include <sys/kauth.h>
 #include <sys/kernel.h>
-#include <sys/time.h>



Home | Main Index | Thread Index | Old Index