diff options
author | imp <imp@FreeBSD.org> | 1999-09-26 21:52:43 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-09-26 21:52:43 +0000 |
commit | 2797bea96cf482716370d8822aa441a4070d6bbe (patch) | |
tree | 9b4682fe9aa123d8df16c09bf4ed13b1a8b81cf3 /sys/pccard | |
parent | 37dc4e278c72d018849083ef4e1111576651de7a (diff) | |
download | FreeBSD-src-2797bea96cf482716370d8822aa441a4070d6bbe.zip FreeBSD-src-2797bea96cf482716370d8822aa441a4070d6bbe.tar.gz |
*** empty log message ***
Diffstat (limited to 'sys/pccard')
-rw-r--r-- | sys/pccard/driver.h | 6 | ||||
-rw-r--r-- | sys/pccard/pccard.c | 6 | ||||
-rw-r--r-- | sys/pccard/pccard_nbk.c | 2 | ||||
-rw-r--r-- | sys/pccard/pcic.c | 31 | ||||
-rw-r--r-- | sys/pccard/pcic.h | 4 |
5 files changed, 31 insertions, 18 deletions
diff --git a/sys/pccard/driver.h b/sys/pccard/driver.h index 09acc50..31711d5 100644 --- a/sys/pccard/driver.h +++ b/sys/pccard/driver.h @@ -2,6 +2,8 @@ * pccard driver interface. * Bruce Evans, November 1995. * This file is in the public domain. + * + * $FreeBSD$ */ #ifndef _PCCARD_DRIVER_H_ @@ -10,8 +12,8 @@ struct pccard_device; void pccard_add_driver __P((struct pccard_device *)); -#ifdef _I386_ISA_ISA_DEVICE_H_ /* XXX actually if inthand2_t is declared */ -int pccard_alloc_intr __P((u_int imask, inthand2_t *hand, int unit, +#ifdef _I386_ISA_ISA_DEVICE_H_ /* XXX actually if ointhand2_t is declared */ +int pccard_alloc_intr __P((u_int imask, ointhand2_t *hand, int unit, u_int *maskp, u_int *pcic_imask)); #endif void pccard_remove_driver __P((struct pccard_device *)); diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index ca3f353..5eac5ab 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -100,7 +100,7 @@ static void disable_slot(struct slot *); static int invalid_io_memory(unsigned long, int); static struct pccard_device *find_driver(char *); static void remove_device(struct pccard_devinfo *); -static inthand2_t slot_irq_handler; +static ointhand2_t slot_irq_handler; static void power_off_slot(void *); static void pccard_configure(void *); @@ -537,7 +537,7 @@ pccard_alloc_slot(struct slot_ctrl *ctrl) * allowed are passed as a mask. */ int -pccard_alloc_intr(u_int imask, inthand2_t *hand, int unit, +pccard_alloc_intr(u_int imask, ointhand2_t *hand, int unit, u_int *maskp, u_int *pcic_imask) { int irq; @@ -801,7 +801,7 @@ pccard_event(struct slot *slt, enum card_event event) * slot_irq_handler - Interrupt handler for shared irq devices. */ static void -slot_irq_handler(void *arg) +slot_irq_handler(int arg) { struct pccard_devinfo *devi; struct slot *slt = (struct slot *)arg; diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c index 3fd7114..d7bb317 100644 --- a/sys/pccard/pccard_nbk.c +++ b/sys/pccard/pccard_nbk.c @@ -265,6 +265,7 @@ pccnbk_wrap_old_driver(struct pccard_device *drv) drv->driver = driver; } +#if 0 static driver_t pccnbk_driver = { "pccnbk", pccnbk_methods, @@ -272,3 +273,4 @@ static driver_t pccnbk_driver = { }; DRIVER_MODULE(pccnbk, pccard, pccnbk_driver, pccnbk_devclass, 0, 0); +#endif diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 35a3305..e4af972 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -26,6 +26,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ /* @@ -44,6 +46,7 @@ #include <i386/isa/icu.h> #include <i386/isa/isa_device.h> +#include <i386/isa/intr_machdep.h> #include <pccard/i82365.h> #ifdef PC98 @@ -62,7 +65,7 @@ /* * Prototypes for interrupt handler. */ -static inthand2_t pcicintr; +static ointhand2_t pcicintr; static int pcic_ioctl __P((struct slot *, int, caddr_t)); static int pcic_power __P((struct slot *)); static timeout_t pcic_reset; @@ -170,15 +173,19 @@ putw(struct pcic_slot *sp, int reg, unsigned short word) */ #ifdef APIC_IO int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit){ + ointhand2_t handler, u_int *maskptr, int unit) +{ int apic_intr; apic_intr = isa_apic_irq(intr); - if (apic_intr <0) return -1; - else return register_intr(apic_intr, device_id, flags, handler, - maskptr, unit); + if (apic_intr <0) + return -1; + else + return register_intr(apic_intr, device_id, flags, handler, + maskptr, unit); } -int unregister_pcic_intr(int intr, inthand2_t handler){ +int unregister_pcic_intr(int intr, ointhand2_t handler) +{ int apic_intr; apic_intr = isa_apic_irq(intr); return unregister_intr(apic_intr, handler); @@ -187,11 +194,13 @@ int unregister_pcic_intr(int intr, inthand2_t handler){ #else /* Not APIC_IO */ int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit){ + ointhand2_t handler, u_int *maskptr, int unit) +{ return register_intr(intr, device_id, flags, handler, maskptr, unit); } -int unregister_pcic_intr(int intr, inthand2_t handler){ +int unregister_pcic_intr(int intr, ointhand2_t handler) +{ return unregister_intr(intr, handler); } @@ -300,7 +309,7 @@ pcic_dump_attributes(unsigned char *scratch, int maxlen) #endif static void -nullfunc(void *unused) +nullfunc(int arg) { /* empty */ } @@ -1109,7 +1118,7 @@ pcic_disable(struct slot *slt) static void pcictimeout(void *chan) { - pcicintr(NULL); + pcicintr(0); pcictimeout_ch = timeout(pcictimeout, 0, hz/2); } @@ -1120,7 +1129,7 @@ pcictimeout(void *chan) * on this card, so send an event to the main code. */ static void -pcicintr(void *unused) +pcicintr(int unit) { int slot, s; unsigned char chg; diff --git a/sys/pccard/pcic.h b/sys/pccard/pcic.h index 5988089..53839a3 100644 --- a/sys/pccard/pcic.h +++ b/sys/pccard/pcic.h @@ -32,5 +32,5 @@ */ int register_pcic_intr(int intr, int device_id, u_int flags, - inthand2_t handler, u_int *maskptr, int unit); -int unregister_pcic_intr(int intr, inthand2_t handler); + ointhand2_t handler, u_int *maskptr, int unit); +int unregister_pcic_intr(int intr, ointhand2_t handler); |