diff options
| author | matt <matt@NetBSD.org> | 2009-08-06 16:37:01 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2009-08-06 16:37:01 +0000 |
| commit | db94de78562805cd0256c37d0dfe6c6ff4b12fb0 (patch) | |
| tree | 69bc89af3d8f8e4bb2c913949d88e9e93740c2fb /sys/arch/evbmips | |
| parent | 2b5246200f1ce6e231ff6acdbb477584fb174fa8 (diff) | |
Cleanup a bit and remove some debugging cruft that's no longer needed now
that the early console is working.
Diffstat (limited to 'sys/arch/evbmips')
| -rw-r--r-- | sys/arch/evbmips/gdium/gdium_dma.c | 10 | ||||
| -rw-r--r-- | sys/arch/evbmips/gdium/gdium_genfb.c | 10 | ||||
| -rw-r--r-- | sys/arch/evbmips/gdium/machdep.c | 19 | ||||
| -rw-r--r-- | sys/arch/evbmips/gdium/mainbus.c | 8 |
4 files changed, 20 insertions, 27 deletions
diff --git a/sys/arch/evbmips/gdium/gdium_dma.c b/sys/arch/evbmips/gdium/gdium_dma.c index 650208cccfd..c57b0786ec1 100644 --- a/sys/arch/evbmips/gdium/gdium_dma.c +++ b/sys/arch/evbmips/gdium/gdium_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdium_dma.c,v 1.1 2009/08/06 00:50:26 matt Exp $ */ +/* $NetBSD: gdium_dma.c,v 1.2 2009/08/06 16:37:01 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdium_dma.c,v 1.1 2009/08/06 00:50:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdium_dma.c,v 1.2 2009/08/06 16:37:01 matt Exp $"); #include <sys/param.h> @@ -45,15 +45,15 @@ __KERNEL_RCSID(0, "$NetBSD: gdium_dma.c,v 1.1 2009/08/06 00:50:26 matt Exp $"); #include <evbmips/gdium/gdiumvar.h> void -gdium_dma_init(struct gdium_config *acp) +gdium_dma_init(struct gdium_config *gc) { bus_dma_tag_t t; /* * Initialize the DMA tag used for PCI DMA. */ - t = &acp->gc_pci_dmat; - t->_cookie = acp; + t = &gc->gc_pci_dmat; + t->_cookie = gc; t->_wbase = GDIUM_DMA_PCI_PCIBASE; t->_physbase = GDIUM_DMA_PCI_PHYSBASE; t->_wsize = GDIUM_DMA_PCI_SIZE; diff --git a/sys/arch/evbmips/gdium/gdium_genfb.c b/sys/arch/evbmips/gdium/gdium_genfb.c index f0f3b129452..7152db0eaa9 100644 --- a/sys/arch/evbmips/gdium/gdium_genfb.c +++ b/sys/arch/evbmips/gdium/gdium_genfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: gdium_genfb.c,v 1.1 2009/08/06 00:50:26 matt Exp $ */ +/* $NetBSD: gdium_genfb.c,v 1.2 2009/08/06 16:37:01 matt Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdium_genfb.c,v 1.1 2009/08/06 00:50:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdium_genfb.c,v 1.2 2009/08/06 16:37:01 matt Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -86,6 +86,8 @@ gdium_cnattach(struct gdium_config *gc) ri->ri_bits = (char *)MIPS_PHYS_TO_KSEG1(BONITO_PCILO_BASE + reg); ri->ri_flg = RI_CENTER | RI_FULLCLEAR; + memset(ri->ri_bits, 0, 0x200000); + /* use as much of the screen as the font permits */ rasops_init(ri, 30, 80); @@ -97,7 +99,7 @@ gdium_cnattach(struct gdium_config *gc) gdium_stdscreen.textops = &ri->ri_ops; gdium_stdscreen.capabilities = ri->ri_caps; - ri->ri_ops.allocattr(ri, 0, 0, 0, &defattr); + ri->ri_ops.allocattr(ri, 0, ri->ri_rows - 1, 0, &defattr); wsdisplay_preattach(&gdium_stdscreen, ri, 0, 0, defattr); @@ -105,7 +107,7 @@ gdium_cnattach(struct gdium_config *gc) } #else /* NWSDISPLAY > 0 */ int -gdium_cnattach(void) +gdium_cnattach(struct gdium_config *gc) { return -1; } diff --git a/sys/arch/evbmips/gdium/machdep.c b/sys/arch/evbmips/gdium/machdep.c index 566b446df27..677bff63108 100644 --- a/sys/arch/evbmips/gdium/machdep.c +++ b/sys/arch/evbmips/gdium/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1 2009/08/06 00:50:26 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.2 2009/08/06 16:37:01 matt Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2009/08/06 00:50:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2009/08/06 16:37:01 matt Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -179,7 +179,7 @@ phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; int mem_cluster_cnt; void configure(void); -void mach_init(int, char **); +void mach_init(int, char **, char **, void *); /* * safepri is a safe priority for sleep to set for a spin-wait during @@ -193,7 +193,7 @@ extern struct user *proc0paddr; * Do all the stuff that locore normally does before calling main(). */ void -mach_init(int argc, char **argv) +mach_init(int argc, char **argv, char **evnp, void *syms) { struct gdium_config *gc = &gdium_configuration; void *kernend, *v; @@ -201,18 +201,15 @@ mach_init(int argc, char **argv) char *cp; int freqok, i, howto; psize_t memsize; -#define FBADDR(y, x) (void*)(0xb4000000 + 2*x + 0x800*y) extern char edata[], end[]; - memset(FBADDR(100,480), 0xff, 128); /* * Clear the BSS segment. */ kernend = (void *)mips_round_page(end); memset(edata, 0, (char *)kernend - edata); - memset(FBADDR(104,480), 0xff, 128); /* * Set up the exception vectors and CPU-specific function * vectors early on. We need the wbflush() vector set up @@ -222,23 +219,17 @@ mach_init(int argc, char **argv) */ mips_vector_init(); - memset(FBADDR(108,480), 0xff, 128); /* set the VM page size */ uvm_setpagesize(); memsize = 256*1024*1024; physmem = btoc(memsize); - memset(FBADDR(112,480), 0xff, 128); bonito_pci_init(&gc->gc_pc, &gc->gc_bonito); - memset(FBADDR(116,480), 0xff, 128); gdium_bus_io_init(&gc->gc_iot, gc); - memset(FBADDR(120,480), 0xff, 128); gdium_bus_mem_init(&gc->gc_memt, gc); - memset(FBADDR(124,480), 0xff, 128); - gdium_cnattach(gc); - memset(FBADDR(128,480), 0xff, 128); gdium_dma_init(gc); + gdium_cnattach(gc); /* * Calibrate the timer if YAMON failed to tell us. diff --git a/sys/arch/evbmips/gdium/mainbus.c b/sys/arch/evbmips/gdium/mainbus.c index c41e8a3253c..351610aade8 100644 --- a/sys/arch/evbmips/gdium/mainbus.c +++ b/sys/arch/evbmips/gdium/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.1 2009/08/06 00:50:26 matt Exp $ */ +/* $NetBSD: mainbus.c,v 1.2 2009/08/06 16:37:01 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.1 2009/08/06 00:50:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2009/08/06 16:37:01 matt Exp $"); #include "opt_pci.h" @@ -70,7 +70,7 @@ CFATTACH_DECL_NEW(mainbus, 0, mainbus_match, mainbus_attach, NULL, NULL); /* There can be only one. */ -int mainbus_found; +static bool mainbus_found; const char * const mainbusdevs[] = { "cpu", @@ -96,7 +96,7 @@ mainbus_attach(device_t parent, device_t self, void *aux) { size_t i; - mainbus_found = 1; + mainbus_found = true; aprint_normal("\n"); #if defined(PCI_NETBSD_CONFIGURE) |
