diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-07-09 03:30:21 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-07-09 03:30:21 +0000 |
commit | d1038c6130eac75103cc85145ef155f79428beec (patch) | |
tree | 1d5e10358e0cbbedb0302024553c8ffe4435c8bb /sys/arch/powerpc/mac | |
parent | 3e7842b4de7a9a67da9269417ec0744af9f5b7e4 (diff) |
a wagon and a small cart of protos, spaces, and includes
Diffstat (limited to 'sys/arch/powerpc/mac')
-rw-r--r-- | sys/arch/powerpc/mac/abtn.c | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/adb_direct.c | 11 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/adb_direct.h | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/akbd.c | 11 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/ams.c | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/awacs.c | 9 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/gpio.c | 5 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/if_bm.c | 24 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/if_gm.c | 12 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/if_wi_obio.c | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/macintr.c | 22 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/openpic.c | 26 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/viareg.h | 19 | ||||
-rw-r--r-- | sys/arch/powerpc/mac/wdc_obio.c | 9 |
14 files changed, 87 insertions, 74 deletions
diff --git a/sys/arch/powerpc/mac/abtn.c b/sys/arch/powerpc/mac/abtn.c index 4ff7583a46a..ec717dd5e18 100644 --- a/sys/arch/powerpc/mac/abtn.c +++ b/sys/arch/powerpc/mac/abtn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: abtn.c,v 1.2 2001/07/04 08:38:49 niklas Exp $ */ +/* $OpenBSD: abtn.c,v 1.3 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp $ */ /*- @@ -32,6 +32,7 @@ #include <sys/systm.h> #include <powerpc/mac/adbvar.h> +#include <powerpc/mac/pm_direct.h> #define NVRAM_BRIGHTNESS 0x140e #define ABTN_HANDLER_ID 31 diff --git a/sys/arch/powerpc/mac/adb_direct.c b/sys/arch/powerpc/mac/adb_direct.c index 4bc5fb139b4..aa8e8a326db 100644 --- a/sys/arch/powerpc/mac/adb_direct.c +++ b/sys/arch/powerpc/mac/adb_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb_direct.c,v 1.6 2001/07/04 08:38:49 niklas Exp $ */ +/* $OpenBSD: adb_direct.c,v 1.7 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ /* From: adb_direct.c 2.02 4/18/97 jpw */ @@ -72,6 +72,8 @@ #include <powerpc/mac/viareg.h> #include <powerpc/mac/adbvar.h> +#include <powerpc/mac/adb_direct.h> +#include <powerpc/mac/pm_direct.h> #define printf_intr printf @@ -278,7 +280,6 @@ int get_adb_info __P((ADBDataBlock *, int)); int set_adb_info __P((ADBSetInfoBlock *, int)); void adb_setup_hw_type __P((void)); int adb_op __P((Ptr, Ptr, Ptr, short)); -int adb_op_sync __P((Ptr, Ptr, Ptr, short)); void adb_read_II __P((u_char *)); void adb_hw_setup __P((void)); void adb_hw_setup_IIsi __P((u_char *)); @@ -1004,9 +1005,8 @@ adb_soft_intr(void) /* call default completion routine if it's valid */ if (comprout) { - int (*f)() = (void *)comprout; - - (*f)(buffer, compdata, cmd); + ((int (*) __P((u_char *, u_char*, int))) comprout) + (buffer, compdata, cmd); #if 0 #ifdef __NetBSD__ asm(" movml #0xffff,sp@- | save all registers @@ -2177,7 +2177,6 @@ adb_cuda_autopoll() volatile int flag = 0; int result; u_char output[16]; - extern void adb_op_comprout(); output[0] = 0x03; /* 3-byte message */ output[1] = 0x01; /* to pram/rtc device */ diff --git a/sys/arch/powerpc/mac/adb_direct.h b/sys/arch/powerpc/mac/adb_direct.h index 46439b45063..4d2030085ef 100644 --- a/sys/arch/powerpc/mac/adb_direct.h +++ b/sys/arch/powerpc/mac/adb_direct.h @@ -1,4 +1,4 @@ -/* $OpenBSD: adb_direct.h,v 1.2 2001/07/04 08:38:49 niklas Exp $ */ +/* $OpenBSD: adb_direct.h,v 1.3 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: adb_direct.h,v 1.1 1998/05/15 10:15:47 tsubai Exp $ */ /* @@ -52,3 +52,4 @@ int SetADBInfo __P((ADBSetInfoBlock *info, int adbAddr)); int ADBOp __P((Ptr buffer, Ptr compRout, Ptr data, short commandNum)); int adb_read_date_time __P((unsigned long *)); int adb_set_date_time __P((unsigned long)); +int adb_op_sync __P((Ptr, Ptr, Ptr, short)); diff --git a/sys/arch/powerpc/mac/akbd.c b/sys/arch/powerpc/mac/akbd.c index 7544ab1ee89..f1b243189b6 100644 --- a/sys/arch/powerpc/mac/akbd.c +++ b/sys/arch/powerpc/mac/akbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: akbd.c,v 1.7 2001/07/04 08:38:50 niklas Exp $ */ +/* $OpenBSD: akbd.c,v 1.8 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: akbd.c,v 1.13 2001/01/25 14:08:55 tsubai Exp $ */ /* @@ -54,6 +54,8 @@ #include <powerpc/mac/akbdmap.h> #include <powerpc/mac/akbdvar.h> #include <powerpc/mac/amsvar.h> +#include <powerpc/mac/adb_direct.h> +#include <powerpc/mac/pm_direct.h> #include "aed.h" @@ -84,6 +86,7 @@ extern struct cfdriver akbd_cd; int akbd_enable __P((void *, int)); void akbd_set_leds __P((void *, int)); int akbd_ioctl __P((void *, u_long, caddr_t, int, struct proc *)); +int akbd_intr __P((adb_event_t *event)); struct wskbd_accessops akbd_accessops = { akbd_enable, @@ -311,7 +314,7 @@ kbd_processevent(event, ksc) new_event = *event; new_event.u.k.key = event->bytes[0]; new_event.bytes[1] = 0xff; - kbd_intr(&new_event); + akbd_intr(&new_event); #if NAED > 0 aed_input(&new_event); #endif @@ -319,7 +322,7 @@ kbd_processevent(event, ksc) new_event.u.k.key = event->bytes[1]; new_event.bytes[0] = event->bytes[1]; new_event.bytes[1] = 0xff; - kbd_intr(&new_event); + akbd_intr(&new_event); #if NAED > 0 aed_input(&new_event); #endif @@ -466,7 +469,7 @@ static int polledkey; extern int adb_polling; int -kbd_intr(event) +akbd_intr(event) adb_event_t *event; { int key, press, val; diff --git a/sys/arch/powerpc/mac/ams.c b/sys/arch/powerpc/mac/ams.c index 09b9486d0da..8fca4d070f9 100644 --- a/sys/arch/powerpc/mac/ams.c +++ b/sys/arch/powerpc/mac/ams.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ams.c,v 1.3 2001/07/04 08:38:50 niklas Exp $ */ +/* $OpenBSD: ams.c,v 1.4 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */ /* @@ -48,6 +48,7 @@ #include <powerpc/mac/adbvar.h> #include <powerpc/mac/aedvar.h> #include <powerpc/mac/amsvar.h> +#include <powerpc/mac/adb_direct.h> #include "aed.h" diff --git a/sys/arch/powerpc/mac/awacs.c b/sys/arch/powerpc/mac/awacs.c index fa749fae8f7..e4e34ba9d05 100644 --- a/sys/arch/powerpc/mac/awacs.c +++ b/sys/arch/powerpc/mac/awacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awacs.c,v 1.6 2001/07/04 08:38:51 niklas Exp $ */ +/* $OpenBSD: awacs.c,v 1.7 2001/07/09 03:30:19 mickey Exp $ */ /* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */ /*- @@ -110,6 +110,7 @@ void awacs_write_codec(struct awacs_softc *, int); void awacs_set_speaker_volume(struct awacs_softc *, int, int); void awacs_set_ext_volume(struct awacs_softc *, int, int); int awacs_set_rate(struct awacs_softc *, int); +void awacs_mono16_to_stereo16 __P((void *v, u_char *p, int cc)); struct cfattach awacs_ca = { sizeof(struct awacs_softc), awacs_match, awacs_attach @@ -496,8 +497,8 @@ awacs_query_encoding(h, ae) } } -static void -mono16_to_stereo16(v, p, cc) +void +awacs_mono16_to_stereo16(v, p, cc) void *v; u_char *p; int cc; @@ -563,7 +564,7 @@ awacs_set_params(h, setmode, usemode, play, rec) case AUDIO_ENCODING_SLINEAR_BE: if (p->channels == 1) { p->factor = 2; - p->sw_code = mono16_to_stereo16; + p->sw_code = awacs_mono16_to_stereo16; break; } if (p->precision != 16) diff --git a/sys/arch/powerpc/mac/gpio.c b/sys/arch/powerpc/mac/gpio.c index c19d65695ea..9d35eff2bd3 100644 --- a/sys/arch/powerpc/mac/gpio.c +++ b/sys/arch/powerpc/mac/gpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpio.c,v 1.3 2001/07/04 08:38:51 niklas Exp $ */ +/* $OpenBSD: gpio.c,v 1.4 2001/07/09 03:30:20 mickey Exp $ */ /* $NetBSD: gpio.c,v 1.2 2001/02/27 05:16:33 matt Exp $ */ /*- @@ -38,6 +38,9 @@ #include <sys/kernel.h> #include <sys/device.h> #include <sys/malloc.h> + +#include <dev/ofw/openfirm.h> + #include <machine/autoconf.h> #include <machine/pio.h> diff --git a/sys/arch/powerpc/mac/if_bm.c b/sys/arch/powerpc/mac/if_bm.c index e7b17fc8eef..ac161f76a26 100644 --- a/sys/arch/powerpc/mac/if_bm.c +++ b/sys/arch/powerpc/mac/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.7 2001/06/25 23:29:55 drahn Exp $ */ +/* $OpenBSD: if_bm.c,v 1.8 2001/07/09 03:30:20 mickey Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -120,6 +120,10 @@ static int bmac_mediachange __P((struct ifnet *)); static void bmac_mediastatus __P((struct ifnet *, struct ifmediareq *)); static void bmac_setladrf __P((struct bmac_softc *)); void bmac_init_mif __P((struct bmac_softc *sc)); +u_int bmac_mif_readbits __P((struct bmac_softc *sc, int nb)); +void bmac_mif_writebits __P((struct bmac_softc *sc, u_int val, int nb)); +u_int bmac_mif_read __P((struct bmac_softc *sc, u_int addr)); +void bmac_mif_write __P((struct bmac_softc *sc, u_int addr, u_int val)); struct cfattach bm_ca = { sizeof(struct bmac_softc), bmac_match, bmac_attach @@ -401,13 +405,13 @@ bmac_init_dma(sc) for (i = 0; i < BMAC_RXBUFS; i++) { DBDMA_BUILD(cmd, DBDMA_CMD_IN_LAST, 0, BMAC_BUFLEN, - vtophys(sc->sc_rxbuf + BMAC_BUFLEN * i), + vtophys((vaddr_t)(sc->sc_rxbuf + BMAC_BUFLEN * i)), DBDMA_INT_ALWAYS, DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER); cmd++; } DBDMA_BUILD(cmd, DBDMA_CMD_NOP, 0, 0, 0, DBDMA_INT_NEVER, DBDMA_WAIT_NEVER, DBDMA_BRANCH_ALWAYS); - dbdma_st32(&cmd->d_cmddep, vtophys(sc->sc_rxcmd)); + dbdma_st32(&cmd->d_cmddep, vtophys((vaddr_t)sc->sc_rxcmd)); sc->sc_rxlast = 0; @@ -976,7 +980,7 @@ allmulti: #define MIFDELAY delay(1) -unsigned int +u_int bmac_mif_readbits(sc, nb) struct bmac_softc *sc; int nb; @@ -1001,7 +1005,7 @@ bmac_mif_readbits(sc, nb) void bmac_mif_writebits(sc, val, nb) struct bmac_softc *sc; - unsigned int val; + u_int val; int nb; { int b; @@ -1015,12 +1019,12 @@ bmac_mif_writebits(sc, val, nb) } } -unsigned int +u_int bmac_mif_read(sc, addr) struct bmac_softc *sc; - unsigned int addr; + u_int addr; { - unsigned int val; + u_int val; bmac_write_reg(sc, MIFCSR, 4); MIFDELAY; @@ -1041,8 +1045,8 @@ bmac_mif_read(sc, addr) void bmac_mif_write(sc, addr, val) struct bmac_softc *sc; - unsigned int addr; - unsigned int val; + u_int addr; + u_int val; { bmac_write_reg(sc, MIFCSR, 4); MIFDELAY; diff --git a/sys/arch/powerpc/mac/if_gm.c b/sys/arch/powerpc/mac/if_gm.c index 406fcb1a293..e9d6ea5dd11 100644 --- a/sys/arch/powerpc/mac/if_gm.c +++ b/sys/arch/powerpc/mac/if_gm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gm.c,v 1.15 2001/06/26 19:06:17 maja Exp $ */ +/* $OpenBSD: if_gm.c,v 1.16 2001/07/09 03:30:20 mickey Exp $ */ /* $NetBSD: if_gm.c,v 1.2 2000/03/04 11:17:00 tsubai Exp $ */ /*- @@ -123,6 +123,7 @@ void gmac_setladrf __P((struct gmac_softc *)); int gmac_ioctl __P((struct ifnet *, u_long, caddr_t)); void gmac_watchdog __P((struct ifnet *)); +void gmac_enable_hack __P((void)); int gmac_mediachange __P((struct ifnet *)); void gmac_mediastatus __P((struct ifnet *, struct ifmediareq *)); @@ -286,7 +287,7 @@ gmac_attach(parent, self, aux) dp = sc->sc_rxlist; for (i = 0; i < NRXBUF; i++) { sc->sc_rxbuf[i] = p; - dp->address = htole32(vtophys(p)); + dp->address = htole32(vtophys((vaddr_t)p)); dp->cmd = htole32(GMAC_OWN); dp++; p += 2048; @@ -295,7 +296,7 @@ gmac_attach(parent, self, aux) dp = sc->sc_txlist; for (i = 0; i < NTXBUF; i++) { sc->sc_txbuf[i] = p; - dp->address = htole32(vtophys(p)); + dp->address = htole32(vtophys((vaddr_t)p)); dp++; p += 2048; } @@ -677,9 +678,9 @@ gmac_reset(sc) __asm __volatile ("sync"); gmac_write_reg(sc, GMAC_TXDMADESCBASEHI, 0); - gmac_write_reg(sc, GMAC_TXDMADESCBASELO, vtophys(sc->sc_txlist)); + gmac_write_reg(sc, GMAC_TXDMADESCBASELO, vtophys((vaddr_t)sc->sc_txlist)); gmac_write_reg(sc, GMAC_RXDMADESCBASEHI, 0); - gmac_write_reg(sc, GMAC_RXDMADESCBASELO, vtophys(sc->sc_rxlist)); + gmac_write_reg(sc, GMAC_RXDMADESCBASELO, vtophys((vaddr_t)sc->sc_rxlist)); gmac_write_reg(sc, GMAC_RXDMAKICK, NRXBUF); splx(s); @@ -1133,6 +1134,7 @@ gmac_mii_tick(v) timeout(gmac_mii_tick, sc, hz); } + void gmac_enable_hack() { diff --git a/sys/arch/powerpc/mac/if_wi_obio.c b/sys/arch/powerpc/mac/if_wi_obio.c index 8d4c930f9b7..96b732434b6 100644 --- a/sys/arch/powerpc/mac/if_wi_obio.c +++ b/sys/arch/powerpc/mac/if_wi_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_obio.c,v 1.2 2001/06/25 23:29:56 drahn Exp $ */ +/* $OpenBSD: if_wi_obio.c,v 1.3 2001/07/09 03:30:20 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -60,6 +60,8 @@ #include <netinet/if_ether.h> #endif +#include <net/if_ieee80211.h> + #include <machine/bus.h> #include <machine/autoconf.h> diff --git a/sys/arch/powerpc/mac/macintr.c b/sys/arch/powerpc/mac/macintr.c index 49248d4ca25..01ca36eb5e5 100644 --- a/sys/arch/powerpc/mac/macintr.c +++ b/sys/arch/powerpc/mac/macintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macintr.c,v 1.13 2001/06/29 06:55:36 drahn Exp $ */ +/* $OpenBSD: macintr.c,v 1.14 2001/07/09 03:30:20 mickey Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -70,13 +70,13 @@ int virq_max = 0; struct evcnt evirq[ICU_LEN*2]; static int fakeintr __P((void *)); -static char *intr_typename(int type); -static void intr_calculatemasks(); -static void enable_irq(int x); -static __inline int cntlzw(int x); -static int mapirq(int irq); -static int read_irq(); -static void mac_intr_do_pending_int(); +static char *intr_typename __P((int type)); +static void intr_calculatemasks __P((void)); +static void enable_irq __P((int x)); +static __inline int cntlzw __P((int x)); +static int mapirq __P((int irq)); +static int read_irq __P((void)); +static void mac_intr_do_pending_int __P((void)); extern u_int32_t *heathrow_FCR; @@ -98,8 +98,8 @@ struct macintr_softc { int macintr_match __P((struct device *parent, void *cf, void *aux)); void macintr_attach __P((struct device *, struct device *, void *)); -void mac_do_pending_int(); -void mac_ext_intr(); +void mac_do_pending_int __P((void)); +void mac_ext_intr __P((void)); struct cfattach macintr_ca = { sizeof(struct macintr_softc), @@ -150,7 +150,7 @@ intr_establish_t macintr_establish; intr_disestablish_t macintr_disestablish; extern intr_establish_t *mac_intr_establish_func; extern intr_disestablish_t *mac_intr_disestablish_func; -void macintr_collect_preconf_intr(); +void macintr_collect_preconf_intr __P((void)); void macintr_attach(parent, self, aux) diff --git a/sys/arch/powerpc/mac/openpic.c b/sys/arch/powerpc/mac/openpic.c index 76ef7a6b10c..9e0a7d5a586 100644 --- a/sys/arch/powerpc/mac/openpic.c +++ b/sys/arch/powerpc/mac/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.15 2001/06/29 06:55:36 drahn Exp $ */ +/* $OpenBSD: openpic.c,v 1.16 2001/07/09 03:30:20 mickey Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -70,11 +70,12 @@ static int virq_max = 0; struct evcnt evirq[ICU_LEN]; static int fakeintr __P((void *)); -static char *intr_typename(int type); -static void intr_calculatemasks(); -static __inline int cntlzw(int x); -static int mapirq(int irq); -void openpic_enable_irq_mask(int irq_mask); +static char *intr_typename __P((int type)); +static void intr_calculatemasks __P((void)); +static __inline int cntlzw __P((int x)); +static int mapirq __P((int irq)); +int prog_switch __P((void *arg)); +void openpic_enable_irq_mask __P((int irq_mask)); extern u_int32_t *heathrow_FCR; @@ -86,7 +87,7 @@ static __inline u_int openpic_read __P((int)); static __inline void openpic_write __P((int, u_int)); void openpic_enable_irq __P((int, int)); void openpic_disable_irq __P((int)); -void openpic_init(); +void openpic_init __P((void)); void openpic_set_priority __P((int, int)); static __inline int openpic_read_irq __P((int)); static __inline void openpic_eoi __P((int)); @@ -97,8 +98,9 @@ struct openpic_softc { int openpic_match __P((struct device *parent, void *cf, void *aux)); void openpic_attach __P((struct device *, struct device *, void *)); -void openpic_do_pending_int(); -void ext_intr_openpic(); +void openpic_do_pending_int __P((void)); +void openpic_collect_preconf_intr __P((void)); +void ext_intr_openpic __P((void)); struct cfattach openpic_ca = { sizeof(struct openpic_softc), @@ -133,13 +135,12 @@ openpic_match(parent, cf, aux) u_int8_t *interrupt_reg; typedef void (void_f) (void); extern void_f *pending_int_f; -static int prog_switch (void *arg); vaddr_t openpic_base; void * openpic_intr_establish( void * lcv, int irq, int type, int level, int (*ih_fun) __P((void *)), void *ih_arg, char *name); void openpic_intr_disestablish( void *lcp, void *arg); -void openpic_collect_preconf_intr(); +void openpic_collect_preconf_intr __P((void)); void openpic_attach(parent, self, aux) @@ -178,6 +179,7 @@ openpic_attach(parent, self, aux) printf("\n"); } + void openpic_collect_preconf_intr() { @@ -196,7 +198,7 @@ openpic_collect_preconf_intr() } } -static int +int prog_switch (void *arg) { #ifdef DDB diff --git a/sys/arch/powerpc/mac/viareg.h b/sys/arch/powerpc/mac/viareg.h index fd122465f60..ce48b7762c9 100644 --- a/sys/arch/powerpc/mac/viareg.h +++ b/sys/arch/powerpc/mac/viareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: viareg.h,v 1.2 2001/07/04 08:38:52 niklas Exp $ */ +/* $OpenBSD: viareg.h,v 1.3 2001/07/09 03:30:20 mickey Exp $ */ /* $NetBSD: viareg.h,v 1.2 1998/10/20 14:56:30 tsubai Exp $ */ /*- @@ -190,8 +190,7 @@ extern volatile unsigned char *Via1Base; #include <machine/pio.h> static __inline void -via_reg_and(ign, reg, val) - int ign, reg, val; +via_reg_and(int ign, int reg, int val) { volatile unsigned char *addr = Via1Base + reg; @@ -199,8 +198,7 @@ via_reg_and(ign, reg, val) } static __inline void -via_reg_or(ign, reg, val) - int ign, reg, val; +via_reg_or(int ign, int reg, int val) { volatile unsigned char *addr = Via1Base + reg; @@ -208,8 +206,7 @@ via_reg_or(ign, reg, val) } static __inline void -via_reg_xor(ign, reg, val) - int ign, reg, val; +via_reg_xor(int ign, int reg, int val) { volatile unsigned char *addr = Via1Base + reg; @@ -217,8 +214,7 @@ via_reg_xor(ign, reg, val) } static __inline int -read_via_reg(ign, reg) - int ign, reg; +read_via_reg(int ign, int reg) { volatile unsigned char *addr = Via1Base + reg; @@ -226,16 +222,13 @@ read_via_reg(ign, reg) } static __inline void -write_via_reg(ign, reg, val) - int ign, reg, val; +write_via_reg(int ign, int reg, int val) { volatile unsigned char *addr = Via1Base + reg; out8(addr, val); } - - #define vDirA_ADBState 0x30 void via_init __P((void)); diff --git a/sys/arch/powerpc/mac/wdc_obio.c b/sys/arch/powerpc/mac/wdc_obio.c index b2e0ec03b1f..baf6528089a 100644 --- a/sys/arch/powerpc/mac/wdc_obio.c +++ b/sys/arch/powerpc/mac/wdc_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc_obio.c,v 1.9 2001/06/25 23:29:57 drahn Exp $ */ +/* $OpenBSD: wdc_obio.c,v 1.10 2001/07/09 03:30:20 mickey Exp $ */ /* $NetBSD: wdc_obio.c,v 1.4 1999/06/14 08:53:06 tsubai Exp $ */ /*- @@ -47,6 +47,7 @@ #include <machine/bus.h> #include <machine/autoconf.h> +#include <dev/ofw/openfirm.h> #include <dev/ata/atavar.h> #include <dev/ata/atareg.h> #include <dev/ic/wdcvar.h> @@ -227,9 +228,9 @@ static struct { int cycle; /* minimum cycle time [ns] */ int active; /* minimum command active time [ns] */ } dma_timing[3] = { - 480, 215, /* Mode 0 */ - 150, 80, /* Mode 1 */ - 120, 70, /* Mode 2 */ + { 480, 215 }, /* Mode 0 */ + { 150, 80 }, /* Mode 1 */ + { 120, 70 }, /* Mode 2 */ }; #define TIME_TO_TICK(time) howmany((time), 30) |