summaryrefslogtreecommitdiffstats
path: root/arch/m68k/bvme6000
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-25 05:47:06 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:00:58 -0700
commit200a3d352cd5e0ae8fb96bfcf8103f7b7c60645b (patch)
treee9db90ac38cbfba0f4a4c541733fc4ebd09c5fd7 /arch/m68k/bvme6000
parentebba61d5b05ecfda388dd4c156bafdb78d398055 (diff)
downloadlinux-200a3d352cd5e0ae8fb96bfcf8103f7b7c60645b.tar.bz2
[PATCH] m68k: convert VME irq code
Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68k/bvme6000')
-rw-r--r--arch/m68k/bvme6000/Makefile2
-rw-r--r--arch/m68k/bvme6000/bvmeints.c161
-rw-r--r--arch/m68k/bvme6000/config.c21
3 files changed, 9 insertions, 175 deletions
diff --git a/arch/m68k/bvme6000/Makefile b/arch/m68k/bvme6000/Makefile
index 2348e6ceed1e..d8174004fe2f 100644
--- a/arch/m68k/bvme6000/Makefile
+++ b/arch/m68k/bvme6000/Makefile
@@ -2,4 +2,4 @@
# Makefile for Linux arch/m68k/bvme6000 source directory
#
-obj-y := config.o bvmeints.o rtc.o
+obj-y := config.o rtc.o
diff --git a/arch/m68k/bvme6000/bvmeints.c b/arch/m68k/bvme6000/bvmeints.c
deleted file mode 100644
index b015fdc1b0cb..000000000000
--- a/arch/m68k/bvme6000/bvmeints.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * arch/m68k/bvme6000/bvmeints.c
- *
- * Copyright (C) 1997 Richard Hirst [richard@sleepie.demon.co.uk]
- *
- * based on amiints.c -- Amiga Linux interrupt handling code
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file README.legal in the main directory of this archive
- * for more details.
- *
- */
-
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/interrupt.h>
-#include <linux/seq_file.h>
-
-#include <asm/ptrace.h>
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/traps.h>
-
-static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp);
-
-/*
- * This should ideally be 4 elements only, for speed.
- */
-
-static struct {
- irqreturn_t (*handler)(int, void *, struct pt_regs *);
- unsigned long flags;
- void *dev_id;
- const char *devname;
- unsigned count;
-} irq_tab[256];
-
-/*
- * void bvme6000_init_IRQ (void)
- *
- * Parameters: None
- *
- * Returns: Nothing
- *
- * This function is called during kernel startup to initialize
- * the bvme6000 IRQ handling routines.
- */
-
-void bvme6000_init_IRQ (void)
-{
- int i;
-
- for (i = 0; i < 256; i++) {
- irq_tab[i].handler = bvme6000_defhand;
- irq_tab[i].flags = IRQ_FLG_STD;
- irq_tab[i].dev_id = NULL;
- irq_tab[i].devname = NULL;
- irq_tab[i].count = 0;
- }
-}
-
-int bvme6000_request_irq(unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
- unsigned long flags, const char *devname, void *dev_id)
-{
- if (irq > 255) {
- printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname);
- return -ENXIO;
- }
-#if 0
- /* Nothing special about auto-vectored devices for the BVME6000,
- * but treat it specially to avoid changes elsewhere.
- */
-
- if (irq >= VEC_INT1 && irq <= VEC_INT7)
- return cpu_request_irq(irq - VEC_SPUR, handler, flags,
- devname, dev_id);
-#endif
- if (!(irq_tab[irq].flags & IRQ_FLG_STD)) {
- if (irq_tab[irq].flags & IRQ_FLG_LOCK) {
- printk("%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, irq_tab[irq].devname);
- return -EBUSY;
- }
- if (flags & IRQ_FLG_REPLACE) {
- printk("%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, irq_tab[irq].devname);
- return -EBUSY;
- }
- }
- irq_tab[irq].handler = handler;
- irq_tab[irq].flags = flags;
- irq_tab[irq].dev_id = dev_id;
- irq_tab[irq].devname = devname;
- return 0;
-}
-
-void bvme6000_free_irq(unsigned int irq, void *dev_id)
-{
- if (irq > 255) {
- printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-#if 0
- if (irq >= VEC_INT1 && irq <= VEC_INT7) {
- cpu_free_irq(irq - VEC_SPUR, dev_id);
- return;
- }
-#endif
- if (irq_tab[irq].dev_id != dev_id)
- printk("%s: Removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, irq_tab[irq].devname);
-
- irq_tab[irq].handler = bvme6000_defhand;
- irq_tab[irq].flags = IRQ_FLG_STD;
- irq_tab[irq].dev_id = NULL;
- irq_tab[irq].devname = NULL;
-}
-
-irqreturn_t bvme6000_process_int (unsigned long vec, struct pt_regs *fp)
-{
- if (vec > 255) {
- printk ("bvme6000_process_int: Illegal vector %ld", vec);
- return IRQ_NONE;
- } else {
- irq_tab[vec].count++;
- irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp);
- return IRQ_HANDLED;
- }
-}
-
-int show_bvme6000_interrupts(struct seq_file *p, void *v)
-{
- int i;
-
- for (i = 0; i < 256; i++) {
- if (irq_tab[i].count)
- seq_printf(p, "Vec 0x%02x: %8d %s\n",
- i, irq_tab[i].count,
- irq_tab[i].devname ? irq_tab[i].devname : "free");
- }
- return 0;
-}
-
-
-static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp)
-{
- printk ("Unknown interrupt 0x%02x\n", irq);
- return IRQ_NONE;
-}
-
-void bvme6000_enable_irq (unsigned int irq)
-{
-}
-
-
-void bvme6000_disable_irq (unsigned int irq)
-{
-}
-
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index c90cb5fcc8ef..d1e916ae55a8 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -36,15 +36,8 @@
#include <asm/machdep.h>
#include <asm/bvme6000hw.h>
-extern irqreturn_t bvme6000_process_int (int level, struct pt_regs *regs);
-extern void bvme6000_init_IRQ (void);
-extern void bvme6000_free_irq (unsigned int, void *);
-extern int show_bvme6000_interrupts(struct seq_file *, void *);
-extern void bvme6000_enable_irq (unsigned int);
-extern void bvme6000_disable_irq (unsigned int);
static void bvme6000_get_model(char *model);
static int bvme6000_get_hardware_list(char *buffer);
-extern int bvme6000_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id);
extern void bvme6000_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
extern unsigned long bvme6000_gettimeoffset (void);
extern int bvme6000_hwclk (int, struct rtc_time *);
@@ -100,6 +93,14 @@ static int bvme6000_get_hardware_list(char *buffer)
return 0;
}
+/*
+ * This function is called during kernel startup to initialize
+ * the bvme6000 IRQ handling routines.
+ */
+static void bvme6000_init_IRQ(void)
+{
+ m68k_setup_user_interrupt(VEC_USER, 192, NULL);
+}
void __init config_bvme6000(void)
{
@@ -127,12 +128,6 @@ void __init config_bvme6000(void)
mach_hwclk = bvme6000_hwclk;
mach_set_clock_mmss = bvme6000_set_clock_mmss;
mach_reset = bvme6000_reset;
- mach_free_irq = bvme6000_free_irq;
- mach_process_int = bvme6000_process_int;
- mach_get_irq_list = show_bvme6000_interrupts;
- mach_request_irq = bvme6000_request_irq;
- enable_irq = bvme6000_enable_irq;
- disable_irq = bvme6000_disable_irq;
mach_get_model = bvme6000_get_model;
mach_get_hardware_list = bvme6000_get_hardware_list;