Cleanup machine includes

This commit is contained in:
matt 2011-07-10 06:24:18 +00:00
parent b578f76170
commit fa40faf65a
7 changed files with 56 additions and 67 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ar5315.c,v 1.8 2011/07/07 05:06:44 matt Exp $ */
/* $NetBSD: ar5315.c,v 1.9 2011/07/10 06:24:18 matt Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -48,7 +48,7 @@
* family.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ar5315.c,v 1.8 2011/07/07 05:06:44 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ar5315.c,v 1.9 2011/07/10 06:24:18 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -77,7 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: ar5315.c,v 1.8 2011/07/07 05:06:44 matt Exp $");
#include <mips/atheros/include/platform.h>
#include <mips/atheros/include/arbusvar.h>
#include <machine/locore.h>
#include <mips/locore.h>
/* helper macro for accessing system registers without bus space */
#define REGVAL(x) *((volatile uint32_t *)(MIPS_PHYS_TO_KSEG1((x))))

View File

@ -1,4 +1,4 @@
/* $NetBSD: ar5315_board.c,v 1.3 2011/07/07 05:06:44 matt Exp $ */
/* $NetBSD: ar5315_board.c,v 1.4 2011/07/10 06:24:18 matt Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -46,7 +46,7 @@
* information data in flash for the AR5315.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ar5315_board.c,v 1.3 2011/07/07 05:06:44 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ar5315_board.c,v 1.4 2011/07/10 06:24:18 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: ar5315_board.c,v 1.3 2011/07/07 05:06:44 matt Exp $"
#include <mips/atheros/include/arbusvar.h>
#include <mips/atheros/include/platform.h>
#include <machine/locore.h>
#include <mips/locore.h>
#include "com.h"
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: ar_intr.c,v 1.2 2011/07/08 18:49:27 dyoung Exp $ */
/* $NetBSD: ar_intr.c,v 1.3 2011/07/10 06:24:18 matt Exp $ */
/*
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
* Copyright (c) 2006 Garrett D'Amore.
@ -41,19 +41,14 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ar_intr.c,v 1.2 2011/07/08 18:49:27 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ar_intr.c,v 1.3 2011/07/10 06:24:18 matt Exp $");
#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <machine/intr.h>
#include <sys/malloc.h>
#include <mips/locore.h>
#include <mips/atheros/include/platform.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: argpio.c,v 1.4 2011/07/01 18:40:00 dyoung Exp $ */
/* $NetBSD: argpio.c,v 1.5 2011/07/10 06:24:19 matt Exp $ */
/*-
* Copyright (c) 2006 Garrett D'Amore
@ -32,17 +32,16 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.4 2011/07/01 18:40:00 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.5 2011/07/10 06:24:19 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/types.h>
#include <sys/device.h>
#include <sys/gpio.h>
#include <sys/bus.h>
#include <machine/intr.h>
#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/types.h>
#include <mips/atheros/include/arbusvar.h>
@ -60,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.4 2011/07/01 18:40:00 dyoung Exp $");
*/
struct argpio_softc {
struct device sc_dev;
device_t sc_dev;
struct gpio_chipset_tag sc_gc;
gpio_pin_t sc_pins[ARGPIO_NPINS];
int sc_npins;
@ -74,15 +73,15 @@ struct argpio_softc {
int sc_ledpin;
};
static int argpio_match(struct device *, struct cfdata *, void *);
static void argpio_attach(struct device *, struct device *, void *);
static int argpio_match(device_t, cfdata_t, void *);
static void argpio_attach(device_t, device_t, void *);
static int argpio_intr(void *);
static void argpio_reset_pressed(void *);
static void argpio_ctl(void *, int, int);
static void argpio_write(void *, int, int);
static int argpio_read(void *, int);
CFATTACH_DECL(argpio, sizeof (struct argpio_softc), argpio_match,
CFATTACH_DECL_NEW(argpio, sizeof (struct argpio_softc), argpio_match,
argpio_attach, NULL, NULL);
#define INPUT(pin) (1 << (pin)) /* input bit */
@ -95,7 +94,7 @@ CFATTACH_DECL(argpio, sizeof (struct argpio_softc), argpio_match,
0, 12, BUS_SPACE_BARRIER_SYNC)
int
argpio_match(struct device *parent, struct cfdata *match, void *aux)
argpio_match(device_t parent, cfdata_t match, void *aux)
{
struct arbus_attach_args *aa = aux;
@ -103,15 +102,16 @@ argpio_match(struct device *parent, struct cfdata *match, void *aux)
}
void
argpio_attach(struct device *parent, struct device *self, void *aux)
argpio_attach(device_t parent, device_t self, void *aux)
{
struct argpio_softc *sc = (struct argpio_softc *)self;
struct argpio_softc *sc = device_private(self);
struct arbus_attach_args *aa = aux;
struct gpiobus_attach_args gba;
prop_number_t pn;
int i;
uint32_t reg;
sc->sc_dev = self;
sc->sc_st = aa->aa_bst;
sc->sc_npins = ARGPIO_NPINS;
sc->sc_size = aa->aa_size;
@ -130,34 +130,34 @@ argpio_attach(struct device *parent, struct device *self, void *aux)
sc->sc_gc.gp_pin_ctl = argpio_ctl;
aprint_normal(": Atheros AR531X GPIO");
pn = prop_dictionary_get(device_properties(&sc->sc_dev), "reset-pin");
pn = prop_dictionary_get(device_properties(sc->sc_dev), "reset-pin");
if (pn != NULL) {
KASSERT(prop_object_type(pn) == PROP_TYPE_NUMBER);
sc->sc_rstpin = (int)prop_number_integer_value(pn);
aprint_normal(", reset button pin %d", sc->sc_rstpin);
}
pn = prop_dictionary_get(device_properties(&sc->sc_dev), "sysled-pin");
pn = prop_dictionary_get(device_properties(sc->sc_dev), "sysled-pin");
if (pn != NULL) {
KASSERT(prop_object_type(pn) == PROP_TYPE_NUMBER);
sc->sc_ledpin = (int)prop_number_integer_value(pn);
aprint_normal(", system led pin %d", sc->sc_ledpin);
}
printf("\n");
aprint_normal("\n");
if (sc->sc_ledpin) {
sc->sc_ih = arbus_intr_establish(aa->aa_cirq, aa->aa_mirq,
argpio_intr, sc);
if (sc->sc_ih == NULL) {
aprint_error("%s: couldn't establish interrupt\n",
sc->sc_dev.dv_xname);
aprint_error_dev(sc->sc_dev,
"couldn't establish interrupt\n");
}
}
if (sc->sc_ih) {
sysmon_task_queue_init();
sc->sc_resetbtn.smpsw_name = sc->sc_dev.dv_xname;
sc->sc_resetbtn.smpsw_name = device_xname(sc->sc_dev);
sc->sc_resetbtn.smpsw_type = PSWITCH_TYPE_RESET;
if (sysmon_pswitch_register(&sc->sc_resetbtn) != 0)
printf("%s: unable to register reset button\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: arspi.c,v 1.8 2011/07/07 05:06:44 matt Exp $ */
/* $NetBSD: arspi.c,v 1.9 2011/07/10 06:24:19 matt Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -42,21 +42,19 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arspi.c,v 1.8 2011/07/07 05:06:44 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: arspi.c,v 1.9 2011/07/10 06:24:19 matt Exp $");
#include "locators.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/cpu.h>
#include <sys/device.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/queue.h>
#include <sys/bus.h>
#include <machine/cpu.h>
#include <sys/systm.h>
#include <mips/atheros/include/ar5315reg.h>
#include <mips/atheros/include/arbusvar.h>

View File

@ -1,4 +1,4 @@
/* $Id: if_ae.c,v 1.20 2011/07/01 18:40:00 dyoung Exp $ */
/* $Id: if_ae.c,v 1.21 2011/07/10 06:24:19 matt Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
* Copyright (c) 2006 Garrett D'Amore.
@ -98,21 +98,21 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.20 2011/07/01 18:40:00 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.21 2011/07/10 06:24:19 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/kernel.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/device.h>
#include <machine/endian.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 <uvm/uvm_extern.h>
@ -123,9 +123,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.20 2011/07/01 18:40:00 dyoung Exp $");
#include <net/bpf.h>
#include <sys/bus.h>
#include <machine/intr.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
#include <dev/mii/mii_bitbang.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ath_arbus.c,v 1.20 2011/07/07 05:06:44 matt Exp $ */
/* $NetBSD: if_ath_arbus.c,v 1.21 2011/07/10 06:24:19 matt Exp $ */
/*-
* Copyright (c) 2006 Jared D. McNeill <jmcneill@invisible.ca>
@ -34,18 +34,17 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ath_arbus.c,v 1.20 2011/07/07 05:06:44 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ath_arbus.c,v 1.21 2011/07/10 06:24:19 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/errno.h>
#include <sys/bus.h>
#include <machine/intr.h>
#include <sys/device.h>
#include <sys/errno.h>
#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/systm.h>
#include <net/if.h>
#include <net/if_media.h>