Skip to content

Commit

Permalink
m68k/irq: Remove obsolete m68k irq framework
Browse files Browse the repository at this point in the history
Signed-off-by: Geert Uytterhoeven <[email protected]>
  • Loading branch information
geertu committed Nov 8, 2011
1 parent a03010e commit d890d73
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 820 deletions.
10 changes: 2 additions & 8 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ config M68K
select HAVE_IDE
select HAVE_AOUT if MMU
select GENERIC_ATOMIC64 if MMU
select HAVE_GENERIC_HARDIRQS if !MMU
select GENERIC_IRQ_SHOW if !MMU
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS

config RWSEM_GENERIC_SPINLOCK
Expand Down Expand Up @@ -84,12 +84,6 @@ config MMU_SUN3
bool
depends on MMU && !MMU_MOTOROLA

config USE_GENERIC_HARDIRQS
bool "Use genirq"
depends on MMU
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW

menu "Platform setup"

source arch/m68k/Kconfig.cpu
Expand Down
114 changes: 0 additions & 114 deletions arch/m68k/amiga/amiints.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
#endif

#include <asm/irq.h>
#include <asm/traps.h>
Expand Down Expand Up @@ -48,7 +46,6 @@ static struct irq_chip amiga_irq_chip = {
* The builtin Amiga hardware interrupt handlers.
*/

#ifdef CONFIG_GENERIC_HARDIRQS
static void ami_int1(unsigned int irq, struct irq_desc *desc)
{
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
Expand Down Expand Up @@ -140,103 +137,6 @@ static void ami_int5(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(IRQ_AMIGA_DSKSYN);
}
}
#else /* !CONFIG_GENERIC_HARDIRQS */
static irqreturn_t ami_int1(int irq, void *dev_id)
{
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;

/* if serial transmit buffer empty, interrupt */
if (ints & IF_TBE) {
amiga_custom.intreq = IF_TBE;
generic_handle_irq(IRQ_AMIGA_TBE);
}

/* if floppy disk transfer complete, interrupt */
if (ints & IF_DSKBLK) {
amiga_custom.intreq = IF_DSKBLK;
generic_handle_irq(IRQ_AMIGA_DSKBLK);
}

/* if software interrupt set, interrupt */
if (ints & IF_SOFT) {
amiga_custom.intreq = IF_SOFT;
generic_handle_irq(IRQ_AMIGA_SOFT);
}
return IRQ_HANDLED;
}

static irqreturn_t ami_int3(int irq, void *dev_id)
{
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;

/* if a blitter interrupt */
if (ints & IF_BLIT) {
amiga_custom.intreq = IF_BLIT;
generic_handle_irq(IRQ_AMIGA_BLIT);
}

/* if a copper interrupt */
if (ints & IF_COPER) {
amiga_custom.intreq = IF_COPER;
generic_handle_irq(IRQ_AMIGA_COPPER);
}

/* if a vertical blank interrupt */
if (ints & IF_VERTB) {
amiga_custom.intreq = IF_VERTB;
generic_handle_irq(IRQ_AMIGA_VERTB);
}
return IRQ_HANDLED;
}

static irqreturn_t ami_int4(int irq, void *dev_id)
{
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;

/* if audio 0 interrupt */
if (ints & IF_AUD0) {
amiga_custom.intreq = IF_AUD0;
generic_handle_irq(IRQ_AMIGA_AUD0);
}

/* if audio 1 interrupt */
if (ints & IF_AUD1) {
amiga_custom.intreq = IF_AUD1;
generic_handle_irq(IRQ_AMIGA_AUD1);
}

/* if audio 2 interrupt */
if (ints & IF_AUD2) {
amiga_custom.intreq = IF_AUD2;
generic_handle_irq(IRQ_AMIGA_AUD2);
}

/* if audio 3 interrupt */
if (ints & IF_AUD3) {
amiga_custom.intreq = IF_AUD3;
generic_handle_irq(IRQ_AMIGA_AUD3);
}
return IRQ_HANDLED;
}

static irqreturn_t ami_int5(int irq, void *dev_id)
{
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;

/* if serial receive buffer full interrupt */
if (ints & IF_RBF) {
/* acknowledge of IF_RBF must be done by the serial interrupt */
generic_handle_irq(IRQ_AMIGA_RBF);
}

/* if a disk sync interrupt */
if (ints & IF_DSKSYN) {
amiga_custom.intreq = IF_DSKSYN;
generic_handle_irq(IRQ_AMIGA_DSKSYN);
}
return IRQ_HANDLED;
}
#endif /* !CONFIG_GENERIC_HARDIRQS */


/*
Expand All @@ -252,27 +152,13 @@ static irqreturn_t ami_int5(int irq, void *dev_id)

void __init amiga_init_IRQ(void)
{
#ifdef CONFIG_GENERIC_HARDIRQS
m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
AMI_STD_IRQS);

irq_set_chained_handler(IRQ_AUTO_1, ami_int1);
irq_set_chained_handler(IRQ_AUTO_3, ami_int3);
irq_set_chained_handler(IRQ_AUTO_4, ami_int4);
irq_set_chained_handler(IRQ_AUTO_5, ami_int5);
#else /* !CONFIG_GENERIC_HARDIRQS */
if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL))
pr_err("Couldn't register int%d\n", 1);
if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL))
pr_err("Couldn't register int%d\n", 3);
if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL))
pr_err("Couldn't register int%d\n", 4);
if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL))
pr_err("Couldn't register int%d\n", 5);

m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
AMI_STD_IRQS);
#endif /* !CONFIG_GENERIC_HARDIRQS */

/* turn off PCMCIA interrupts */
if (AMIGAHW_PRESENT(PCMCIA))
Expand Down
22 changes: 0 additions & 22 deletions arch/m68k/apollo/dn_ints.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
#include <linux/interrupt.h>
#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/irq.h>
#else
#include <asm/irq.h>
#endif

#include <asm/traps.h>
#include <asm/apollohw.h>

#ifndef CONFIG_GENERIC_HARDIRQS
void dn_process_int(unsigned int irq, struct pt_regs *fp)
{
do_IRQ(irq, fp);

*(volatile unsigned char *)(pica)=0x20;
*(volatile unsigned char *)(picb)=0x20;
}
#endif

unsigned int apollo_irq_startup(struct irq_data *data)
{
unsigned int irq = data->irq;
Expand All @@ -39,31 +25,23 @@ void apollo_irq_shutdown(struct irq_data *data)
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
}

#ifdef CONFIG_GENERIC_HARDIRQS
void apollo_irq_eoi(struct irq_data *data)
{
*(volatile unsigned char *)(pica) = 0x20;
*(volatile unsigned char *)(picb) = 0x20;
}
#endif

static struct irq_chip apollo_irq_chip = {
.name = "apollo",
.irq_startup = apollo_irq_startup,
.irq_shutdown = apollo_irq_shutdown,
#ifdef CONFIG_GENERIC_HARDIRQS
.irq_eoi = apollo_irq_eoi,
#endif
};


void __init dn_init_IRQ(void)
{
#ifdef CONFIG_GENERIC_HARDIRQS
m68k_setup_user_interrupt(VEC_USER + 96, 16, NULL);
#else
m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
#endif
m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
IRQ_APOLLO, 16);
}
63 changes: 0 additions & 63 deletions arch/m68k/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,67 +62,6 @@
#define IRQ_FLG_STD (0x8000) /* internally used */
#endif

#ifndef CONFIG_GENERIC_HARDIRQS

#include <linux/linkage.h>
#include <linux/hardirq.h>
#include <linux/irqreturn.h>
#include <linux/spinlock_types.h>

struct pt_regs;

/*
* This structure is used to chain together the ISRs for a particular
* interrupt source (if it supports chaining).
*/
struct irq_data {
unsigned int irq;
irqreturn_t (*handler)(int, void *);
void *dev_id;
struct irq_data *next;
unsigned long flags;
const char *devname;
};

/*
* This structure has only 4 elements for speed reasons
*/
struct irq_handler {
int (*handler)(int, void *);
unsigned long flags;
void *dev_id;
const char *devname;
};

struct irq_chip {
const char *name;
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(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
*/
extern struct irq_data *new_irq_node(void);

extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
void (*handler)(unsigned int, struct pt_regs *));
extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);
#define m68k_setup_irq_controller(chip, dummy, irq, cnt) \
m68k_setup_irq_chip((chip), (irq), (cnt))

extern void generic_handle_irq(unsigned int);
asmlinkage void do_IRQ(int irq, struct pt_regs *regs);

#else /* CONFIG_GENERIC_HARDIRQS */

struct irq_data;
struct irq_chip;
struct irq_desc;
Expand All @@ -139,8 +78,6 @@ extern void m68k_setup_irq_controller(struct irq_chip *,
struct irq_desc *desc),
unsigned int irq, unsigned int cnt);

#endif /* CONFIG_GENERIC_HARDIRQS */

extern unsigned int irq_canonicalize(unsigned int irq);

#else
Expand Down
5 changes: 0 additions & 5 deletions arch/m68k/include/asm/q40ints.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@
#define Q40_IRQ10_MASK (1<<5)
#define Q40_IRQ14_MASK (1<<6)
#define Q40_IRQ15_MASK (1<<7)

#ifndef CONFIG_GENERIC_HARDIRQS
extern unsigned long q40_probe_irq_on (void);
extern int q40_probe_irq_off (unsigned long irqs);
#endif
10 changes: 2 additions & 8 deletions arch/m68k/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ extra-$(CONFIG_MMU) := head.o
extra-$(CONFIG_SUN3) := sun3-head.o
extra-y += vmlinux.lds

obj-y := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \
sys_m68k.o syscalltable.o time.o traps.o
obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o setup.o \
signal.o sys_m68k.o syscalltable.o time.o traps.o

obj-$(CONFIG_MMU) += ints.o vectors.o
devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o

ifndef CONFIG_MMU_SUN3
obj-y += dma.o
endif
ifndef CONFIG_MMU
obj-y += init_task.o
endif
ifdef CONFIG_GENERIC_HARDIRQS
obj-y += irq.o
else
obj-y += devres.o
endif

Loading

0 comments on commit d890d73

Please sign in to comment.