#include <asm/amigaints.h>
#include <asm/amipcmcia.h>
-static void amiga_enable_irq(unsigned int irq);
-static void amiga_disable_irq(unsigned int irq);
+static void amiga_irq_enable(struct irq_data *data);
+static void amiga_irq_disable(struct irq_data *data);
static irqreturn_t ami_int1(int irq, void *dev_id);
static irqreturn_t ami_int3(int irq, void *dev_id);
static irqreturn_t ami_int4(int irq, void *dev_id);
static struct irq_chip amiga_irq_chip = {
.name = "amiga",
- .irq_enable = amiga_enable_irq,
- .irq_disable = amiga_disable_irq,
+ .irq_enable = amiga_irq_enable,
+ .irq_disable = amiga_irq_disable,
};
/*
* internal data, that may not be changed by the interrupt at the same time.
*/
-static void amiga_enable_irq(unsigned int irq)
+static void amiga_irq_enable(struct irq_data *data)
{
- amiga_custom.intena = IF_SETCLR | (1 << (irq - IRQ_USER));
+ amiga_custom.intena = IF_SETCLR | (1 << (data->irq - IRQ_USER));
}
-static void amiga_disable_irq(unsigned int irq)
+static void amiga_irq_disable(struct irq_data *data)
{
- amiga_custom.intena = 1 << (irq - IRQ_USER);
+ amiga_custom.intena = 1 << (data->irq - IRQ_USER);
}
/*
return IRQ_HANDLED;
}
-static void cia_enable_irq(unsigned int irq)
+static void cia_irq_enable(struct irq_data *data)
{
+ unsigned int irq = data->irq;
unsigned char mask;
if (irq >= IRQ_AMIGA_CIAB) {
}
}
-static void cia_disable_irq(unsigned int irq)
+static void cia_irq_disable(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
if (irq >= IRQ_AMIGA_CIAB)
cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB));
else
static struct irq_chip cia_irq_chip = {
.name = "cia",
- .irq_enable = cia_enable_irq,
- .irq_disable = cia_disable_irq,
+ .irq_enable = cia_irq_enable,
+ .irq_disable = cia_irq_disable,
};
/*
* into this chain.
*/
-static void auto_enable_irq(unsigned int irq)
+static void auto_irq_enable(struct irq_data *data)
{
- switch (irq) {
+ switch (data->irq) {
case IRQ_AUTO_2:
amiga_custom.intena = IF_SETCLR | IF_PORTS;
break;
}
}
-static void auto_disable_irq(unsigned int irq)
+static void auto_irq_disable(struct irq_data *data)
{
- switch (irq) {
+ switch (data->irq) {
case IRQ_AUTO_2:
amiga_custom.intena = IF_PORTS;
break;
static struct irq_chip auto_irq_chip = {
.name = "auto",
- .irq_enable = auto_enable_irq,
- .irq_disable = auto_disable_irq,
+ .irq_enable = auto_irq_enable,
+ .irq_disable = auto_irq_disable,
};
void __init cia_init_IRQ(struct ciabase *base)
/* override auto int and install CIA handler */
m68k_setup_irq_chip(&auto_irq_chip, base->handler_irq, 1);
- m68k_irq_startup(base->handler_irq);
+ m68k_irq_startup_irq(base->handler_irq);
if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED,
base->name, base))
pr_err("Couldn't register %s interrupt\n", base->name);
*(volatile unsigned char *)(picb)=0x20;
}
-unsigned int apollo_irq_startup(unsigned int irq)
+unsigned int apollo_irq_startup(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
if (irq < 8)
*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
else
return 0;
}
-void apollo_irq_shutdown(unsigned int irq)
+void apollo_irq_shutdown(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
if (irq < 8)
*(volatile unsigned char *)(pica+1) |= (1 << irq);
else
extern int atari_SCC_reset_done;
-static unsigned int atari_startup_irq(unsigned int irq)
+static unsigned int atari_irq_startup(struct irq_data *data)
{
- m68k_irq_startup(irq);
+ unsigned int irq = data->irq;
+
+ m68k_irq_startup(data);
atari_turnon_irq(irq);
atari_enable_irq(irq);
return 0;
}
-static void atari_shutdown_irq(unsigned int irq)
+static void atari_irq_shutdown(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
atari_disable_irq(irq);
atari_turnoff_irq(irq);
- m68k_irq_shutdown(irq);
+ m68k_irq_shutdown(data);
if (irq == IRQ_AUTO_4)
vectors[VEC_INT4] = falcon_hblhandler;
}
+static void atari_irq_enable(struct irq_data *data)
+{
+ atari_enable_irq(data->irq);
+}
+
+static void atari_irq_disable(struct irq_data *data)
+{
+ atari_disable_irq(data->irq);
+}
+
static struct irq_chip atari_irq_chip = {
.name = "atari",
- .irq_startup = atari_startup_irq,
- .irq_shutdown = atari_shutdown_irq,
- .irq_enable = atari_enable_irq,
- .irq_disable = atari_disable_irq,
+ .irq_startup = atari_irq_startup,
+ .irq_shutdown = atari_irq_shutdown,
+ .irq_enable = atari_irq_enable,
+ .irq_disable = atari_irq_disable,
};
/*
struct irq_chip {
const char *name;
- unsigned int (*irq_startup)(unsigned int irq);
- void (*irq_shutdown)(unsigned int irq);
- void (*irq_enable)(unsigned int irq);
- void (*irq_disable)(unsigned int irq);
+ unsigned int (*irq_startup)(struct irq_data *data);
+ void (*irq_shutdown)(struct irq_data *data);
+ void (*irq_enable)(struct irq_data *data);
+ void (*irq_disable)(struct irq_data *data);
};
-extern unsigned int m68k_irq_startup(unsigned int);
-extern void m68k_irq_shutdown(unsigned int);
+extern unsigned int m68k_irq_startup(struct irq_data *data);
+extern unsigned int m68k_irq_startup_irq(unsigned int irq);
+extern void m68k_irq_shutdown(struct irq_data *data);
/*
* This function returns a new struct irq_data
if (!irq_list[irq]) {
if (contr->irq_startup)
- contr->irq_startup(irq);
+ contr->irq_startup(node);
else
- contr->irq_enable(irq);
+ contr->irq_enable(node);
}
node->next = NULL;
*prev = node;
if (!irq_list[irq]) {
if (contr->irq_shutdown)
- contr->irq_shutdown(irq);
+ contr->irq_shutdown(node);
else
- contr->irq_disable(irq);
+ contr->irq_disable(node);
}
local_irq_restore(flags);
if (irq_depth[irq]) {
if (!--irq_depth[irq]) {
if (contr->irq_enable)
- contr->irq_enable(irq);
+ contr->irq_enable(irq_list[irq]);
}
} else
WARN_ON(1);
local_irq_save(flags);
if (!irq_depth[irq]++) {
if (contr->irq_disable)
- contr->irq_disable(irq);
+ contr->irq_disable(irq_list[irq]);
}
local_irq_restore(flags);
}
EXPORT_SYMBOL(disable_irq_nosync);
-unsigned int m68k_irq_startup(unsigned int irq)
+unsigned int m68k_irq_startup_irq(unsigned int irq)
{
if (irq <= IRQ_AUTO_7)
vectors[VEC_SPUR + irq] = auto_inthandler;
return 0;
}
-void m68k_irq_shutdown(unsigned int irq)
+unsigned int m68k_irq_startup(struct irq_data *data)
{
+ return m68k_irq_startup_irq(data->irq);
+}
+
+void m68k_irq_shutdown(struct irq_data *data)
+{
+ unsigned int irq = data->irq;
+
if (irq <= IRQ_AUTO_7)
vectors[VEC_SPUR + irq] = bad_inthandler;
else
void mac_enable_irq(unsigned int irq);
void mac_disable_irq(unsigned int irq);
+static void mac_irq_enable(struct irq_data *data)
+{
+ mac_enable_irq(data->irq);
+}
+
+static void mac_irq_disable(struct irq_data *data)
+{
+ mac_disable_irq(data->irq);
+}
+
static struct irq_chip mac_irq_chip = {
.name = "mac",
- .irq_enable = mac_enable_irq,
- .irq_disable = mac_disable_irq,
+ .irq_enable = mac_irq_enable,
+ .irq_disable = mac_irq_disable,
};
void __init mac_init_IRQ(void)
*/
static void q40_irq_handler(unsigned int, struct pt_regs *fp);
-static void q40_enable_irq(unsigned int);
-static void q40_disable_irq(unsigned int);
+static void q40_irq_enable(struct irq_data *data);
+static void q40_irq_disable(struct irq_data *data);
unsigned short q40_ablecount[35];
unsigned short q40_state[35];
-static unsigned int q40_irq_startup(unsigned int irq)
+static unsigned int q40_irq_startup(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
/* test for ISA ints not implemented by HW */
switch (irq) {
case 1: case 2: case 8: case 9:
return 0;
}
-static void q40_irq_shutdown(unsigned int irq)
+static void q40_irq_shutdown(struct irq_data *data)
{
}
.name = "q40",
.irq_startup = q40_irq_startup,
.irq_shutdown = q40_irq_shutdown,
- .irq_enable = q40_enable_irq,
- .irq_disable = q40_disable_irq,
+ .irq_enable = q40_irq_enable,
+ .irq_disable = q40_irq_disable,
};
/*
/* setup handler for ISA ints */
m68k_setup_auto_interrupt(q40_irq_handler);
- m68k_irq_startup(IRQ_AUTO_2);
- m68k_irq_startup(IRQ_AUTO_4);
+ m68k_irq_startup_irq(IRQ_AUTO_2);
+ m68k_irq_startup_irq(IRQ_AUTO_4);
/* now enable some ints.. */
master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */
return;
}
-void q40_enable_irq(unsigned int irq)
+void q40_irq_enable(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
if (irq >= 5 && irq <= 15) {
mext_disabled--;
if (mext_disabled > 0)
- printk("q40_enable_irq : nested disable/enable\n");
+ printk("q40_irq_enable : nested disable/enable\n");
if (mext_disabled == 0)
master_outb(1, EXT_ENABLE_REG);
}
}
-void q40_disable_irq(unsigned int irq)
+void q40_irq_disable(struct irq_data *data)
{
+ unsigned int irq = data->irq;
+
/* disable ISA iqs : only do something if the driver has been
* verified to be Q40 "compatible" - right now IDE, NE2K
* Any driver should not attempt to sleep across disable_irq !!
__m68k_handle_int(irq, fp);
}
+static void sun3_irq_enable(struct irq_data *data)
+{
+ sun3_enable_irq(data->irq);
+};
+
+static void sun3_irq_disable(struct irq_data *data)
+{
+ sun3_disable_irq(data->irq);
+};
+
static struct irq_chip sun3_irq_chip = {
.name = "sun3",
.irq_startup = m68k_irq_startup,
.irq_shutdown = m68k_irq_shutdown,
- .irq_enable = sun3_enable_irq,
- .irq_disable = sun3_disable_irq,
+ .irq_enable = sun3_irq_enable,
+ .irq_disable = sun3_irq_disable,
};
void __init sun3_init_IRQ(void)