KNF, TAB/space cosmetics
This commit is contained in:
parent
ff30fd25f5
commit
8dc36c4c0f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: g2bus.c,v 1.12 2005/12/11 12:17:06 christos Exp $ */
|
||||
/* $NetBSD: g2bus.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Marcus Comstedt
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: g2bus.c,v 1.12 2005/12/11 12:17:06 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: g2bus.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -60,7 +60,7 @@ int
|
|||
g2busmatch(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $ */
|
||||
/* $NetBSD: g2bus_bus_mem.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -46,13 +46,13 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/device.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <dreamcast/dev/g2/g2busvar.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gapspci.c,v 1.14 2005/12/11 12:17:06 christos Exp $ */
|
||||
/* $NetBSD: gapspci.c,v 1.15 2006/08/07 17:36:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Marcus Comstedt
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.14 2005/12/11 12:17:06 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.15 2006/08/07 17:36:53 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,19 +63,18 @@ CFATTACH_DECL(gapspci, sizeof(struct gaps_softc),
|
|||
int
|
||||
gaps_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct g2bus_attach_args *ga = aux;
|
||||
struct g2bus_attach_args *ga = aux;
|
||||
char idbuf[16];
|
||||
bus_space_handle_t tmp_memh;
|
||||
|
||||
if (bus_space_map(ga->ga_memt, 0x01001400, 0x100, 0, &tmp_memh) != 0)
|
||||
return 0;
|
||||
|
||||
bus_space_read_region_1(ga->ga_memt, tmp_memh, 0,
|
||||
idbuf, sizeof(idbuf));
|
||||
bus_space_read_region_1(ga->ga_memt, tmp_memh, 0, idbuf, sizeof(idbuf));
|
||||
|
||||
bus_space_unmap(ga->ga_memt, tmp_memh, 0x100);
|
||||
|
||||
if(strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16))
|
||||
if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@ -97,22 +96,22 @@ gaps_attach(struct device *parent, struct device *self, void *aux)
|
|||
sc->sc_dmasize = 32768;
|
||||
|
||||
if (bus_space_map(sc->sc_memt, 0x01001400, 0x100,
|
||||
0, &sc->sc_gaps_memh) != 0)
|
||||
0, &sc->sc_gaps_memh) != 0)
|
||||
panic("gaps_attach: can't map GAPS register space");
|
||||
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x18, 0x5a14a501);
|
||||
|
||||
for(i=0; i<1000000; i++)
|
||||
;
|
||||
|
||||
if(bus_space_read_4(sc->sc_memt, sc->sc_gaps_memh, 0x18) != 1)
|
||||
for (i = 0; i < 1000000; i++)
|
||||
;
|
||||
|
||||
if (bus_space_read_4(sc->sc_memt, sc->sc_gaps_memh, 0x18) != 1)
|
||||
panic("gaps_attach: GAPS PCI bridge not responding");
|
||||
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x20, 0x1000000);
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x24, 0x1000000);
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x28, sc->sc_dmabase);
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x2c,
|
||||
sc->sc_dmabase + sc->sc_dmasize);
|
||||
sc->sc_dmabase + sc->sc_dmasize);
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x14, 1);
|
||||
bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x34, 1);
|
||||
|
||||
|
@ -129,5 +128,5 @@ gaps_attach(struct device *parent, struct device *self, void *aux)
|
|||
pba.pba_flags = PCI_FLAGS_MEM_ENABLED;
|
||||
pba.pba_pc = &sc->sc_pc;
|
||||
|
||||
(void) config_found_ia(self, "pcibus", &pba, pcibusprint);
|
||||
(void)config_found_ia(self, "pcibus", &pba, pcibusprint);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gapspci_dma.c,v 1.12 2005/11/24 13:08:33 yamt Exp $ */
|
||||
/* $NetBSD: gapspci_dma.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -46,16 +46,16 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci_dma.c,v 1.12 2005/11/24 13:08:33 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci_dma.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/extent.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
@ -189,7 +189,7 @@ gaps_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
|
|||
|
||||
map->dm_segs[0].ds_addr = res;
|
||||
map->dm_segs[0].ds_len = size;
|
||||
|
||||
|
||||
map->dm_mapsize = size;
|
||||
map->dm_nsegs = 1;
|
||||
} else {
|
||||
|
@ -617,7 +617,7 @@ gaps_dmamem_unmap(bus_dma_tag_t t, caddr_t kva, size_t size)
|
|||
if ((u_long) kva & PAGE_MASK)
|
||||
panic("gaps_dmamem_unmap");
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Nothing to do if we mapped it with P2SEG.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp $ */
|
||||
/* $NetBSD: gapspci_pci.c,v 1.9 2006/08/07 17:36:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Marcus Comstedt.
|
||||
|
@ -38,13 +38,13 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.9 2006/08/07 17:36:53 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/device.h>
|
||||
|
||||
#include <sys/device.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/sysasicvar.h>
|
||||
|
@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp
|
|||
#include <dev/pci/pcireg.h>
|
||||
|
||||
#include <dreamcast/dev/g2/gapspcivar.h>
|
||||
|
||||
|
||||
void gaps_attach_hook(struct device *, struct device *,
|
||||
struct pcibus_attach_args *);
|
||||
int gaps_bus_maxdevs(void *, int);
|
||||
|
@ -99,7 +99,7 @@ void
|
|||
gaps_attach_hook(struct device *bus, struct device *pci,
|
||||
struct pcibus_attach_args *pba)
|
||||
{
|
||||
struct gaps_softc *sc = (void *) bus;
|
||||
struct gaps_softc *sc = (void *)bus;
|
||||
|
||||
/*
|
||||
* Now that we know there's a bus configured, go ahead and
|
||||
|
|
Loading…
Reference in New Issue