summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvmeppc/dev/clock.c11
-rw-r--r--sys/arch/mvmeppc/dev/cpu.c5
-rw-r--r--sys/arch/mvmeppc/dev/openpic.c30
-rw-r--r--sys/arch/mvmeppc/include/bus.h5
-rw-r--r--sys/arch/mvmeppc/include/bus_mi.h14
-rw-r--r--sys/arch/mvmeppc/isa/isa_machdep.c3
-rw-r--r--sys/arch/mvmeppc/mvmeppc/autoconf.c8
-rw-r--r--sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c69
-rw-r--r--sys/arch/mvmeppc/pci/mpcpcibr.c143
9 files changed, 151 insertions, 137 deletions
diff --git a/sys/arch/mvmeppc/dev/clock.c b/sys/arch/mvmeppc/dev/clock.c
index c5cf7eb219a..debc9544d6a 100644
--- a/sys/arch/mvmeppc/dev/clock.c
+++ b/sys/arch/mvmeppc/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.4 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: clock.c,v 1.5 2002/06/08 15:49:52 miod Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -40,7 +40,10 @@
#include <machine/intr.h>
#include <machine/powerpc.h>
-void resettodr();
+void resettodr(void);
+void decr_intr(struct clockframe *);
+void calc_delayconst(void);
+
/*
* Initially we assume a processor with a bus frequency of 12.5 MHz.
*/
@@ -251,7 +254,7 @@ static unsigned cnt = 1001;
#endif
void
decr_intr(frame)
-struct clockframe *frame;
+ struct clockframe *frame;
{
int msr;
u_long tb;
@@ -343,7 +346,7 @@ calc_delayconst()
}
static inline u_quad_t
-mftb()
+mftb(void)
{
u_long scratch;
u_quad_t tb;
diff --git a/sys/arch/mvmeppc/dev/cpu.c b/sys/arch/mvmeppc/dev/cpu.c
index 01b1d10690e..18e2d3b7430 100644
--- a/sys/arch/mvmeppc/dev/cpu.c
+++ b/sys/arch/mvmeppc/dev/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.3 2001/11/06 22:45:54 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.4 2002/06/08 15:49:52 miod Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -69,7 +69,8 @@ cpumatch(parent, cfdata, aux)
return (1);
}
-void config_l2cr();
+
+void config_l2cr(void);
static void
cpuattach(parent, dev, aux)
diff --git a/sys/arch/mvmeppc/dev/openpic.c b/sys/arch/mvmeppc/dev/openpic.c
index d987ba026a2..d2fc263db0c 100644
--- a/sys/arch/mvmeppc/dev/openpic.c
+++ b/sys/arch/mvmeppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.8 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: openpic.c,v 1.9 2002/06/08 15:49:52 miod Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -87,7 +87,7 @@ struct evcnt evirq[ICU_LEN];
static int fakeintr(void *);
static char *intr_typename(int type);
-static void intr_calculatemasks();
+static void intr_calculatemasks(void);
static __inline int cntlzw(int x);
static int mapirq(int irq);
void openpic_enable_irq_mask(int irq_mask);
@@ -101,18 +101,20 @@ static __inline u_int openpic_read(int);
static __inline void openpic_write(int, u_int);
void openpic_enable_irq(int, int);
void openpic_disable_irq(int);
-void openpic_init();
+void openpic_init(void);
void openpic_set_priority(int, int);
void openpic_set_vec_pri(int, int);
static __inline int openpic_read_irq(int);
static __inline void openpic_eoi(int);
+void openpic_initirq(int, int, int, int, int);
void i8259_init(void);
int i8259_intr(void);
void i8259_enable_irq(int, int);
void i8259_disable_irq(int);
-void *i8259_intr_establish( void * lcv, int irq, int type, int level,
- int (*ih_fun)(void *), void *ih_arg, char *name);
+void *i8259_intr_establish(void *, int, int, int, int (*)(void *), void *,
+ char *);
+void i8259_set_irq_mask(void);
struct openpic_softc {
struct device sc_dev;
@@ -120,8 +122,8 @@ struct openpic_softc {
int openpic_match(struct device *parent, void *cf, void *aux);
void openpic_attach(struct device *, struct device *, void *);
-void openpic_do_pending_int();
-void ext_intr_openpic();
+void openpic_do_pending_int(void);
+void ext_intr_openpic(void);
struct cfattach openpic_ca = {
sizeof(struct openpic_softc),
@@ -174,15 +176,15 @@ static int i8259_dummy (void *arg);
typedef int mac_intr_handle_t;
-typedef void *(intr_establish_t)(void *, mac_intr_handle_t,
- int, int, int (*func)(void *), void *, char *);
-typedef void (intr_disestablish_t)(void *, void *);
+typedef void *(intr_establish_t)(void *, mac_intr_handle_t,
+ int, int, int (*)(void *), void *, char *);
+typedef void (intr_disestablish_t)(void *, void *);
static vaddr_t openpic_base;
-void * openpic_intr_establish( void * lcv, int irq, int type, int level,
- int (*ih_fun)(void *), void *ih_arg, char *name);
-void openpic_intr_disestablish( void *lcp, void *arg);
-void openpic_collect_preconf_intr();
+void * openpic_intr_establish(void *, int, int, int, int (*)(void *), void *,
+ char *);
+void openpic_intr_disestablish(void *, void *);
+void openpic_collect_preconf_intr(void);
void
openpic_attach(parent, self, aux)
diff --git a/sys/arch/mvmeppc/include/bus.h b/sys/arch/mvmeppc/include/bus.h
index 454930f24a1..5b56ac1f3c6 100644
--- a/sys/arch/mvmeppc/include/bus.h
+++ b/sys/arch/mvmeppc/include/bus.h
@@ -1,5 +1,5 @@
/* $NetBSD: bus.h,v 1.6 2001/06/15 15:50:05 nonaka Exp $ */
-/* $OpenBSD: bus.h,v 1.1 2001/06/26 21:57:43 smurph Exp $ */
+/* $OpenBSD: bus.h,v 1.2 2002/06/08 15:49:57 miod Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -125,4 +125,7 @@ extern const struct ppc_bus_space prep_isa_io_space_tag;
extern const struct ppc_bus_space prep_mem_space_tag;
extern const struct ppc_bus_space prep_isa_mem_space_tag;
+void prep_bus_space_init(void);
+void prep_bus_space_mallocok(void);
+
#endif /* _PREP_BUS_H_ */
diff --git a/sys/arch/mvmeppc/include/bus_mi.h b/sys/arch/mvmeppc/include/bus_mi.h
index 80bd5ea12bd..efb4f8a0b13 100644
--- a/sys/arch/mvmeppc/include/bus_mi.h
+++ b/sys/arch/mvmeppc/include/bus_mi.h
@@ -1,5 +1,5 @@
/* $NetBSD: bus.h,v 1.1 2001/06/06 17:37:37 matt Exp $ */
-/* $OpenBSD: bus_mi.h,v 1.4 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: bus_mi.h,v 1.5 2002/06/08 15:49:57 miod Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -255,8 +255,8 @@ static __inline void \
CAT(bus_space_read_multi_,n)(bus_space_tag_t tag, bus_space_handle_t bsh, \
bus_size_t offset, CAT3(u_int,m,_t) *addr, size_t count) \
{ \
- CAT3(ins,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (offset)), \
- (CAT3(u_int,m,_t) *)addr, (size_t)count); \
+ while (count--) \
+ *addr++ = CAT(bus_space_read_,n)(tag, bsh, offset); \
}
bus_space_read_multi(1,8)
@@ -264,6 +264,7 @@ bus_space_read_multi(2,16)
bus_space_read_multi(4,32)
#define bus_space_read_multi_8 !!! bus_space_read_multi_8 not implemented !!!
+#if 0
/*
* void bus_space_read_multi_stream_N(bus_space_tag_t tag,
* bus_space_handle_t bsh, bus_size_t offset,
@@ -296,6 +297,7 @@ bus_space_read_multi_stream(4,32)
* Write the 1, 2, 4, or 8 byte value `value' to bus space
* described by tag/handle/offset.
*/
+#endif
#define bus_space_write(n,m) \
static __inline void \
@@ -345,8 +347,8 @@ static __inline void \
CAT(bus_space_write_multi_,n)(bus_space_tag_t tag, bus_space_handle_t bsh, \
bus_size_t offset, const CAT3(u_int,m,_t) *addr, size_t count) \
{ \
- CAT3(outs,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (offset)), \
- (CAT3(u_int,m,_t) *)addr, (size_t)count); \
+ while (count--) \
+ CAT(bus_space_write_,n)(tag, bsh, offset, *addr++); \
}
bus_space_write_multi(1,8)
@@ -354,6 +356,7 @@ bus_space_write_multi(2,16)
bus_space_write_multi(4,32)
#define bus_space_write_multi_8 !!! bus_space_write_multi_8 not implemented !!!
+#if 0
/*
* void bus_space_write_multi_stream_N(bus_space_tag_t tag,
* bus_space_handle_t bsh, bus_size_t offset,
@@ -377,6 +380,7 @@ bus_space_write_multi_stream(2,16)
bus_space_write_multi_stream(4,32)
#define bus_space_write_multi_stream_8 \
!!! bus_space_write_multi_stream_8 not implemented !!!
+#endif
/*
* void bus_space_read_region_N(bus_space_tag_t tag,
diff --git a/sys/arch/mvmeppc/isa/isa_machdep.c b/sys/arch/mvmeppc/isa/isa_machdep.c
index ddbafafe7d1..18d8760304c 100644
--- a/sys/arch/mvmeppc/isa/isa_machdep.c
+++ b/sys/arch/mvmeppc/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.4 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.5 2002/06/08 15:49:58 miod Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -137,6 +137,7 @@
void *i8259_intr_establish( void * lcv, int irq, int type, int level,
int (*ih_fun)(void *), void *ih_arg, char *name);
+void openpic_intr_disestablish(void *, void *);
int isa_has_been_seen = 0;
diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c
index 96265c7d4d3..e7350cb1d44 100644
--- a/sys/arch/mvmeppc/mvmeppc/autoconf.c
+++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.4 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: autoconf.c,v 1.5 2002/06/08 15:50:00 miod Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -41,7 +41,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.4 2002/03/14 01:26:41 millert Exp $
+ * $Id: autoconf.c,v 1.5 2002/06/08 15:50:00 miod Exp $
*/
/*
@@ -61,6 +61,7 @@
#include <sys/device.h>
#include <machine/autoconf.h>
+#include <machine/bugio.h>
struct device *parsedisk(char *, int, int, dev_t *);
void setroot(void);
@@ -73,7 +74,8 @@ struct device * getdevunit(char *, int);
static struct devmap * findtype(char **);
void makebootdev(char *cp);
int getpno(char **);
-void diskconf();
+void diskconf(void);
+void calc_delayconst(void); /* clock.c */
/*
* The following several variables are related to
diff --git a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c
index bfcf5632283..cc235a685f8 100644
--- a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c
+++ b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppc1_machdep.c,v 1.7 2002/06/07 01:01:40 miod Exp $ */
+/* $OpenBSD: ppc1_machdep.c,v 1.8 2002/06/08 15:50:00 miod Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -47,7 +47,7 @@
#include <machine/powerpc.h>
#include <machine/autoconf.h>
-#include <machine/prom.h>
+#include <machine/bugio.h>
#include <mvmeppc/dev/nvramreg.h>
#include <dev/cons.h>
@@ -65,6 +65,8 @@ int PPC1_clock_read(int *sec, int *min, int *hour, int *day,
int PPC1_clock_write(int sec, int min, int hour, int day,
int mon, int yr);
+vm_offset_t size_memory(void);
+
struct firmware ppc1_firmware = {
PPC1_mem_regions,
PPC1_exit,
@@ -143,7 +145,7 @@ size_memory(void)
break;
*look = save;
}
- look = (unsigned int *)0x02000000;
+look = (unsigned int *)0x03f00000; /* XXX */
physmem = btoc(trunc_page((unsigned)look)); /* in pages */
total_mem = trunc_page((unsigned)look);
#ifdef USE_BUG
@@ -188,12 +190,12 @@ void
PPC1_exit()
{
mvmeprom_return();
- panic ("PPC1_exit returned!"); /* just in case */
- while (1);
+ panic("PPC1_exit returned!"); /* just in case */
+ for (;;) ;
}
void
PPC1_boot(bootspec)
-char *bootspec;
+ char *bootspec;
{
u_int32_t msr, i = 10000;
@@ -207,24 +209,26 @@ char *bootspec;
/* signal a reset to system control port A - soft reset */
outb(0x80000092, inb(0x92) | 1);
- while ( i != 0 ) i++;
- panic("restart failed\n");
+ while (i != 0) i++;
+ panic("restart failed");
mvmeprom_return();
- printf ("PPC1_boot returned!"); /* just in case */
- while (1);
+ printf("PPC1_boot returned!"); /* just in case */
+ for (;;) ;
}
-unsigned char PPC1_nvram_rd(addr)
-unsigned long addr;
+unsigned char
+PPC1_nvram_rd(addr)
+ unsigned long addr;
{
outb(NVRAM_S0, addr);
outb(NVRAM_S1, addr>>8);
return inb(NVRAM_DATA);
}
-void PPC1_nvram_wr(addr, val)
-unsigned long addr;
-unsigned char val;
+void
+PPC1_nvram_wr(addr, val)
+ unsigned long addr;
+ unsigned char val;
{
outb(NVRAM_S0, addr);
outb(NVRAM_S1, addr>>8);
@@ -232,8 +236,8 @@ unsigned char val;
}
/* Function to get ticks per second. */
-
-unsigned long PPC1_tps(void)
+unsigned long
+PPC1_tps()
{
unsigned long start_val, ticks;
unsigned char val, sec;
@@ -246,7 +250,7 @@ unsigned long PPC1_tps(void)
/* look at seconds. */
sec = PPC1_nvram_rd(RTC_SECONDS);
- while (1) {
+ for (;;) {
if (PPC1_nvram_rd(RTC_SECONDS) != sec)
break;
}
@@ -255,7 +259,7 @@ unsigned long PPC1_tps(void)
/* wait until it changes. */
sec = PPC1_nvram_rd(RTC_SECONDS);
- while (1) {
+ for (;;) {
if (PPC1_nvram_rd(RTC_SECONDS) != sec)
break;
}
@@ -263,8 +267,8 @@ unsigned long PPC1_tps(void)
return (ticks);
}
-int PPC1_clock_write(int sec, int min, int hour, int day,
- int mon, int yr)
+int
+PPC1_clock_write(int sec, int min, int hour, int day, int mon, int yr)
{
unsigned char val;
@@ -285,8 +289,8 @@ int PPC1_clock_write(int sec, int min, int hour, int day,
return 0;
}
-int PPC1_clock_read(int *sec, int *min, int *hour, int *day,
- int *mon, int *yr)
+int
+PPC1_clock_read(int *sec, int *min, int *hour, int *day, int *mon, int *yr)
{
unsigned char val;
int i;
@@ -327,37 +331,36 @@ int PPC1_clock_read(int *sec, int *min, int *hour, int *day,
* Boot console routines:
* Enables printing of boot messages before consinit().
*/
-int
+cons_decl(boot);
+
+void
bootcnprobe(cp)
-struct consdev *cp;
+ struct consdev *cp;
{
cp->cn_dev = makedev(14, 0);
cp->cn_pri = CN_NORMAL;
- return (1);
}
-int
+void
bootcninit(cp)
-struct consdev *cp;
+ struct consdev *cp;
{
/* Nothing to do */
- return (1);
}
int
bootcngetc(dev)
-dev_t dev;
+ dev_t dev;
{
return (mvmeprom_getchar());
}
void
bootcnputc(dev, c)
-dev_t dev;
-char c;
+ dev_t dev;
+ char c;
{
if (c == '\n')
mvmeprom_outchar('\r');
mvmeprom_outchar(c);
}
-
diff --git a/sys/arch/mvmeppc/pci/mpcpcibr.c b/sys/arch/mvmeppc/pci/mpcpcibr.c
index 3709472ca0f..5a1c960f2d4 100644
--- a/sys/arch/mvmeppc/pci/mpcpcibr.c
+++ b/sys/arch/mvmeppc/pci/mpcpcibr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibr.c,v 1.9 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: mpcpcibr.c,v 1.10 2002/06/08 15:50:01 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
@@ -70,25 +70,20 @@ int mpc_intr_map(void *, pcitag_t, int, int, pci_intr_handle_t *);
const char *mpc_intr_string(void *, pci_intr_handle_t);
int mpc_intr_line(void *, pci_intr_handle_t);
void *mpc_intr_establish(void *, pci_intr_handle_t,
- int, int (*func)(void *), void *, char *);
+ int, int (*)(void *), void *, char *);
void mpc_intr_disestablish(void *, void *);
int mpc_ether_hw_addr(struct ppc_pci_chipset *, u_int8_t *);
-void
-mpc_cfg_write_1( struct pcibr_config *cp, u_int32_t reg, u_int8_t val);
-void
-mpc_cfg_write_2( struct pcibr_config *cp, u_int32_t reg, u_int16_t val);
-void
-mpc_cfg_write_4( struct pcibr_config *cp, u_int32_t reg, u_int32_t val);
+void mpc_cfg_write_1(struct pcibr_config *, u_int32_t, u_int8_t);
+void mpc_cfg_write_2(struct pcibr_config *, u_int32_t, u_int16_t);
+void mpc_cfg_write_4(struct pcibr_config *, u_int32_t, u_int32_t);
-u_int8_t
-mpc_cfg_read_1( struct pcibr_config *cp, u_int32_t reg);
+u_int8_t mpc_cfg_read_1(struct pcibr_config *, u_int32_t);
+u_int16_t mpc_cfg_read_2(struct pcibr_config *, u_int32_t);
+u_int32_t mpc_cfg_read_4(struct pcibr_config *, u_int32_t);
-u_int16_t
-mpc_cfg_read_2( struct pcibr_config *cp, u_int32_t reg);
-
-u_int32_t
-mpc_cfg_read_4( struct pcibr_config *cp, u_int32_t reg);
+u_int32_t pci_iack(void);
+u_int32_t mpc_gen_config_reg(void *, pcitag_t, int);
struct cfattach mpcpcibr_ca = {
sizeof(struct pcibr_softc), mpcpcibrmatch, mpcpcibrattach,
@@ -98,7 +93,7 @@ struct cfdriver mpcpcibr_cd = {
NULL, "mpcpcibr", DV_DULL,
};
-static int mpcpcibrprint(void *, const char *pnp);
+int mpcpcibrprint(void *, const char *pnp);
struct pcibr_config mpc_config;
@@ -131,8 +126,8 @@ struct powerpc_bus_dma_tag pci_bus_dma_tag = {
int
mpcpcibrmatch(parent, match, aux)
-struct device *parent;
-void *match, *aux;
+ struct device *parent;
+ void *match, *aux;
{
/* We must be a child of the raven device */
if (strcmp(parent->dv_cfdata->cf_driver->cd_name, "raven") != 0)
@@ -147,8 +142,8 @@ void *match, *aux;
int pci_map_a = 0;
void
mpcpcibrattach(parent, self, aux)
-struct device *parent, *self;
-void *aux;
+ struct device *parent, *self;
+ void *aux;
{
struct pcibr_softc *sc = (struct pcibr_softc *)self;
struct pcibr_config *lcp;
@@ -234,15 +229,15 @@ addbatmap(RAVEN_V_PCI_MEM_SPACE, RAVEN_P_PCI_MEM_SPACE, BAT_I);
#endif
/* enable mem and io mapping, and bus master */
mpc_cfg_write_2(lcp, RAVEN_PCI_CMD,
- RAVEN_CMD_IOSP|RAVEN_CMD_MEMSP|RAVEN_CMD_MASTR);
+ RAVEN_CMD_IOSP|RAVEN_CMD_MEMSP|RAVEN_CMD_MASTR);
config_found(self, &pba, mpcpcibrprint);
}
-static int
+int
mpcpcibrprint(aux, pnp)
-void *aux;
-const char *pnp;
+ void *aux;
+ const char *pnp;
{
struct pcibus_attach_args *pba = aux;
@@ -301,15 +296,15 @@ vaddr_t p;
void
mpc_attach_hook(parent, self, pba)
-struct device *parent, *self;
-struct pcibus_attach_args *pba;
+ struct device *parent, *self;
+ struct pcibus_attach_args *pba;
{
}
int
mpc_ether_hw_addr(p, ethaddr)
-struct ppc_pci_chipset *p;
-u_int8_t *ethaddr;
+ struct ppc_pci_chipset *p;
+ u_int8_t *ethaddr;
{
printf("mpc_ether_hw_addr not supported\n");
return (0);
@@ -317,8 +312,8 @@ u_int8_t *ethaddr;
int
mpc_bus_maxdevs(cpv, busno)
-void *cpv;
-int busno;
+ void *cpv;
+ int busno;
{
return (32);
}
@@ -329,17 +324,17 @@ int busno;
pcitag_t
mpc_make_tag(cpv, bus, dev, fnc)
-void *cpv;
-int bus, dev, fnc;
+ void *cpv;
+ int bus, dev, fnc;
{
return (bus << BUS_SHIFT) | (dev << DEVICE_SHIFT) | (fnc << FNC_SHIFT);
}
void
mpc_decompose_tag(cpv, tag, busp, devp, fncp)
-void *cpv;
-pcitag_t tag;
-int *busp, *devp, *fncp;
+ void *cpv;
+ pcitag_t tag;
+ int *busp, *devp, *fncp;
{
if (busp != NULL)
*busp = (tag >> BUS_SHIFT) & 0xff;
@@ -349,11 +344,11 @@ int *busp, *devp, *fncp;
*fncp = (tag >> FNC_SHIFT) & 0x7;
}
-static u_int32_t
+u_int32_t
mpc_gen_config_reg(cpv, tag, offset)
-void *cpv;
-pcitag_t tag;
-int offset;
+ void *cpv;
+ pcitag_t tag;
+ int offset;
{
struct pcibr_config *cp = cpv;
unsigned int bus, dev, fcn;
@@ -402,9 +397,9 @@ int offset;
/*#define DEBUG_CONFIG */
pcireg_t
mpc_conf_read(cpv, tag, offset)
-void *cpv;
-pcitag_t tag;
-int offset;
+ void *cpv;
+ pcitag_t tag;
+ int offset;
{
struct pcibr_config *cp = cpv;
@@ -453,10 +448,10 @@ int offset;
void
mpc_conf_write(cpv, tag, offset, data)
-void *cpv;
-pcitag_t tag;
-int offset;
-pcireg_t data;
+ void *cpv;
+ pcitag_t tag;
+ int offset;
+ pcireg_t data;
{
struct pcibr_config *cp = cpv;
u_int32_t reg;
@@ -497,10 +492,10 @@ pcireg_t data;
int
mpc_intr_map(lcv, bustag, buspin, line, ihp)
-void *lcv;
-pcitag_t bustag;
-int buspin, line;
-pci_intr_handle_t *ihp;
+ void *lcv;
+ pcitag_t bustag;
+ int buspin, line;
+ pci_intr_handle_t *ihp;
{
int error = 0;
@@ -520,8 +515,8 @@ pci_intr_handle_t *ihp;
const char *
mpc_intr_string(lcv, ih)
-void *lcv;
-pci_intr_handle_t ih;
+ void *lcv;
+ pci_intr_handle_t ih;
{
static char str[16];
@@ -545,12 +540,12 @@ extern intr_disestablish_t *intr_disestablish_func;
void *
mpc_intr_establish(lcv, ih, level, func, arg, name)
-void *lcv;
-pci_intr_handle_t ih;
-int level;
-int (*func)(void *);
-void *arg;
-char *name;
+ void *lcv;
+ pci_intr_handle_t ih;
+ int level;
+ int (*func)(void *);
+ void *arg;
+ char *name;
{
return (*intr_establish_func)(lcv, ih, IST_LEVEL, level, func, arg,
name);
@@ -558,7 +553,7 @@ char *name;
void
mpc_intr_disestablish(lcv, cookie)
-void *lcv, *cookie;
+ void *lcv, *cookie;
{
/* XXX We should probably do something clever here.... later */
}
@@ -577,9 +572,9 @@ pci_iack()
void
mpc_cfg_write_1(cp, reg, val)
-struct pcibr_config *cp;
-u_int32_t reg;
-u_int8_t val;
+ struct pcibr_config *cp;
+ u_int32_t reg;
+ u_int8_t val;
{
int s;
s = splhigh();
@@ -591,9 +586,9 @@ u_int8_t val;
void
mpc_cfg_write_2(cp, reg, val)
-struct pcibr_config *cp;
-u_int32_t reg;
-u_int16_t val;
+ struct pcibr_config *cp;
+ u_int32_t reg;
+ u_int16_t val;
{
int s;
s = splhigh();
@@ -604,9 +599,9 @@ u_int16_t val;
void
mpc_cfg_write_4(cp, reg, val)
-struct pcibr_config *cp;
-u_int32_t reg;
-u_int32_t val;
+ struct pcibr_config *cp;
+ u_int32_t reg;
+ u_int32_t val;
{
int s;
@@ -618,8 +613,8 @@ u_int32_t val;
u_int8_t
mpc_cfg_read_1(cp, reg)
-struct pcibr_config *cp;
-u_int32_t reg;
+ struct pcibr_config *cp;
+ u_int32_t reg;
{
u_int8_t _v_;
@@ -633,8 +628,8 @@ u_int32_t reg;
u_int16_t
mpc_cfg_read_2(cp, reg)
-struct pcibr_config *cp;
-u_int32_t reg;
+ struct pcibr_config *cp;
+ u_int32_t reg;
{
u_int16_t _v_;
@@ -648,8 +643,8 @@ u_int32_t reg;
u_int32_t
mpc_cfg_read_4(cp, reg)
-struct pcibr_config *cp;
-u_int32_t reg;
+ struct pcibr_config *cp;
+ u_int32_t reg;
{
u_int32_t _v_;