Minor KNF, correct some comments.

This commit is contained in:
peter 2006-06-27 13:26:44 +00:00
parent 5efc77fb1e
commit 257aff65b2
1 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sacc_hpcarm.c,v 1.6 2006/03/04 14:36:19 peter Exp $ */
/* $NetBSD: sacc_hpcarm.c,v 1.7 2006/06/27 13:26:44 peter Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,11 +37,11 @@
*/
/*
* Platform dependent part for SA11[01]1 companion chip on hpcarm.
* Platform dependent part for SA-11[01]1 companion chip on hpcarm.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sacc_hpcarm.c,v 1.6 2006/03/04 14:36:19 peter Exp $");
__KERNEL_RCSID(0, "$NetBSD: sacc_hpcarm.c,v 1.7 2006/06/27 13:26:44 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -96,10 +96,12 @@ sacc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = sa->sa_iot;
sc->sc_piot = psc->sc_iot;
sc->sc_gpioh = psc->sc_gpioh;
if ((p = platid_search_data(&platid, sacc_platid_table)) == NULL)
p = platid_search_data(&platid, sacc_platid_table);
if (p == NULL)
return;
gpiopin = (int) p->data;
gpiopin = (int)p->data;
sc->sc_gpiomask = 1 << gpiopin;
if (bus_space_map(sa->sa_iot, sa->sa_addr, sa->sa_size, 0,
@ -110,13 +112,13 @@ sacc_attach(struct device *parent, struct device *self, void *aux)
skid = bus_space_read_4(sc->sc_iot, sc->sc_ioh, SACCSBI_SKID);
printf("%s: SA1111 rev %d.%d\n", sc->sc_dev.dv_xname,
printf("%s: SA-1111 rev %d.%d\n", sc->sc_dev.dv_xname,
(skid & 0xf0) >> 3, skid & 0xf);
for (i = 0; i < SACCIC_LEN; i++)
sc->sc_intrhand[i] = NULL;
/* initialize SA1111 interrupt controller */
/* initialize SA-1111 interrupt controller */
bus_space_write_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTEN0, 0);
bus_space_write_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTEN1, 0);
bus_space_write_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTTSTSEL, 0);
@ -125,12 +127,10 @@ sacc_attach(struct device *parent, struct device *self, void *aux)
bus_space_write_4(sc->sc_iot, sc->sc_ioh,
SACCIC_INTSTATCLR1, 0xffffffff);
/* connect to SA1110's GPIO intr */
/* connect to SA-1110's GPIO intr */
sa11x0_intr_establish(0, gpiopin, 1, IPL_SERIAL, sacc_intr, sc);
/*
* Attach each devices
*/
/* attach each devices */
config_search_ia(sa1111_search, self, "sacc", NULL);
}
@ -147,9 +147,9 @@ sacc_intr(void *arg)
bus_space_read_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTSTATCLR0);
intstat.hi =
bus_space_read_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTSTATCLR1);
DPRINTF(("sacc_intr_dispatch: %x %x\n", intstat.lo, intstat.hi));
DPRINTF(("sacc_intr: %x %x\n", intstat.lo, intstat.hi));
/* clear SA1110's GPIO intr status */
/* clear SA-1110's GPIO intr status */
bus_space_write_4(sc->sc_piot, sc->sc_gpioh,
SAGPIO_EDR, sc->sc_gpiomask);