summaryrefslogtreecommitdiff
path: root/arch/m68knommu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/Kconfig28
-rw-r--r--arch/m68knommu/Makefile2
-rw-r--r--arch/m68knommu/kernel/Makefile4
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c5
-rw-r--r--arch/m68knommu/kernel/dma.c1
-rw-r--r--arch/m68knommu/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68knommu/kernel/process.c3
-rw-r--r--arch/m68knommu/kernel/ptrace.c17
-rw-r--r--arch/m68knommu/kernel/setup.c111
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c1
-rw-r--r--arch/m68knommu/kernel/syscalltable.S10
-rw-r--r--arch/m68knommu/kernel/traps.c5
-rw-r--r--arch/m68knommu/mm/memory.c100
-rw-r--r--arch/m68knommu/platform/5206/config.c10
-rw-r--r--arch/m68knommu/platform/5206e/config.c10
-rw-r--r--arch/m68knommu/platform/520x/config.c9
-rw-r--r--arch/m68knommu/platform/523x/config.c10
-rw-r--r--arch/m68knommu/platform/5249/config.c10
-rw-r--r--arch/m68knommu/platform/5272/config.c9
-rw-r--r--arch/m68knommu/platform/527x/config.c10
-rw-r--r--arch/m68knommu/platform/528x/config.c10
-rw-r--r--arch/m68knommu/platform/5307/Makefile2
-rw-r--r--arch/m68knommu/platform/5307/config.c9
-rw-r--r--arch/m68knommu/platform/5307/entry.S53
-rw-r--r--arch/m68knommu/platform/5307/ints.c279
-rw-r--r--arch/m68knommu/platform/5307/pit.c14
-rw-r--r--arch/m68knommu/platform/5307/timers.c13
-rw-r--r--arch/m68knommu/platform/5307/vectors.c29
-rw-r--r--arch/m68knommu/platform/532x/config.c7
-rw-r--r--arch/m68knommu/platform/5407/config.c9
-rw-r--r--arch/m68knommu/platform/68328/entry.S10
-rw-r--r--arch/m68knommu/platform/68328/ints.c130
-rw-r--r--arch/m68knommu/platform/68328/timers.c11
-rw-r--r--arch/m68knommu/platform/68360/config.c14
-rw-r--r--arch/m68knommu/platform/68360/entry.S6
-rw-r--r--arch/m68knommu/platform/68360/ints.c233
-rw-r--r--arch/m68knommu/platform/68VZ328/config.c7
37 files changed, 200 insertions, 993 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index adc64a2bafbb..185906b54cb0 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -45,6 +45,10 @@ config GENERIC_HWEIGHT
bool
default y
+config GENERIC_HARDIRQS
+ bool
+ default y
+
config GENERIC_CALIBRATE_DELAY
bool
default y
@@ -212,6 +216,18 @@ config XCOPILOT_BUGS
help
Support the bugs of Xcopilot.
+config UC5272
+ bool 'Arcturus Networks uC5272 dimm board support'
+ depends on M5272
+ help
+ Support for the Arcturus Networks uC5272 dimm board.
+
+config UC5282
+ bool "Arcturus Networks uC5282 board support"
+ depends on M528x
+ help
+ Support for the Arcturus Networks uC5282 dimm board.
+
config UCSIMM
bool "uCsimm module support"
depends on M68EZ328
@@ -338,6 +354,18 @@ config SOM5282EM
depends on M528x
help
Support for the EMAC.Inc SOM5282EM module.
+
+config WILDFIRE
+ bool "Intec Automation Inc. WildFire board support"
+ depends on M528x
+ help
+ Support for the Intec Automation Inc. WildFire.
+
+config WILDFIREMOD
+ bool "Intec Automation Inc. WildFire module support"
+ depends on M528x
+ help
+ Support for the Intec Automation Inc. WildFire module.
config ARN5307
bool "Arnewsh 5307 board support"
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 8951793fd8d4..1305cc980023 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -26,6 +26,8 @@ platform-$(CONFIG_M5407) := 5407
PLATFORM := $(platform-y)
board-$(CONFIG_PILOT) := pilot
+board-$(CONFIG_UC5272) := UC5272
+board-$(CONFIG_UC5282) := UC5282
board-$(CONFIG_UCSIMM) := ucsimm
board-$(CONFIG_UCDIMM) := ucdimm
board-$(CONFIG_UCQUICC) := uCquicc
diff --git a/arch/m68knommu/kernel/Makefile b/arch/m68knommu/kernel/Makefile
index 1c6cd1ab571e..1524b39ad63f 100644
--- a/arch/m68knommu/kernel/Makefile
+++ b/arch/m68knommu/kernel/Makefile
@@ -4,8 +4,8 @@
extra-y := vmlinux.lds
-obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
- setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
+obj-y += dma.o entry.o init_task.o irq.o m68k_ksyms.o process.o ptrace.o \
+ semaphore.o setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_COMEMPCI) += comempci.o
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index 7cd183d346ef..d97b89bae53c 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -15,7 +15,6 @@
#include <linux/hardirq.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
-#include <asm/irqnode.h>
#include <asm/thread_info.h>
#define DEFINE(sym, val) \
@@ -72,10 +71,6 @@ int main(void)
#else
/* bitfields are a bit difficult */
DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
- /* offsets into the irq_handler struct */
- DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler));
- DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id));
- DEFINE(IRQ_NEXT, offsetof(struct irq_node, next));
#endif
/* offsets into the kernel_stat struct */
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c
index 0a25874a2aae..e10eafc52789 100644
--- a/arch/m68knommu/kernel/dma.c
+++ b/arch/m68knommu/kernel/dma.c
@@ -8,6 +8,7 @@
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
+#include <linux/device.h>
#include <asm/io.h>
void *dma_alloc_coherent(struct device *dev, size_t size,
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
index 25327c9eadd7..f795062aba1e 100644
--- a/arch/m68knommu/kernel/m68k_ksyms.c
+++ b/arch/m68knommu/kernel/m68k_ksyms.c
@@ -81,8 +81,6 @@ EXPORT_SYMBOL(__mulsi3);
EXPORT_SYMBOL(__udivsi3);
EXPORT_SYMBOL(__umodsi3);
-EXPORT_SYMBOL(is_in_rom);
-
#ifdef CONFIG_COLDFIRE
extern unsigned int *dma_device_address;
extern unsigned long dma_base_addr, _ramend;
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 941955dc3b7c..47502d5ec19f 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -28,6 +28,7 @@
#include <linux/a.out.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
+#include <linux/fs.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -377,7 +378,7 @@ unsigned long get_wchan(struct task_struct *p)
fp = ((struct switch_stack *)p->thread.ksp)->a6;
do {
if (fp < stack_page+sizeof(struct thread_info) ||
- fp >= 8184+stack_page)
+ fp >= THREAD_SIZE-8+stack_page)
return 0;
pc = ((unsigned long *)fp)[1];
if (!in_sched_functions(pc))
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index f54b6a3dfecb..ef70ca070ce2 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -106,17 +106,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
- case PTRACE_PEEKDATA: {
- unsigned long tmp;
- int copied;
-
- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
- ret = -EIO;
- if (copied != sizeof(tmp))
- break;
- ret = put_user(tmp,(unsigned long *) data);
+ case PTRACE_PEEKDATA:
+ ret = generic_ptrace_peekdata(child, addr, data);
break;
- }
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
@@ -159,10 +151,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
/* when I and D space are separate, this will have to be fixed. */
case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA:
- ret = 0;
- if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
- break;
- ret = -EIO;
+ ret = generic_ptrace_pokedata(child, addr, data);
break;
case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 8133b1047353..3f86ade3a22a 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -1,8 +1,8 @@
/*
* linux/arch/m68knommu/kernel/setup.c
*
- * Copyright (C) 1999-2004 Greg Ungerer (gerg@snapgear.com)
- * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@lineo.ca>
+ * Copyright (C) 1999-2007 Greg Ungerer (gerg@snapgear.com)
+ * Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uClinux.org>
* Copyleft ()) 2000 James D. Schettine {james@telos-systems.com}
* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>
* Copyright (C) 1995 Hamish Macdonald
@@ -20,17 +20,13 @@
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/fs.h>
#include <linux/fb.h>
#include <linux/module.h>
#include <linux/console.h>
-#include <linux/genhd.h>
#include <linux/errno.h>
#include <linux/string.h>
-#include <linux/major.h>
#include <linux/bootmem.h>
#include <linux/seq_file.h>
-#include <linux/root_dev.h>
#include <linux/init.h>
#include <asm/setup.h>
@@ -46,34 +42,17 @@ EXPORT_SYMBOL(memory_end);
char __initdata command_line[COMMAND_LINE_SIZE];
-/* setup some dummy routines */
-static void dummy_waitbut(void)
-{
-}
-
-void (*mach_sched_init) (irq_handler_t handler);
-void (*mach_tick)( void );
-/* machine dependent keyboard functions */
-int (*mach_keyb_init) (void);
-int (*mach_kbdrate) (struct kbd_repeat *);
-void (*mach_kbd_leds) (unsigned int);
-/* machine dependent irq functions */
-void (*mach_init_IRQ) (void);
-irq_handler_t mach_default_handler;
-int (*mach_get_irq_list) (struct seq_file *, void *);
-void (*mach_process_int) (int irq, struct pt_regs *fp);
-void (*mach_trap_init) (void);
/* machine dependent timer functions */
-unsigned long (*mach_gettimeoffset) (void);
-void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
-int (*mach_hwclk) (int, struct rtc_time*);
-int (*mach_set_clock_mmss) (unsigned long);
-void (*mach_mksound)( unsigned int count, unsigned int ticks );
-void (*mach_reset)( void );
-void (*waitbut)(void) = dummy_waitbut;
-void (*mach_debug_init)(void);
-void (*mach_halt)( void );
-void (*mach_power_off)( void );
+void (*mach_sched_init)(irq_handler_t handler);
+void (*mach_tick)(void);
+void (*mach_gettod)(int*, int*, int*, int*, int*, int*);
+int (*mach_set_clock_mmss)(unsigned long);
+unsigned long (*mach_gettimeoffset)(void);
+
+/* machine dependent reboot functions */
+void (*mach_reset)(void);
+void (*mach_halt)(void);
+void (*mach_power_off)(void);
#ifdef CONFIG_M68000
@@ -134,13 +113,6 @@ void (*mach_power_off)( void );
#define CPU "UNKNOWN"
#endif
-/* (es) */
-/* note: why is this defined here? the must be a better place to put this */
-#if defined( CONFIG_TELOS) || defined( CONFIG_UCDIMM ) || defined( CONFIG_UCSIMM ) || defined(CONFIG_DRAGEN2) || (defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ))
-#define CAT_ROMARRAY
-#endif
-/* (/es) */
-
extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
extern int _ramstart, _ramend;
@@ -148,15 +120,8 @@ void setup_arch(char **cmdline_p)
{
int bootmap_size;
-#if defined(CAT_ROMARRAY) && defined(DEBUG)
- extern int __data_rom_start;
- extern int __data_start;
- int *romarray = (int *)((int) &__data_rom_start +
- (int)&_edata - (int)&__data_start);
-#endif
-
memory_start = PAGE_ALIGN(_ramstart);
- memory_end = _ramend; /* by now the stack is part of the init task */
+ memory_end = _ramend;
init_mm.start_code = (unsigned long) &_stext;
init_mm.end_code = (unsigned long) &_etext;
@@ -165,6 +130,11 @@ void setup_arch(char **cmdline_p)
config_BSP(&command_line[0], sizeof(command_line));
+#if defined(CONFIG_BOOTPARAM)
+ strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
+ command_line[sizeof(command_line) - 1] = 0;
+#endif
+
printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
#ifdef CONFIG_UCDIMM
@@ -220,11 +190,7 @@ void setup_arch(char **cmdline_p)
(int) &_sbss, (int) &_ebss);
printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
"STACK=0x%06x-0x%06x\n",
-#ifdef CAT_ROMARRAY
- (int) romarray, ((int) romarray) + romarray[2],
-#else
(int) &_ebss, (int) memory_start,
-#endif
(int) memory_start, (int) memory_end,
(int) memory_end, (int) _ramend);
#endif
@@ -268,32 +234,33 @@ void setup_arch(char **cmdline_p)
/*
* Get CPU information for use by the procfs.
*/
-
static int show_cpuinfo(struct seq_file *m, void *v)
{
- char *cpu, *mmu, *fpu;
- u_long clockfreq;
+ char *cpu, *mmu, *fpu;
+ u_long clockfreq;
- cpu = CPU;
- mmu = "none";
- fpu = "none";
+ cpu = CPU;
+ mmu = "none";
+ fpu = "none";
#ifdef CONFIG_COLDFIRE
- clockfreq = (loops_per_jiffy*HZ)*3;
+ clockfreq = (loops_per_jiffy * HZ) * 3;
#else
- clockfreq = (loops_per_jiffy*HZ)*16;
-#endif
-
- seq_printf(m, "CPU:\t\t%s\n"
- "MMU:\t\t%s\n"
- "FPU:\t\t%s\n"
- "Clocking:\t%lu.%1luMHz\n"
- "BogoMips:\t%lu.%02lu\n"
- "Calibration:\t%lu loops\n",
- cpu, mmu, fpu,
- clockfreq/1000000,(clockfreq/100000)%10,
- (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
- (loops_per_jiffy*HZ));
+ clockfreq = (loops_per_jiffy * HZ) * 16;
+#endif
+
+ seq_printf(m, "CPU:\t\t%s\n"
+ "MMU:\t\t%s\n"
+ "FPU:\t\t%s\n"
+ "Clocking:\t%lu.%1luMHz\n"
+ "BogoMips:\t%lu.%02lu\n"
+ "Calibration:\t%lu loops\n",
+ cpu, mmu, fpu,
+ clockfreq / 1000000,
+ (clockfreq / 100000) % 10,
+ (loops_per_jiffy * HZ) / 500000,
+ ((loops_per_jiffy * HZ) / 5000) % 100,
+ (loops_per_jiffy * HZ));
return 0;
}
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c
index 48e6b33e8b44..15d62c5279a9 100644
--- a/arch/m68knommu/kernel/sys_m68k.c
+++ b/arch/m68knommu/kernel/sys_m68k.c
@@ -18,6 +18,7 @@
#include <linux/mman.h>
#include <linux/file.h>
#include <linux/utsname.h>
+#include <linux/fs.h>
#include <asm/setup.h>
#include <asm/uaccess.h>
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index 4603f4f3c935..9620093514bc 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -329,6 +329,16 @@ ENTRY(sys_call_table)
.long sys_tee
.long sys_vmsplice
.long sys_move_pages /* 310 */
+ .long sys_sched_setaffinity
+ .long sys_sched_getaffinity
+ .long sys_kexec_load
+ .long sys_getcpu
+ .long sys_epoll_pwait /* 315 */
+ .long sys_utimensat
+ .long sys_signalfd
+ .long sys_timerfd
+ .long sys_eventfd
+ .long sys_fallocate /* 320 */
.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index bed5f47bf568..437a061d8b94 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -62,8 +62,6 @@ static char const * const vec_names[] = {
void __init trap_init(void)
{
- if (mach_trap_init)
- mach_trap_init();
}
void die_if_kernel(char *str, struct pt_regs *fp, int nr)
@@ -82,7 +80,8 @@ void die_if_kernel(char *str, struct pt_regs *fp, int nr)
printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n",
current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
- show_stack(NULL, (unsigned long *)fp);
+ show_stack(NULL, (unsigned long *)(fp + 1));
+ add_taint(TAINT_DIE);
do_exit(SIGSEGV);
}
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c
index 411e45248e5c..f93b88b51f9f 100644
--- a/arch/m68knommu/mm/memory.c
+++ b/arch/m68knommu/mm/memory.c
@@ -17,90 +17,14 @@
#include <linux/types.h>
#include <linux/slab.h>
-#include <asm/setup.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/system.h>
-#include <asm/traps.h>
-#include <asm/io.h>
/*
- * cache_clear() semantics: Clear any cache entries for the area in question,
- * without writing back dirty entries first. This is useful if the data will
- * be overwritten anyway, e.g. by DMA to memory. The range is defined by a
- * _physical_ address.
- */
-
-void cache_clear (unsigned long paddr, int len)
-{
-}
-
-
-/*
- * Define cache invalidate functions. The ColdFire 5407 is really
- * the only processor that needs to do some work here. Anything
- * that has separate data and instruction caches will be a problem.
- */
-#ifdef CONFIG_M5407
-
-static __inline__ void cache_invalidate_lines(unsigned long paddr, int len)
-{
- unsigned long sset, eset;
-
- sset = (paddr & 0x00000ff0);
- eset = ((paddr + len) & 0x0000ff0) + 0x10;
-
- __asm__ __volatile__ (
- "nop\n\t"
- "clrl %%d0\n\t"
- "1:\n\t"
- "movel %0,%%a0\n\t"
- "addl %%d0,%%a0\n\t"
- "2:\n\t"
- ".word 0xf4e8\n\t"
- "addl #0x10,%%a0\n\t"
- "cmpl %1,%%a0\n\t"
- "blt 2b\n\t"
- "addql #1,%%d0\n\t"
- "cmpil #4,%%d0\n\t"
- "bne 1b"
- : : "a" (sset), "a" (eset) : "d0", "a0" );
-}
-
-#else
-#define cache_invalidate_lines(a,b)
-#endif
-
-
-/*
- * cache_push() semantics: Write back any dirty cache data in the given area,
- * and invalidate the range in the instruction cache. It needs not (but may)
- * invalidate those entries also in the data cache. The range is defined by a
- * _physical_ address.
- */
-
-void cache_push (unsigned long paddr, int len)
-{
- cache_invalidate_lines(paddr, len);
-}
-
-
-/*
- * cache_push_v() semantics: Write back any dirty cache data in the given
- * area, and invalidate those entries at least in the instruction cache. This
- * is intended to be used after data has been written that can be executed as
- * code later. The range is defined by a _user_mode_ _virtual_ address (or,
- * more exactly, the space is defined by the %sfc/%dfc register.)
- */
-
-void cache_push_v (unsigned long vaddr, int len)
-{
- cache_invalidate_lines(vaddr, len);
-}
-
-/* Map some physical address range into the kernel address space. The
- * code is copied and adapted from map_chunk().
+ * Map some physical address range into the kernel address space.
+ * The code is copied and adapted from map_chunk().
*/
unsigned long kernel_map(unsigned long paddr, unsigned long size,
@@ -109,23 +33,3 @@ unsigned long kernel_map(unsigned long paddr, unsigned long size,
return paddr;
}
-
-int is_in_rom(unsigned long addr)
-{
- extern unsigned long _ramstart, _ramend;
-
- /*
- * What we are really trying to do is determine if addr is
- * in an allocated kernel memory region. If not then assume
- * we cannot free it or otherwise de-allocate it. Ideally
- * we could restrict this to really being in a ROM or flash,
- * but that would need to be done on a board by board basis,
- * not globally.
- */
- if ((addr < _ramstart) || (addr >= _ramend))
- return(1);
-
- /* Default case, not in ROM */
- return(0);
-}
-
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index 3343830aad10..d0f2dc5cb5a1 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -28,7 +28,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -98,18 +97,9 @@ int mcf_timerirqpending(int timer)
void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 0f67320b4031..425703fb6cee 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -20,14 +20,12 @@
#include <asm/mcftimer.h>
#include <asm/mcfsim.h>
#include <asm/mcfdma.h>
-#include <asm/irq.h>
/***************************************************************************/
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -98,21 +96,15 @@ void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#elif defined(CONFIG_NETtel)
+#if defined(CONFIG_NETtel)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0004000, size);
commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
#endif /* CONFIG_NETtel */
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 58b2878deb61..a2c95bebd004 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -30,7 +30,6 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
void coldfire_pit_tick(void);
void coldfire_pit_init(irq_handler_t handler);
unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -48,17 +47,9 @@ void mcf_autovector(unsigned int vec)
void config_BSP(char *commandp, int size)
{
-#ifdef CONFIG_BOOTPARAM
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 9b054e6caee2..0a3af05a434b 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -29,7 +29,6 @@
void coldfire_pit_tick(void);
void coldfire_pit_init(irq_handler_t handler);
unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
void config_BSP(char *commandp, int size)
{
mcf_disableall();
-
-#ifdef CONFIG_BOOTPARAM
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index d6706079d64a..dc2c362590c2 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -27,7 +27,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -96,18 +95,9 @@ int mcf_timerirqpending(int timer)
void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 6b437cc97776..1365a8300d5d 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -28,7 +28,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
extern unsigned int mcf_timervector;
@@ -113,10 +112,7 @@ void config_BSP(char *commandp, int size)
mcf_disableall();
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#elif defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
+#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0004000, size);
commandp[size-1] = 0;
@@ -128,8 +124,6 @@ void config_BSP(char *commandp, int size)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0010000, size);
commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
#endif
mcf_timervector = 69;
@@ -137,7 +131,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 28e7d964eef1..1b820441419a 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -29,7 +29,6 @@
void coldfire_pit_tick(void);
void coldfire_pit_init(irq_handler_t handler);
unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
void config_BSP(char *commandp, int size)
{
mcf_disableall();
-
-#ifdef CONFIG_BOOTPARAM
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 805b4f74ff19..a089e9513699 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -29,7 +29,6 @@
void coldfire_pit_tick(void);
void coldfire_pit_init(irq_handler_t handler);
unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
/***************************************************************************/
@@ -63,18 +62,9 @@ void mcf_autovector(unsigned int vec)
void config_BSP(char *commandp, int size)
{
mcf_disableall();
-
-#ifdef CONFIG_BOOTPARAM
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index 2fd37dcc309b..719a313494bc 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -16,7 +16,7 @@ ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif
-obj-$(CONFIG_COLDFIRE) += entry.o vectors.o ints.o
+obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
obj-$(CONFIG_M5206) += timers.o
obj-$(CONFIG_M5206e) += timers.o
obj-$(CONFIG_M520x) += pit.o
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index e04b84deb57d..e3461619fd65 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -29,7 +29,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
extern unsigned int mcf_timervector;
@@ -111,10 +110,7 @@ void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
+#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
defined(CONFIG_CLEOPATRA)
/* Copy command line from FLASH to local buffer... */
@@ -124,14 +120,11 @@ void config_BSP(char *commandp, int size)
mcf_timervector = 30;
mcf_profilevector = 31;
mcf_timerlevel = 6;
-#else
- memset(commandp, 0, size);
#endif
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index f0dba84d9101..a8cd867805ca 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -1,7 +1,7 @@
/*
* linux/arch/m68knommu/platform/5307/entry.S
*
- * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com)
+ * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
* Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
* Kenneth Albanowski <kjahds@kjahds.com>,
* Copyright (C) 2000 Lineo Inc. (www.lineo.com)
@@ -155,34 +155,21 @@ Lsignal_return:
/*
* This is the generic interrupt handler (for all hardware interrupt
- * sources). It figures out the vector number and calls the appropriate
- * interrupt service routine directly.
+ * sources). Calls upto high level code to do all the work.
*/
ENTRY(inthandler)
SAVE_ALL
moveq #-1,%d0
movel %d0,%sp@(PT_ORIG_D0)
- addql #1,local_irq_count
movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */
andl #0x03fc,%d0 /* mask out vector only */
- leal per_cpu__kstat+STAT_IRQ,%a0
- addql #1,%a0@(%d0)
-
+ movel %sp,%sp@- /* push regs arg */
lsrl #2,%d0 /* calculate real vector # */
- movel %d0,%d1 /* calculate array offset */
- lsll #4,%d1
- lea irq_list,%a0
- addl %d1,%a0 /* pointer to array struct */
-
- movel %sp,%sp@- /* push regs arg onto stack */
- movel %a0@(8),%sp@- /* push devid arg */
- movel %d0,%sp@- /* push vector # on stack */
-
- movel %a0@,%a0 /* get function to call */
- jbsr %a0@ /* call vector handler */
- lea %sp@(12),%sp /* pop parameters off stack */
+ movel %d0,%sp@- /* push vector number */
+ jbsr do_IRQ /* call high level irq handler */
+ lea %sp@(8),%sp /* pop args off stack */
bra ret_from_interrupt /* this was fallthrough */
@@ -198,24 +185,15 @@ ENTRY(fasthandler)
movew %sp@(PT_FORMATVEC),%d0
andl #0x03fc,%d0 /* mask out vector only */
- leal per_cpu__kstat+STAT_IRQ,%a0
- addql #1,%a0@(%d0)
-
- movel %sp,%sp@- /* push regs arg onto stack */
- clrl %sp@- /* push devid arg */
+ movel %sp,%sp@- /* push regs arg */
lsrl #2,%d0 /* calculate real vector # */
- movel %d0,%sp@- /* push vector # on stack */
-
- lsll #4,%d0 /* adjust for array offset */
- lea irq_list,%a0
- movel %a0@(%d0),%a0 /* get function to call */
- jbsr %a0@ /* call vector handler */
- lea %sp@(12),%sp /* pop parameters off stack */
+ movel %d0,%sp@- /* push vector number */
+ jbsr do_IRQ /* call high level irq handler */
+ lea %sp@(8),%sp /* pop args off stack */
RESTORE_LOCAL
ENTRY(ret_from_interrupt)
- subql #1,local_irq_count
jeq 2f
1:
RESTORE_ALL
@@ -235,16 +213,12 @@ ENTRY(ret_from_interrupt)
* Beware - when entering resume, prev (the current task) is
* in a0, next (the new task) is in a1,so don't change these
* registers until their contents are no longer needed.
+ * This is always called in supervisor mode, so don't bother to save
+ * and restore sr; user's process sr is actually in the stack.
*/
ENTRY(resume)
movel %a0, %d1 /* get prev thread in d1 */
- movew %sr,%d0 /* save thread status reg */
- movew %d0,%a0@(TASK_THREAD+THREAD_SR)
-
- oril #0x700,%d0 /* disable interrupts */
- move %d0,%sr
-
movel sw_usp,%d0 /* save usp */
movel %d0,%a0@(TASK_THREAD+THREAD_USP)
@@ -255,7 +229,4 @@ ENTRY(resume)
movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */
movel %a0, sw_usp
-
- movew %a1@(TASK_THREAD+THREAD_SR),%d0 /* restore thread status reg */
- movew %d0, %sr
rts
diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
deleted file mode 100644
index 751633038c4b..000000000000
--- a/arch/m68knommu/platform/5307/ints.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * linux/arch/m68knommu/kernel/ints.c -- General interrupt handling code
- *
- * Copyright (C) 1999-2002 Greg Ungerer (gerg@snapgear.com)
- * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
- * Kenneth Albanowski <kjahds@kjahds.com>,
- * Copyright (C) 2000 Lineo Inc. (www.lineo.com)
- *
- * Based on:
- *
- * linux/arch/m68k/kernel/ints.c -- Linux/m68k general interrupt handling code
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
-#include <linux/errno.h>
-#include <linux/seq_file.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/irqnode.h>
-#include <asm/traps.h>
-#include <asm/page.h>
-#include <asm/machdep.h>
-
-/*
- * This table stores the address info for each vector handler.
- */
-struct irq_entry irq_list[SYS_IRQS];
-
-#define NUM_IRQ_NODES 16
-static irq_node_t nodes[NUM_IRQ_NODES];
-
-/* The number of spurious interrupts */
-volatile unsigned int num_spurious;
-
-unsigned int local_irq_count[NR_CPUS];
-
-static irqreturn_t default_irq_handler(int irq, void *ptr)
-{
-#if 1
- printk(KERN_INFO "%s(%d): default irq handler vec=%d [0x%x]\n",
- __FILE__, __LINE__, irq, irq);
-#endif
- return(IRQ_HANDLED);
-}
-
-/*
- * void init_IRQ(void)
- *
- * Parameters: None
- *
- * Returns: Nothing
- *
- * This function should be called during kernel startup to initialize
- * the IRQ handling routines.
- */
-
-void __init init_IRQ(void)
-{
- int i;
-
- for (i = 0; i < SYS_IRQS; i++) {
- if (mach_default_handler)
- irq_list[i].handler = mach_default_handler;
- else
- irq_list[i].handler = default_irq_handler;
- irq_list[i].flags = IRQ_FLG_STD;
- irq_list[i].dev_id = NULL;
- irq_list[i].devname = NULL;
- }
-
- for (i = 0; i < NUM_IRQ_NODES; i++)
- nodes[i].handler = NULL;
-
- if (mach_init_IRQ)
- mach_init_IRQ();
-}
-
-irq_node_t *new_irq_node(void)
-{
- irq_node_t *node;
- short i;
-
- for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--)
- if (!node->handler)
- return node;
-
- printk(KERN_INFO "new_irq_node: out of nodes\n");
- return NULL;
-}
-
-int request_irq(
- unsigned int irq,
- irq_handler_t handler,
- unsigned long flags,
- const char *devname,
- void *dev_id)
-{
- if (irq < 0 || irq >= NR_IRQS) {
- printk(KERN_WARNING "%s: Incorrect IRQ %d from %s\n", __FUNCTION__,
- irq, devname);
- return -ENXIO;
- }
-
- if (!(irq_list[irq].flags & IRQ_FLG_STD)) {
- if (irq_list[irq].flags & IRQ_FLG_LOCK) {
- printk(KERN_WARNING "%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, irq_list[irq].devname);
- return -EBUSY;
- }
- if (flags & IRQ_FLG_REPLACE) {
- printk(KERN_WARNING "%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, irq_list[irq].devname);
- return -EBUSY;
- }
- }
-
- if (flags & IRQ_FLG_FAST) {
- extern asmlinkage void fasthandler(void);
- extern void set_evector(int vecnum, void (*handler)(void));
- set_evector(irq, fasthandler);
- }
-
- irq_list[irq].handler = handler;
- irq_list[irq].flags = flags;
- irq_list[irq].dev_id = dev_id;
- irq_list[irq].devname = devname;
- return 0;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
-{
- if (irq >= NR_IRQS) {
- printk(KERN_WARNING "%s: Incorrect IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (irq_list[irq].dev_id != dev_id)
- printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, irq_list[irq].devname);
-
- if (irq_list[irq].flags & IRQ_FLG_FAST) {
- extern asmlinkage void inthandler(void);
- extern void set_evector(int vecnum, void (*handler)(void));
- set_evector(irq, inthandler);
- }
-
- if (mach_default_handler)
- irq_list[irq].handler = mach_default_handler;
- else
- irq_list[irq].handler = default_irq_handler;
- irq_list[irq].flags = IRQ_FLG_STD;
- irq_list[irq].dev_id = NULL;
- irq_list[irq].devname = NULL;
-}
-
-EXPORT_SYMBOL(free_irq);
-
-
-int sys_request_irq(unsigned int irq, irq_handler_t handler,
- unsigned long flags, const char *devname, void *dev_id)
-{
- if (irq > IRQ7) {
- printk(KERN_WARNING "%s: Incorrect IRQ %d from %s\n",
- __FUNCTION__, irq, devname);
- return -ENXIO;
- }
-
-#if 0
- if (!(irq_list[irq].flags & IRQ_FLG_STD)) {
- if (irq_list[irq].flags & IRQ_FLG_LOCK) {
- printk(KERN_WARNING "%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, irq_list[irq].devname);
- return -EBUSY;
- }
- if (!(flags & IRQ_FLG_REPLACE)) {
- printk(KERN_WARNING "%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, irq_list[irq].devname);
- return -EBUSY;
- }
- }
-#endif
-
- irq_list[irq].handler = handler;
- irq_list[irq].flags = flags;
- irq_list[irq].dev_id = dev_id;
- irq_list[irq].devname = devname;
- return 0;
-}
-
-void sys_free_irq(unsigned int irq, void *dev_id)
-{
- if (irq > IRQ7) {
- printk(KERN_WARNING "%s: Incorrect IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (irq_list[irq].dev_id != dev_id)
- printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, irq_list[irq].devname);
-
- irq_list[irq].handler = mach_default_handler;
- irq_list[irq].flags = 0;
- irq_list[irq].dev_id = NULL;
- irq_list[irq].devname = NULL;
-}
-
-/*
- * Do we need these probe functions on the m68k?
- *
- * ... may be useful with ISA devices
- */
-unsigned long probe_irq_on (void)
-{
- return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-int probe_irq_off (unsigned long irqs)
-{
- return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-
-asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
-{
- if (vec >= VEC_INT1 && vec <= VEC_INT7) {
- vec -= VEC_SPUR;
- kstat_cpu(0).irqs[vec]++;
- irq_list[vec].handler(vec, irq_list[vec].dev_id);
- } else {
- if (mach_process_int)
- mach_process_int(vec, fp);
- else
- panic("Can't process interrupt vector %ld\n", vec);
- return;
- }
-}
-
-
-int show_interrupts(struct seq_file *p, void *v)
-{
- int i = *(loff_t *) v;
-
- if (i < NR_IRQS) {
- if (! (irq_list[i].flags & IRQ_FLG_STD)) {
- seq_printf(p, "%3d: %10u ", i,
- (i ? kstat_cpu(0).irqs[i] : num_spurious));
- if (irq_list[i].flags & IRQ_FLG_LOCK)
- seq_printf(p, "L ");
- else
- seq_printf(p, " ");
- seq_printf(p, "%s\n", irq_list[i].devname);
- }
- }
-
- if (i == NR_IRQS && mach_get_irq_list)
- mach_get_irq_list(p, v);
- return 0;
-}
-
-void init_irq_proc(void)
-{
- /* Insert /proc/irq driver here */
-}
-
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index aa15beeb36ca..e53c446d10e4 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -5,9 +5,8 @@
* hardware timer only exists in the Freescale ColdFire
* 5270/5271, 5282 and other CPUs.
*
- * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com)
+ * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
* Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com)
- *
*/
/***************************************************************************/
@@ -17,8 +16,8 @@
#include <linux/param.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <asm/io.h>
-#include <asm/irq.h>
#include <asm/coldfire.h>
#include <asm/mcfpit.h>
#include <asm/mcfsim.h>
@@ -43,13 +42,18 @@ void coldfire_pit_tick(void)
/***************************************************************************/
+static struct irqaction coldfire_pit_irq = {
+ .name = "timer",
+ .flags = IRQF_DISABLED | IRQF_TIMER,
+};
+
void coldfire_pit_init(irq_handler_t handler)
{
volatile unsigned char *icrp;
volatile unsigned long *imrp;
- request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED,
- "ColdFire Timer", NULL);
+ coldfire_pit_irq.handler = handler;
+ setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq);
icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
MCFINTC_ICR0 + MCFINT_PIT1);
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index fb66eadd5896..64bd0ff9029e 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -3,7 +3,7 @@
/*
* timers.c -- generic ColdFire hardware timer support.
*
- * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com)
+ * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
*/
/***************************************************************************/
@@ -13,8 +13,8 @@
#include <linux/param.h>
#include <linux/interrupt.h>
#include <linux/init.h>
+#include <linux/irq.h>
#include <asm/io.h>
-#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
@@ -62,17 +62,24 @@ void coldfire_tick(void)
/***************************************************************************/
+static struct irqaction coldfire_timer_irq = {
+ .name = "timer",
+ .flags = IRQF_DISABLED | IRQF_TIMER,
+};
+
static int ticks_per_intr;
void coldfire_timer_init(irq_handler_t handler)
{
+ coldfire_timer_irq.handler = handler;
+ setup_irq(mcf_timervector, &coldfire_timer_irq);
+
__raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
ticks_per_intr = (MCF_BUSCLK / 16) / HZ;
__raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR));
__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
- request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL);
mcf_settimericr(1, mcf_timerlevel);
#ifdef CONFIG_HIGHPROFILE
diff --git a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c
index 2a8b0d044ce5..6cf894620234 100644
--- a/arch/m68knommu/platform/5307/vectors.c
+++ b/arch/m68knommu/platform/5307/vectors.c
@@ -3,23 +3,17 @@
/*
* linux/arch/m68knommu/platform/5307/vectors.c
*
- * Copyright (C) 1999-2003, Greg Ungerer <gerg@snapgear.com>
+ * Copyright (C) 1999-2007, Greg Ungerer <gerg@snapgear.com>
*/
/***************************************************************************/
#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/param.h>
#include <linux/init.h>
-#include <linux/unistd.h>
-#include <linux/delay.h>
-#include <asm/irq.h>
-#include <asm/dma.h>
+#include <linux/irq.h>
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
-#include <asm/mcftimer.h>
#include <asm/mcfsim.h>
#include <asm/mcfdma.h>
#include <asm/mcfwdebug.h>
@@ -56,7 +50,7 @@ asmlinkage void trap(void);
asmlinkage void system_call(void);
asmlinkage void inthandler(void);
-void __init coldfire_trap_init(void)
+void __init init_vectors(void)
{
int i;
@@ -86,6 +80,23 @@ void __init coldfire_trap_init(void)
/***************************************************************************/
+void enable_vector(unsigned int irq)
+{
+ /* Currently no action on ColdFire */
+}
+
+void disable_vector(unsigned int irq)
+{
+ /* Currently no action on ColdFire */
+}
+
+void ack_vector(unsigned int irq)
+{
+ /* Currently no action on ColdFire */
+}
+
+/***************************************************************************/
+
void coldfire_reset(void)
{
HARD_RESET_NOW();
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index 664c3a12b0c1..b32c6425f821 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -37,7 +37,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
extern unsigned int mcf_timervector;
@@ -92,10 +91,7 @@ void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
+#if !defined(CONFIG_BOOTPARAM)
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0x4000, 4);
if(strncmp(commandp, "kcl ", 4) == 0){
@@ -111,7 +107,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 036f62876241..e692536817d8 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -28,7 +28,6 @@
void coldfire_tick(void);
void coldfire_timer_init(irq_handler_t handler);
unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
void coldfire_reset(void);
extern unsigned int mcf_timervector;
@@ -102,13 +101,6 @@ void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
-#if defined(CONFIG_BOOTPARAM)
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
#if defined(CONFIG_CLEOPATRA)
/* Different timer setup - to prevent device clash */
mcf_timervector = 30;
@@ -119,7 +111,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
- mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
}
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
index f97862715450..b1aef72f3baf 100644
--- a/arch/m68knommu/platform/68328/entry.S
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -133,7 +133,6 @@ Lreturn:
*/
inthandler1:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -145,7 +144,6 @@ inthandler1:
inthandler2:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -157,7 +155,6 @@ inthandler2:
inthandler3:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -169,7 +166,6 @@ inthandler3:
inthandler4:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -181,7 +177,6 @@ inthandler4:
inthandler5:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -193,7 +188,6 @@ inthandler5:
inthandler6:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -205,7 +199,6 @@ inthandler6:
inthandler7:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -217,7 +210,6 @@ inthandler7:
inthandler:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and #0x3ff, %d0
@@ -228,7 +220,6 @@ inthandler:
bra ret_from_interrupt
ret_from_interrupt:
- subql #1,local_irq_count
jeq 1f
2:
RESTORE_ALL
@@ -238,7 +229,6 @@ ret_from_interrupt:
jhi 2b
/* check if we need to do software interrupts */
- movel local_irq_count,%d0
jeq ret_from_exception
pea ret_from_exception
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
index 3de6e337554e..72e56d554f4f 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -9,21 +9,14 @@
* Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
*/
-#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/kernel_stat.h>
-#include <linux/errno.h>
+#include <linux/init.h>
#include <linux/interrupt.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/irqnode.h>
+#include <linux/irq.h>
#include <asm/traps.h>
#include <asm/io.h>
#include <asm/machdep.h>
-#include <asm/setup.h>
#if defined(CONFIG_M68328)
#include <asm/MC68328.h>
@@ -79,16 +72,12 @@ extern e_vector *_ramvec;
/* The number of spurious interrupts */
volatile unsigned int num_spurious;
-unsigned int local_irq_count[NR_CPUS];
-
-/* irq node variables for the 32 (potential) on chip sources */
-static irq_node_t int_irq_list[NR_IRQS];
/*
* This function should be called during kernel startup to initialize
- * the IRQ handling routines.
+ * the machine vector table.
*/
-void init_IRQ(void)
+void __init init_vectors(void)
{
int i;
@@ -108,96 +97,10 @@ void init_IRQ(void)
IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
- /* initialize handlers */
- for (i = 0; i < NR_IRQS; i++) {
- int_irq_list[i].handler = bad_interrupt;
- int_irq_list[i].flags = IRQ_FLG_STD;
- int_irq_list[i].dev_id = NULL;
- int_irq_list[i].devname = NULL;
- }
-
/* turn off all interrupts */
IMR = ~0;
}
-int request_irq(
- unsigned int irq,
- irq_handler_t handler,
- unsigned long flags,
- const char *devname,
- void *dev_id)
-{
- if (irq >= NR_IRQS) {
- printk (KERN_ERR "%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
- return -ENXIO;
- }
-
- if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
- if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
- printk(KERN_ERR "%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, int_irq_list[irq].devname);
- return -EBUSY;
- }
- if (flags & IRQ_FLG_REPLACE) {
- printk(KERN_ERR "%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, int_irq_list[irq].devname);
- return -EBUSY;
- }
- }
-
- int_irq_list[irq].handler = handler;
- int_irq_list[irq].flags = flags;
- int_irq_list[irq].dev_id = dev_id;
- int_irq_list[irq].devname = devname;
-
- IMR &= ~(1<<irq);
-
- return 0;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
-{
- if (irq >= NR_IRQS) {
- printk (KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (int_irq_list[irq].dev_id != dev_id)
- printk(KERN_INFO "%s: removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, int_irq_list[irq].devname);
-
- int_irq_list[irq].handler = bad_interrupt;
- int_irq_list[irq].flags = IRQ_FLG_STD;
- int_irq_list[irq].dev_id = NULL;
- int_irq_list[irq].devname = NULL;
-
- IMR |= 1<<irq;
-}
-
-EXPORT_SYMBOL(free_irq);
-
-int show_interrupts(struct seq_file *p, void *v)
-{
- int i = *(loff_t *) v;
-
- if (i < NR_IRQS) {
- if (int_irq_list[i].devname) {
- seq_printf(p, "%3d: %10u ", i, kstat_cpu(0).irqs[i]);
- if (int_irq_list[i].flags & IRQ_FLG_LOCK)
- seq_printf(p, "L ");
- else
- seq_printf(p, " ");
- seq_printf(p, "%s\n", int_irq_list[i].devname);
- }
- }
- if (i == NR_IRQS)
- seq_printf(p, " : %10u spurious\n", num_spurious);
-
- return 0;
-}
-
/* The 68k family did not have a good way to determine the source
* of interrupts until later in the family. The EC000 core does
* not provide the vector number on the stack, we vector everything
@@ -255,14 +158,23 @@ void process_int(int vec, struct pt_regs *fp)
irq++;
}
- kstat_cpu(0).irqs[irq]++;
-
- if (int_irq_list[irq].handler) {
- int_irq_list[irq].handler(irq, int_irq_list[irq].dev_id, fp);
- } else {
- printk(KERN_ERR "unregistered interrupt %d!\nTurning it off in the IMR...\n", irq);
- IMR |= mask;
- }
+ do_IRQ(irq, fp);
pend &= ~mask;
}
}
+
+void enable_vector(unsigned int irq)
+{
+ IMR &= ~(1<<irq);
+}
+
+void disable_vector(unsigned int irq)
+{
+ IMR |= (1<<irq);
+}
+
+void ack_vector(unsigned int irq)
+{
+ /* Nothing needed */
+}
+
diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c
index ef067f4c3cd4..0396476f955d 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -18,10 +18,10 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/pgtable.h>
-#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/MC68VZ328.h>
@@ -53,14 +53,19 @@
/***************************************************************************/
+static struct irqaction m68328_timer_irq = {
+ .name = "timer",
+ .flags = IRQF_DISABLED | IRQF_TIMER,
+};
+
void m68328_timer_init(irq_handler_t timer_routine)
{
/* disable timer 1 */
TCTL = 0;
/* set ISR */
- if (request_irq(TMR_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, "timer", NULL))
- panic("Unable to attach timer interrupt\n");
+ m68328_timer_irq.handler = timer_routine;
+ setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
/* Restart mode, Enable int, Set clock source */
TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE;
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c
index 4ff13bd51ffd..155b72fe2607 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -17,11 +17,11 @@
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/pgtable.h>
-#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/m68360.h>
@@ -51,11 +51,15 @@ extern unsigned long int system_clock; //In kernel setup.c
extern void config_M68360_irq(void);
+static struct irqaction m68360_timer_irq = {
+ .name = "timer",
+ .flags = IRQF_DISABLED | IRQF_TIMER,
+};
+
void BSP_sched_init(irq_handler_t timer_routine)
{
unsigned char prescaler;
unsigned short tgcr_save;
- int return_value;
#if 0
/* Restart mode, Enable int, 32KHz, Enable timer */
@@ -86,10 +90,8 @@ void BSP_sched_init(irq_handler_t timer_routine)
pquicc->timer_ter1 = 0x0003; /* clear timer events */
/* enable timer 1 interrupt in CIMR */
-// request_irq(IRQ_MACHSPEC | CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, "timer", NULL);
- //return_value = request_irq( CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, "timer", NULL);
- return_value = request_irq(CPMVEC_TIMER1 , timer_routine, IRQ_FLG_LOCK,
- "Timer", NULL);
+ m68360_timer_irq.handler = timer_routine;
+ setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);
/* Start timer 1: */
tgcr_save = (pquicc->timer_tgcr & 0xfff0) | 0x0001;
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S
index f1af8977f294..55dfefe38642 100644
--- a/arch/m68knommu/platform/68360/entry.S
+++ b/arch/m68knommu/platform/68360/entry.S
@@ -120,23 +120,21 @@ Lreturn:
RESTORE_ALL
/*
- * This is the main interrupt handler, responsible for calling process_int()
+ * This is the main interrupt handler, responsible for calling do_IRQ()
*/
inthandler:
SAVE_ALL
- addql #1,local_irq_count /* put exception # in d0*/
movew %sp@(PT_VECTOR), %d0
and.l #0x3ff, %d0
lsr.l #0x02, %d0
movel %sp,%sp@-
movel %d0,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
+ jbsr do_IRQ /* process the IRQ*/
3: addql #8,%sp /* pop parameters off stack*/
bra ret_from_interrupt
ret_from_interrupt:
- subql #1,local_irq_count
jeq 1f
2:
RESTORE_ALL
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index 4df3c146eb74..c36781157e09 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -10,20 +10,13 @@
* Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org>
*/
-#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/kernel_stat.h>
-#include <linux/errno.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/irqnode.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <asm/traps.h>
-#include <asm/io.h>
#include <asm/machdep.h>
-#include <asm/setup.h>
#include <asm/m68360.h>
/* from quicc/commproc.c: */
@@ -36,26 +29,19 @@ extern void cpm_interrupt_init(void);
asmlinkage void system_call(void);
asmlinkage void buserr(void);
asmlinkage void trap(void);
-asmlinkage irqreturn_t bad_interrupt(void);
-asmlinkage irqreturn_t inthandler(void);
+asmlinkage void bad_interrupt(void);
+asmlinkage void inthandler(void);
extern void *_ramvec[];
/* The number of spurious interrupts */
volatile unsigned int num_spurious;
-unsigned int local_irq_count[NR_CPUS];
-
-/* irq node variables for the 32 (potential) on chip sources */
-static irq_node_t int_irq_list[INTERNAL_IRQS];
-
-static short int_irq_ablecount[INTERNAL_IRQS];
/*
* This function should be called during kernel startup to initialize
- * IRQ handling routines.
+ * the vector table.
*/
-
-void init_IRQ(void)
+void init_vectors(void)
{
int i;
int vba = (CPM_VECTOR_BASE<<4);
@@ -79,7 +65,6 @@ void init_IRQ(void)
_ramvec[32] = system_call;
_ramvec[33] = trap;
-
cpm_interrupt_init();
/* set up CICR for vector base address and irq level */
@@ -124,212 +109,20 @@ void init_IRQ(void)
/* turn off all CPM interrupts */
pquicc->intr_cimr = 0x00000000;
-
- /* initialize handlers */
- for (i = 0; i < INTERNAL_IRQS; i++) {
- int_irq_list[i].handler = NULL;
- int_irq_list[i].flags = IRQ_FLG_STD;
- int_irq_list[i].dev_id = NULL;
- int_irq_list[i].devname = NULL;
- }
-}
-
-#if 0
-void M68360_insert_irq(irq_node_t **list, irq_node_t *node)
-{
- unsigned long flags;
- irq_node_t *cur;
-
- if (!node->dev_id)
- printk(KERN_INFO "%s: Warning: dev_id of %s is zero\n",
- __FUNCTION__, node->devname);
-
- local_irq_save(flags);
-
- cur = *list;
-
- while (cur) {
- list = &cur->next;
- cur = cur->next;
- }
-
- node->next = cur;
- *list = node;
-
- local_irq_restore(flags);
}
-void M68360_delete_irq(irq_node_t **list, void *dev_id)
+void enable_vector(unsigned int irq)
{
- unsigned long flags;
- irq_node_t *node;
-
- local_irq_save(flags);
-
- for (node = *list; node; list = &node->next, node = *list) {
- if (node->dev_id == dev_id) {
- *list = node->next;
- /* Mark it as free. */
- node->handler = NULL;
- local_irq_restore(flags);
- return;
- }
- }
- local_irq_restore(flags);
- printk (KERN_INFO "%s: tried to remove invalid irq\n", __FUNCTION__);
+ pquicc->intr_cimr |= (1 << irq);
}
-#endif
-int request_irq(
- unsigned int irq,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
- unsigned long flags,
- const char *devname,
- void *dev_id)
+void disable_vector(unsigned int irq)
{
- int mask = (1<<irq);
-
- irq += (CPM_VECTOR_BASE<<4);
-
- if (irq >= INTERNAL_IRQS) {
- printk (KERN_ERR "%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
- return -ENXIO;
- }
-
- if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
- if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
- printk(KERN_ERR "%s: IRQ %d from %s is not replaceable\n",
- __FUNCTION__, irq, int_irq_list[irq].devname);
- return -EBUSY;
- }
- if (flags & IRQ_FLG_REPLACE) {
- printk(KERN_ERR "%s: %s can't replace IRQ %d from %s\n",
- __FUNCTION__, devname, irq, int_irq_list[irq].devname);
- return -EBUSY;
- }
- }
- int_irq_list[irq].handler = handler;
- int_irq_list[irq].flags = flags;
- int_irq_list[irq].dev_id = dev_id;
- int_irq_list[irq].devname = devname;
-
- /* enable in the CIMR */
- if (!int_irq_ablecount[irq])
- pquicc->intr_cimr |= mask;
- /* *(volatile unsigned long *)0xfffff304 &= ~(1<<irq); */
-
- return 0;
+ pquicc->intr_cimr &= ~(1 << irq);
}
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
+void ack_vector(unsigned int irq)
{
- if (irq >= INTERNAL_IRQS) {
- printk (KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (int_irq_list[irq].dev_id != dev_id)
- printk(KERN_INFO "%s: removing probably wrong IRQ %d from %s\n",
- __FUNCTION__, irq, int_irq_list[irq].devname);
- int_irq_list[irq].handler = NULL;
- int_irq_list[irq].flags = IRQ_FLG_STD;
- int_irq_list[irq].dev_id = NULL;
- int_irq_list[irq].devname = NULL;
-
- *(volatile unsigned long *)0xfffff304 |= 1<<irq;
+ pquicc->intr_cisr = (1 << irq);
}
-EXPORT_SYMBOL(free_irq);
-
-#if 0
-/*
- * Enable/disable a particular machine specific interrupt source.
- * Note that this may affect other interrupts in case of a shared interrupt.
- * This function should only be called for a _very_ short time to change some
- * internal data, that may not be changed by the interrupt at the same time.
- * int_(enable|disable)_irq calls may also be nested.
- */
-void M68360_enable_irq(unsigned int irq)
-{
- if (irq >= INTERNAL_IRQS) {
- printk(KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (--int_irq_ablecount[irq])
- return;
-
- /* enable the interrupt */
- *(volatile unsigned long *)0xfffff304 &= ~(1<<irq);
-}
-
-void M68360_disable_irq(unsigned int irq)
-{
- if (irq >= INTERNAL_IRQS) {
- printk(KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
- return;
- }
-
- if (int_irq_ablecount[irq]++)
- return;
-
- /* disable the interrupt */
- *(volatile unsigned long *)0xfffff304 |= 1<<irq;
-}
-#endif
-
-int show_interrupts(struct seq_file *p, void *v)
-{
- int i = *(loff_t *) v;
-
- if (i < NR_IRQS) {
- if (int_irq_list[i].devname) {
- seq_printf(p, "%3d: %10u ", i, kstat_cpu(0).irqs[i]);
- if (int_irq_list[i].flags & IRQ_FLG_LOCK)
- seq_printf(p, "L ");
- else
- seq_printf(p, " ");
- seq_printf(p, "%s\n", int_irq_list[i].devname);
- }
- }
- if (i == NR_IRQS)
- seq_printf(p, " : %10u spurious\n", num_spurious);
-
- return 0;
-}
-
-/* The 68k family did not have a good way to determine the source
- * of interrupts until later in the family. The EC000 core does
- * not provide the vector number on the stack, we vector everything
- * into one vector and look in the blasted mask register...
- * This code is designed to be fast, almost constant time, not clean!
- */
-void process_int(int vec, struct pt_regs *fp)
-{
- int irq;
- int mask;
-
- /* unsigned long pend = *(volatile unsigned long *)0xfffff30c; */
-
- /* irq = vec + (CPM_VECTOR_BASE<<4); */
- irq = vec;
-
- /* unsigned long pend = *(volatile unsigned long *)pquicc->intr_cipr; */
-
- /* Bugger all that weirdness. For the moment, I seem to know where I came from;
- * vec is passed from a specific ISR, so I'll use it. */
-
- if (int_irq_list[irq].handler) {
- int_irq_list[irq].handler(irq , int_irq_list[irq].dev_id, fp);
- kstat_cpu(0).irqs[irq]++;
- pquicc->intr_cisr = (1 << vec); /* indicate that irq has been serviced */
- } else {
- printk(KERN_ERR "unregistered interrupt %d!\nTurning it off in the CIMR...\n", irq);
- /* *(volatile unsigned long *)0xfffff304 |= mask; */
- pquicc->intr_cimr &= ~(1 << vec);
- num_spurious += 1;
- }
- return(IRQ_HANDLED);
-}
diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c
index 8abe0f6e7235..79dced929c97 100644
--- a/arch/m68knommu/platform/68VZ328/config.c
+++ b/arch/m68knommu/platform/68VZ328/config.c
@@ -191,13 +191,6 @@ void config_BSP(char *command, int size)
{
printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
-#if defined(CONFIG_BOOTPARAM)
- strncpy(command, CONFIG_BOOTPARAM_STRING, size);
- command[size-1] = 0;
-#else
- memset(command, 0, size);
-#endif
-
init_hardware(command, size);
mach_sched_init = (void *) m68328_timer_init;