*** empty log message ***

This commit is contained in:
Warner Losh 1999-09-26 21:52:43 +00:00
parent cdf41ea250
commit 58a49816c7
5 changed files with 31 additions and 18 deletions

View File

@ -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 *));

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);