-/* $OpenBSD: i82365.c,v 1.11 2000/04/08 05:50:50 aaron Exp $ */
+/* $OpenBSD: i82365.c,v 1.12 2000/04/19 07:27:42 fgsch Exp $ */
/* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */
/*
void pcic_wait_ready __P((struct pcic_handle *));
u_int8_t st_pcic_read __P((struct pcic_handle *, int));
-void st_pcic_write __P((struct pcic_handle *, int, u_int8_t));
+void st_pcic_write __P((struct pcic_handle *, int, int));
struct cfdriver pcic_cd = {
NULL, "pcic", DV_DULL
*/
delay((100 + 20 + 200) * 1000);
- pcic_write(h, PCIC_PWRCTL, PCIC_PWRCTL_DISABLE_RESETDRV | PCIC_PWRCTL_OE
- | PCIC_PWRCTL_PWR_ENABLE);
+ pcic_write(h, PCIC_PWRCTL, PCIC_PWRCTL_DISABLE_RESETDRV |
+ PCIC_PWRCTL_OE | PCIC_PWRCTL_PWR_ENABLE);
pcic_write(h, PCIC_INTR, 0);
/*
struct pcic_handle *h;
int idx;
{
- if (idx != -1) {
- bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX, h->sock + idx);
- }
-
+ if (idx != -1)
+ bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX,
+ h->sock + idx);
return bus_space_read_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_DATA);
}
st_pcic_write(h, idx, data)
struct pcic_handle *h;
int idx;
- u_int8_t data;
+ int data;
{
- if (idx != -1) {
- bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX, h->sock + idx);
- }
-
- bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_DATA, data);
+ if (idx != -1)
+ bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_INDEX,
+ h->sock + idx);
+ if (data != -1)
+ bus_space_write_1(h->ph_bus_t, h->ph_bus_h, PCIC_REG_DATA,
+ data);
}
-/* $OpenBSD: i82365var.h,v 1.6 2000/04/08 05:50:50 aaron Exp $ */
+/* $OpenBSD: i82365var.h,v 1.7 2000/04/19 07:27:43 fgsch Exp $ */
/* $NetBSD: i82365var.h,v 1.4 1998/05/23 18:32:29 matt Exp $ */
/*
bus_space_tag_t ph_bus_t;
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));
+ void (*ph_write) __P((struct pcic_handle *, int, int));
int vendor;
int sock;