Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Finish up the changes to get LOOSE_PROTOTYPES worki...
details: https://anonhg.NetBSD.org/src/rev/9a198b6d61aa
branches: trunk
changeset: 520341:9a198b6d61aa
user: chris <chris%NetBSD.org@localhost>
date: Mon Jan 07 22:58:07 2002 +0000
description:
Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
diffstat:
sys/arch/arm/arm32/intr.c | 10 +++++++---
sys/arch/arm/footbridge/footbridge_irqhandler.c | 6 +++---
sys/arch/arm/include/arm32/machdep.h | 14 +++++++++++++-
sys/arch/arm/include/isa_machdep.h | 3 ++-
sys/arch/arm32/isa/dsrtc.c | 7 +++++--
sys/arch/arm32/isa/joy.c | 4 ++--
sys/arch/cats/cats/cats_machdep.c | 13 ++++++-------
sys/arch/cats/include/isa_machdep.h | 7 ++++++-
sys/arch/cats/isa/isa_machdep.c | 7 +++++--
9 files changed, 49 insertions(+), 22 deletions(-)
diffs (241 lines):
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm/arm32/intr.c
--- a/sys/arch/arm/arm32/intr.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm/arm32/intr.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.5 2001/12/21 22:56:17 bjh21 Exp $ */
+/* $NetBSD: intr.c,v 1.6 2002/01/07 22:58:07 chris Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -50,11 +50,15 @@
#include <net/netisr.h>
#include <machine/conf.h>
-
+#include <arm/arm32/machdep.h>
+
#ifndef NPLCOM
#define NPLCOM 0
#endif
+/* Prototypes */
+static void clearsoftintr __P((u_int));
+
u_int soft_interrupts = 0;
extern int current_spl_level;
@@ -91,7 +95,7 @@
atomic_set_bit(&soft_interrupts, intrmask);
}
-void
+static void
clearsoftintr(intrmask)
u_int intrmask;
{
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm/footbridge/footbridge_irqhandler.c
--- a/sys/arch/arm/footbridge/footbridge_irqhandler.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm/footbridge/footbridge_irqhandler.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_irqhandler.c,v 1.3 2002/01/05 22:41:48 chris Exp $ */
+/* $NetBSD: footbridge_irqhandler.c,v 1.4 2002/01/07 22:58:07 chris Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -47,7 +47,8 @@
#include <machine/intr.h>
#include <machine/cpu.h>
-
+#include <arm/arm32/machdep.h>
+
irqhandler_t *irqhandlers[NIRQS];
int current_intr_depth; /* Depth of interrupt nesting */
@@ -61,7 +62,6 @@
extern u_int soft_interrupts; /* Only so we can initialise it */
extern char *_intrnames;
-extern void set_spl_masks __P((void));
void stray_irqhandler __P((void));
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm/include/arm32/machdep.h
--- a/sys/arch/arm/include/arm32/machdep.h Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm/include/arm32/machdep.h Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.h,v 1.1 2002/01/05 22:41:48 chris Exp $ */
+/* $NetBSD: machdep.h,v 1.2 2002/01/07 22:58:08 chris Exp $ */
#ifndef _ARM32_BOOT_MACHDEP_H_
#define _ARM32_BOOT_MACHDEP_H_
@@ -12,4 +12,16 @@
void prefetch_abort_handler __P((trapframe_t *));
void dumpsys __P((void));
+/*
+ * note that we use void * as all the platforms have different ideas on what
+ * the structure is
+ */
+u_int initarm __P((void *));
+
+/* from arm/arm32/intr.c */
+void dosoftints __P((void));
+void set_spl_masks __P((void));
+#ifdef DIAGNOSTIC
+void dump_spl_masks __P((void));
#endif
+#endif
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm/include/isa_machdep.h
--- a/sys/arch/arm/include/isa_machdep.h Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm/include/isa_machdep.h Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.2 2001/03/04 03:50:33 matt Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.3 2002/01/07 22:58:07 chris Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -172,6 +172,7 @@
vaddr_t isa_io_data_vaddr(void);
vaddr_t isa_mem_data_vaddr(void);
int isa_intr_alloc(isa_chipset_tag_t ic, int mask, int type, int *irq);
+void isa_intr_init(void);
/*
* Miscellanous functions.
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm32/isa/dsrtc.c
--- a/sys/arch/arm32/isa/dsrtc.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm32/isa/dsrtc.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dsrtc.c,v 1.2 2002/01/07 21:46:58 thorpej Exp $ */
+/* $NetBSD: dsrtc.c,v 1.3 2002/01/07 22:58:08 chris Exp $ */
/*
* Copyright (c) 1998 Mark Brinicombe.
@@ -63,6 +63,9 @@
void ds1687_write __P((struct dsrtc_softc *sc, int addr, int data));
int ds1687_ram_read __P((struct dsrtc_softc *sc, int addr));
void ds1687_ram_write __P((struct dsrtc_softc *sc, int addr, int data));
+static void ds1687_bank_select __P((struct dsrtc_softc *, int));
+static int dsrtc_write __P((void *, rtc_t *));
+static int dsrtc_read __P((void *, rtc_t *));
int
ds1687_read(sc, addr)
@@ -85,7 +88,7 @@
bus_space_write_1(sc->sc_iot, sc->sc_ioh, RTC_DATA_REG, data);
}
-void
+static void
ds1687_bank_select(sc, bank)
struct dsrtc_softc *sc;
int bank;
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/arm32/isa/joy.c
--- a/sys/arch/arm32/isa/joy.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/arm32/isa/joy.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: joy.c,v 1.3 2001/06/13 10:46:01 wiz Exp $ */
+/* $NetBSD: joy.c,v 1.4 2002/01/07 22:58:08 chris Exp $ */
/*
* XXX This _really_ should be rewritten such that it doesn't
@@ -47,7 +47,7 @@
#include <machine/cpu.h>
#include <machine/pio.h>
#include <machine/joystick.h>
-#include <machine/conf.h>
+#include <arm/conf.h>
#include <dev/isa/isavar.h>
#include <dev/isa/isareg.h>
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/cats/cats/cats_machdep.c
--- a/sys/arch/cats/cats/cats_machdep.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/cats/cats/cats_machdep.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cats_machdep.c,v 1.7 2001/11/23 21:18:33 thorpej Exp $ */
+/* $NetBSD: cats_machdep.c,v 1.8 2002/01/07 22:58:08 chris Exp $ */
/*
* Copyright (c) 1997,1998 Mark Brinicombe.
@@ -64,7 +64,8 @@
#include <machine/frame.h>
#include <machine/intr.h>
#include <arm/undefined.h>
-
+#include <arm/arm32/machdep.h>
+
#include <machine/cyclone_boot.h>
#include <arm/footbridge/dc21285mem.h>
#include <arm/footbridge/dc21285reg.h>
@@ -77,7 +78,6 @@
#include <dev/isa/isavar.h>
#endif
-#define VERBOSE_INIT_ARM
/*
* Address to call from cpu_reset() to reset the machine.
@@ -153,8 +153,6 @@
int fcomcnattach __P((u_int iobase, int rate,tcflag_t cflag));
int fcomcndetach __P((void));
-void isa_cats_init __P((u_int iobase, u_int membase));
-
void map_section __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa,
int cacheable));
void map_pagetable __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa));
@@ -331,9 +329,10 @@
*/
u_int
-initarm(bootinfo)
- struct ebsaboot *bootinfo;
+initarm(bootargs)
+ void *bootargs;
{
+ struct ebsaboot *bootinfo = bootargs;
int loop;
int loop1;
u_int logical;
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/cats/include/isa_machdep.h
--- a/sys/arch/cats/include/isa_machdep.h Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/cats/include/isa_machdep.h Mon Jan 07 22:58:07 2002 +0000
@@ -1,3 +1,8 @@
-/* $NetBSD: isa_machdep.h,v 1.3 2001/12/07 23:09:32 chris Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.4 2002/01/07 22:58:08 chris Exp $ */
+
+#ifndef _CATS_ISA_MACHDEP_H_
+#define _CATS_ISA_MACHDEP_H_
+void isa_cats_init __P((u_int, u_int));
#include <arm/isa_machdep.h>
+#endif
diff -r f0dd5c8f1291 -r 9a198b6d61aa sys/arch/cats/isa/isa_machdep.c
--- a/sys/arch/cats/isa/isa_machdep.c Mon Jan 07 22:48:30 2002 +0000
+++ b/sys/arch/cats/isa/isa_machdep.c Mon Jan 07 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.2 2001/06/09 10:29:16 chris Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.3 2002/01/07 22:58:09 chris Exp $ */
/*-
* Copyright (c) 1996-1998 The NetBSD Foundation, Inc.
@@ -103,6 +103,9 @@
#include "isadma.h"
+/* prototypes */
+static void isa_icu_init __P((void));
+
struct arm32_isa_chipset isa_chipset_tag;
void isa_strayintr __P((int));
@@ -125,7 +128,7 @@
* Fill in default interrupt table (in case of spuruious interrupt
* during configuration of kernel, setup interrupt control unit
*/
-void
+static void
isa_icu_init(void)
{
/* initialize 8259's */
Home |
Main Index |
Thread Index |
Old Index