summaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-09-11 11:28:04 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-11-08 22:35:52 +0100
commitd890d73995257b4e10cdd7d55bad80e34a71ba22 (patch)
tree3e4ee85a2d8d126e1570c7ea47178a2a8a627849 /arch/m68k/mac
parenta03010ed9b399fdbc28ac8836e0a6d4b15403f9f (diff)
m68k/irq: Remove obsolete m68k irq framework
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r--arch/m68k/mac/baboon.c41
-rw-r--r--arch/m68k/mac/oss.c78
-rw-r--r--arch/m68k/mac/psc.c44
-rw-r--r--arch/m68k/mac/via.c104
4 files changed, 0 insertions, 267 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 425144cbfa7..b55ead28497 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -11,9 +11,7 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
-#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
-#endif
#include <asm/traps.h>
#include <asm/bootinfo.h>
@@ -56,7 +54,6 @@ void __init baboon_init(void)
* Baboon interrupt handler. This works a lot like a VIA.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
static void baboon_irq(unsigned int irq, struct irq_desc *desc)
{
int irq_bit, irq_num;
@@ -88,39 +85,6 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc)
baboon->mb_ifr &= ~events;
#endif
}
-#else
-static irqreturn_t baboon_irq(int irq, void *dev_id)
-{
- int irq_bit, irq_num;
- unsigned char events;
-
-#ifdef DEBUG_IRQS
- printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n",
- (uint) baboon->mb_control, (uint) baboon->mb_ifr,
- (uint) baboon->mb_status);
-#endif
-
- if (!(events = baboon->mb_ifr & 0x07))
- return IRQ_NONE;
-
- irq_num = IRQ_BABOON_0;
- irq_bit = 1;
- do {
- if (events & irq_bit) {
- baboon->mb_ifr &= ~irq_bit;
- generic_handle_irq(irq_num);
- }
- irq_bit <<= 1;
- irq_num++;
- } while(events >= irq_bit);
-#if 0
- if (baboon->mb_ifr & 0x02) macide_ack_intr(NULL);
- /* for now we need to smash all interrupts */
- baboon->mb_ifr &= ~events;
-#endif
- return IRQ_HANDLED;
-}
-#endif
/*
* Register the Baboon interrupt dispatcher on nubus slot $C.
@@ -129,12 +93,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
void __init baboon_register_interrupts(void)
{
baboon_disabled = 0;
-#ifdef CONFIG_GENERIC_HARDIRQS
irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);
-#else
- if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon))
- pr_err("Couldn't register baboon interrupt\n");
-#endif
}
/*
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index cc784c2ff6e..a4c82dab9ff 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -19,9 +19,7 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
-#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
-#endif
#include <asm/bootinfo.h>
#include <asm/macintosh.h>
@@ -32,11 +30,7 @@
int oss_present;
volatile struct mac_oss *oss;
-#ifdef CONFIG_GENERIC_HARDIRQS
extern void via1_irq(unsigned int irq, struct irq_desc *desc);
-#else
-extern irqreturn_t via1_irq(int, void *);
-#endif
/*
* Initialize the OSS
@@ -76,7 +70,6 @@ void __init oss_nubus_init(void)
* and SCSI; everything else is routed to its own autovector IRQ.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
static void oss_irq(unsigned int irq, struct irq_desc *desc)
{
int events;
@@ -103,35 +96,6 @@ static void oss_irq(unsigned int irq, struct irq_desc *desc)
/* FIXME: error check here? */
}
}
-#else
-static irqreturn_t oss_irq(int irq, void *dev_id)
-{
- int events;
-
- events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
- if (!events)
- return IRQ_NONE;
-
-#ifdef DEBUG_IRQS
- if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
- printk("oss_irq: irq %d events = 0x%04X\n", irq,
- (int) oss->irq_pending);
- }
-#endif
- /* FIXME: how do you clear a pending IRQ? */
-
- if (events & OSS_IP_SOUND) {
- oss->irq_pending &= ~OSS_IP_SOUND;
- /* FIXME: call sound handler */
- } else if (events & OSS_IP_SCSI) {
- oss->irq_pending &= ~OSS_IP_SCSI;
- generic_handle_irq(IRQ_MAC_SCSI);
- } else {
- /* FIXME: error check here? */
- }
- return IRQ_HANDLED;
-}
-#endif
/*
* Nubus IRQ handler, OSS style
@@ -139,7 +103,6 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
* Unlike the VIA/RBV this is on its own autovector interrupt level.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
{
int events, irq_bit, i;
@@ -166,35 +129,6 @@ static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
}
} while(events & (irq_bit - 1));
}
-#else
-static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
-{
- int events, irq_bit, i;
-
- events = oss->irq_pending & OSS_IP_NUBUS;
- if (!events)
- return IRQ_NONE;
-
-#ifdef DEBUG_NUBUS_INT
- if (console_loglevel > 7) {
- printk("oss_nubus_irq: events = 0x%04X\n", events);
- }
-#endif
- /* There are only six slots on the OSS, not seven */
-
- i = 6;
- irq_bit = 0x40;
- do {
- --i;
- irq_bit >>= 1;
- if (events & irq_bit) {
- oss->irq_pending &= ~irq_bit;
- generic_handle_irq(NUBUS_SOURCE_BASE + i);
- }
- } while(events & (irq_bit - 1));
- return IRQ_HANDLED;
-}
-#endif
/*
* Register the OSS and NuBus interrupt dispatchers.
@@ -202,22 +136,10 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
void __init oss_register_interrupts(void)
{
-#ifdef CONFIG_GENERIC_HARDIRQS
irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
-#else /* !CONFIG_GENERIC_HARDIRQS */
- if (request_irq(OSS_IRQLEV_SCSI, oss_irq, 0, "scsi", (void *)oss))
- pr_err("Couldn't register %s interrupt\n", "scsi");
- if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, 0, "nubus",
- (void *)oss))
- pr_err("Couldn't register %s interrupt\n", "nubus");
- if (request_irq(OSS_IRQLEV_SOUND, oss_irq, 0, "sound", (void *)oss))
- pr_err("Couldn't register %s interrupt\n", "sound");
- if (request_irq(OSS_IRQLEV_VIA1, via1_irq, 0, "via1", (void *)via1))
- pr_err("Couldn't register %s interrupt\n", "via1");
-#endif /* !CONFIG_GENERIC_HARDIRQS */
}
/*
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 52840b8c03b..e6c2d20f328 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -18,9 +18,7 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
-#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
-#endif
#include <asm/traps.h>
#include <asm/bootinfo.h>
@@ -116,7 +114,6 @@ void __init psc_init(void)
* PSC interrupt handler. It's a lot like the VIA interrupt handler.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
static void psc_irq(unsigned int irq, struct irq_desc *desc)
{
unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
@@ -145,36 +142,6 @@ static void psc_irq(unsigned int irq, struct irq_desc *desc)
irq_bit <<= 1;
} while (events >= irq_bit);
}
-#else
-static irqreturn_t psc_irq(int irq, void *dev_id)
-{
- int pIFR = pIFRbase + ((int) dev_id);
- int pIER = pIERbase + ((int) dev_id);
- int irq_num;
- unsigned char irq_bit, events;
-
-#ifdef DEBUG_IRQS
- printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n",
- irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
-#endif
-
- events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
- if (!events)
- return IRQ_NONE;
-
- irq_num = irq << 3;
- irq_bit = 1;
- do {
- if (events & irq_bit) {
- psc_write_byte(pIFR, irq_bit);
- generic_handle_irq(irq_num);
- }
- irq_num++;
- irq_bit <<= 1;
- } while (events >= irq_bit);
- return IRQ_HANDLED;
-}
-#endif
/*
* Register the PSC interrupt dispatchers for autovector interrupts 3-6.
@@ -182,7 +149,6 @@ static irqreturn_t psc_irq(int irq, void *dev_id)
void __init psc_register_interrupts(void)
{
-#ifdef CONFIG_GENERIC_HARDIRQS
irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
@@ -191,16 +157,6 @@ void __init psc_register_interrupts(void)
irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
-#else /* !CONFIG_GENERIC_HARDIRQS */
- if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
- pr_err("Couldn't register psc%d interrupt\n", 3);
- if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
- pr_err("Couldn't register psc%d interrupt\n", 4);
- if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
- pr_err("Couldn't register psc%d interrupt\n", 5);
- if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
- pr_err("Couldn't register psc%d interrupt\n", 6);
-#endif /* !CONFIG_GENERIC_HARDIRQS */
}
void psc_irq_enable(int irq) {
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index b8156ac496a..f1600ad2662 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -28,9 +28,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/module.h>
-#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
-#endif
#include <asm/bootinfo.h>
#include <asm/macintosh.h>
@@ -417,7 +415,6 @@ void __init via_nubus_init(void)
* via6522.c :-), disable/pending masks added.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
void via1_irq(unsigned int irq, struct irq_desc *desc)
{
int irq_num;
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc)
irq_bit <<= 1;
} while (events >= irq_bit);
}
-#else
-irqreturn_t via1_irq(int irq, void *dev_id)
-{
- int irq_num;
- unsigned char irq_bit, events;
-
- events = via1[vIFR] & via1[vIER] & 0x7F;
- if (!events)
- return IRQ_NONE;
-
- irq_num = VIA1_SOURCE_BASE;
- irq_bit = 1;
- do {
- if (events & irq_bit) {
- via1[vIFR] = irq_bit;
- generic_handle_irq(irq_num);
- }
- ++irq_num;
- irq_bit <<= 1;
- } while (events >= irq_bit);
- return IRQ_HANDLED;
-}
-
-irqreturn_t via2_irq(int irq, void *dev_id)
-{
- int irq_num;
- unsigned char irq_bit, events;
-
- events = via2[gIFR] & via2[gIER] & 0x7F;
- if (!events)
- return IRQ_NONE;
-
- irq_num = VIA2_SOURCE_BASE;
- irq_bit = 1;
- do {
- if (events & irq_bit) {
- via2[gIFR] = irq_bit | rbv_clear;
- generic_handle_irq(irq_num);
- }
- ++irq_num;
- irq_bit <<= 1;
- } while (events >= irq_bit);
- return IRQ_HANDLED;
-}
-#endif
/*
* Dispatch Nubus interrupts. We are called as a secondary dispatch by the
* VIA2 dispatcher as a fast interrupt handler.
*/
-#ifdef CONFIG_GENERIC_HARDIRQS
void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
{
int slot_irq;
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
events &= ~via2[vDirA];
} while (events);
}
-#else
-irqreturn_t via_nubus_irq(int irq, void *dev_id)
-{
- int slot_irq;
- unsigned char slot_bit, events;
-
- events = ~via2[gBufA] & 0x7F;
- if (rbv_present)
- events &= via2[rSIER];
- else
- events &= ~via2[vDirA];
- if (!events)
- return IRQ_NONE;
-
- do {
- slot_irq = IRQ_NUBUS_F;
- slot_bit = 0x40;
- do {
- if (events & slot_bit) {
- events &= ~slot_bit;
- generic_handle_irq(slot_irq);
- }
- --slot_irq;
- slot_bit >>= 1;
- } while (events);
-
- /* clear the CA1 interrupt and make certain there's no more. */
- via2[gIFR] = 0x02 | rbv_clear;
- events = ~via2[gBufA] & 0x7F;
- if (rbv_present)
- events &= via2[rSIER];
- else
- events &= ~via2[vDirA];
- } while (events);
- return IRQ_HANDLED;
-}
-#endif
/*
* Register the interrupt dispatchers for VIA or RBV machines only.
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
void __init via_register_interrupts(void)
{
-#ifdef CONFIG_GENERIC_HARDIRQS
if (via_alt_mapping) {
/* software interrupt */
irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void)
}
irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
-#else
- if (via_alt_mapping) {
- if (request_irq(IRQ_AUTO_1, via1_irq, 0, "software",
- (void *)via1))
- pr_err("Couldn't register %s interrupt\n", "software");
- if (request_irq(IRQ_AUTO_6, via1_irq, 0, "via1", (void *)via1))
- pr_err("Couldn't register %s interrupt\n", "via1");
- } else {
- if (request_irq(IRQ_AUTO_1, via1_irq, 0, "via1", (void *)via1))
- pr_err("Couldn't register %s interrupt\n", "via1");
- }
- if (request_irq(IRQ_AUTO_2, via2_irq, 0, "via2", (void *)via2))
- pr_err("Couldn't register %s interrupt\n", "via2");
- if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
- (void *)via2))
- pr_err("Couldn't register %s interrupt\n", "nubus");
-#endif
}
void via_irq_enable(int irq) {