summaryrefslogtreecommitdiffstats
path: root/sys/dev/pcic/i82365var.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-12-07 06:44:38 +0000
committerimp <imp@FreeBSD.org>1999-12-07 06:44:38 +0000
commit03f3b6304174aefc44a82f53d0d1d13f3f1d2c2a (patch)
tree8b99c325ef54ec681b6472d6d6c59562288d5706 /sys/dev/pcic/i82365var.h
parent4efb27971818504cb318693917f7ec92b51a9c80 (diff)
downloadFreeBSD-src-03f3b6304174aefc44a82f53d0d1d13f3f1d2c2a.zip
FreeBSD-src-03f3b6304174aefc44a82f53d0d1d13f3f1d2c2a.tar.gz
Tonight's cleanups.
o Implement memory and I/O activation/deactivation. irq not handled. o switch pcic_chip functions around to use more convenient types. o kill __P and most of the old K&R prototypes just to be mean. o minor other nits
Diffstat (limited to 'sys/dev/pcic/i82365var.h')
-rw-r--r--sys/dev/pcic/i82365var.h67
1 files changed, 29 insertions, 38 deletions
diff --git a/sys/dev/pcic/i82365var.h b/sys/dev/pcic/i82365var.h
index 6ff9671..7858f12 100644
--- a/sys/dev/pcic/i82365var.h
+++ b/sys/dev/pcic/i82365var.h
@@ -51,26 +51,17 @@ struct pcic_handle {
struct device *ph_parent;
bus_space_tag_t ph_bus_t; /* I/O or MEM? I don't mind */
bus_space_handle_t ph_bus_h;
- u_int8_t (* ph_read) __P((struct pcic_handle*, int));
- void (* ph_write) __P((struct pcic_handle *, int, u_int8_t));
+ u_int8_t (* ph_read)(struct pcic_handle*, int);
+ void (* ph_write)(struct pcic_handle *, int, u_int8_t);
int vendor;
int sock;
int flags;
int laststate;
int memalloc;
- struct {
- bus_addr_t addr;
- bus_size_t size;
- long offset;
- int kind;
- } mem[PCIC_MEM_WINS];
+ struct pccard_mem_handle mem[PCIC_MEM_WINS];
int ioalloc;
- struct {
- bus_addr_t addr;
- bus_size_t size;
- int width;
- } io[PCIC_IO_WINS];
+ struct pccard_io_handle io[PCIC_IO_WINS];
int ih_irq;
struct device *pccard;
@@ -144,36 +135,36 @@ struct pcic_softc {
};
-int pcic_ident_ok __P((int));
-int pcic_vendor __P((struct pcic_handle *));
-char *pcic_vendor_to_string __P((int));
+int pcic_ident_ok(int);
+int pcic_vendor(struct pcic_handle *);
+char *pcic_vendor_to_string(int);
void pcic_attach(device_t dev);
void pcic_attach_sockets(device_t dev);
-int pcic_intr __P((void *arg));
-
-int pcic_chip_mem_alloc __P((pccard_chipset_handle_t, bus_size_t,
- struct pccard_mem_handle *));
-void pcic_chip_mem_free __P((pccard_chipset_handle_t,
- struct pccard_mem_handle *));
-int pcic_chip_mem_map __P((pccard_chipset_handle_t, int, bus_addr_t,
- bus_size_t, struct pccard_mem_handle *, bus_addr_t *, int *));
-void pcic_chip_mem_unmap __P((pccard_chipset_handle_t, int));
-
-int pcic_chip_io_alloc __P((pccard_chipset_handle_t, bus_addr_t,
- bus_size_t, bus_size_t, struct pccard_io_handle *));
-void pcic_chip_io_free __P((pccard_chipset_handle_t,
- struct pccard_io_handle *));
-int pcic_chip_io_map __P((pccard_chipset_handle_t, int, bus_addr_t,
- bus_size_t, struct pccard_io_handle *, int *));
-void pcic_chip_io_unmap __P((pccard_chipset_handle_t, int));
-
-void pcic_chip_socket_enable __P((pccard_chipset_handle_t));
-void pcic_chip_socket_disable __P((pccard_chipset_handle_t));
+int pcic_intr(void *arg);
+
+struct pccard_handle;
+
+int pcic_chip_mem_alloc(struct pcic_handle *, bus_size_t,
+ struct pccard_mem_handle *);
+void pcic_chip_mem_free(struct pcic_handle *, struct pccard_mem_handle *);
+int pcic_chip_mem_map(struct pcic_handle *, int, bus_addr_t,
+ bus_size_t, struct pccard_mem_handle *, bus_addr_t *, int *);
+void pcic_chip_mem_unmap(struct pcic_handle *, int);
+
+int pcic_chip_io_alloc(struct pcic_handle *, bus_addr_t, bus_size_t,
+ bus_size_t, struct pccard_io_handle *);
+void pcic_chip_io_free(struct pcic_handle *, struct pccard_io_handle *);
+int pcic_chip_io_map(struct pcic_handle *, int, bus_addr_t,
+ bus_size_t, struct pccard_io_handle *, int *);
+void pcic_chip_io_unmap(struct pcic_handle *, int);
+
+void pcic_chip_socket_enable(struct pcic_handle *);
+void pcic_chip_socket_disable(struct pcic_handle *);
#if 0
-static __inline int pcic_read __P((struct pcic_handle *, int));
+static __inline int pcic_read(struct pcic_handle *, int);
static __inline int
pcic_read(h, idx)
struct pcic_handle *h;
@@ -185,7 +176,7 @@ pcic_read(h, idx)
return (bus_space_read_1(h->sc->iot, h->sc->ioh, PCIC_REG_DATA));
}
-static __inline void pcic_write __P((struct pcic_handle *, int, int));
+static __inline void pcic_write(struct pcic_handle *, int, int);
static __inline void
pcic_write(h, idx, data)
struct pcic_handle *h;
OpenPOWER on IntegriCloud