Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Roman Zippel and committed by
Linus Torvalds
200a3d35 ebba61d5

+88 -555
+1 -1
arch/m68k/bvme6000/Makefile
··· 2 2 # Makefile for Linux arch/m68k/bvme6000 source directory 3 3 # 4 4 5 - obj-y := config.o bvmeints.o rtc.o 5 + obj-y := config.o rtc.o
-161
arch/m68k/bvme6000/bvmeints.c
··· 1 - /* 2 - * arch/m68k/bvme6000/bvmeints.c 3 - * 4 - * Copyright (C) 1997 Richard Hirst [richard@sleepie.demon.co.uk] 5 - * 6 - * based on amiints.c -- Amiga Linux interrupt handling code 7 - * 8 - * This file is subject to the terms and conditions of the GNU General Public 9 - * License. See the file README.legal in the main directory of this archive 10 - * for more details. 11 - * 12 - */ 13 - 14 - #include <linux/types.h> 15 - #include <linux/kernel.h> 16 - #include <linux/errno.h> 17 - #include <linux/interrupt.h> 18 - #include <linux/seq_file.h> 19 - 20 - #include <asm/ptrace.h> 21 - #include <asm/system.h> 22 - #include <asm/irq.h> 23 - #include <asm/traps.h> 24 - 25 - static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp); 26 - 27 - /* 28 - * This should ideally be 4 elements only, for speed. 29 - */ 30 - 31 - static struct { 32 - irqreturn_t (*handler)(int, void *, struct pt_regs *); 33 - unsigned long flags; 34 - void *dev_id; 35 - const char *devname; 36 - unsigned count; 37 - } irq_tab[256]; 38 - 39 - /* 40 - * void bvme6000_init_IRQ (void) 41 - * 42 - * Parameters: None 43 - * 44 - * Returns: Nothing 45 - * 46 - * This function is called during kernel startup to initialize 47 - * the bvme6000 IRQ handling routines. 48 - */ 49 - 50 - void bvme6000_init_IRQ (void) 51 - { 52 - int i; 53 - 54 - for (i = 0; i < 256; i++) { 55 - irq_tab[i].handler = bvme6000_defhand; 56 - irq_tab[i].flags = IRQ_FLG_STD; 57 - irq_tab[i].dev_id = NULL; 58 - irq_tab[i].devname = NULL; 59 - irq_tab[i].count = 0; 60 - } 61 - } 62 - 63 - int bvme6000_request_irq(unsigned int irq, 64 - irqreturn_t (*handler)(int, void *, struct pt_regs *), 65 - unsigned long flags, const char *devname, void *dev_id) 66 - { 67 - if (irq > 255) { 68 - printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); 69 - return -ENXIO; 70 - } 71 - #if 0 72 - /* Nothing special about auto-vectored devices for the BVME6000, 73 - * but treat it specially to avoid changes elsewhere. 74 - */ 75 - 76 - if (irq >= VEC_INT1 && irq <= VEC_INT7) 77 - return cpu_request_irq(irq - VEC_SPUR, handler, flags, 78 - devname, dev_id); 79 - #endif 80 - if (!(irq_tab[irq].flags & IRQ_FLG_STD)) { 81 - if (irq_tab[irq].flags & IRQ_FLG_LOCK) { 82 - printk("%s: IRQ %d from %s is not replaceable\n", 83 - __FUNCTION__, irq, irq_tab[irq].devname); 84 - return -EBUSY; 85 - } 86 - if (flags & IRQ_FLG_REPLACE) { 87 - printk("%s: %s can't replace IRQ %d from %s\n", 88 - __FUNCTION__, devname, irq, irq_tab[irq].devname); 89 - return -EBUSY; 90 - } 91 - } 92 - irq_tab[irq].handler = handler; 93 - irq_tab[irq].flags = flags; 94 - irq_tab[irq].dev_id = dev_id; 95 - irq_tab[irq].devname = devname; 96 - return 0; 97 - } 98 - 99 - void bvme6000_free_irq(unsigned int irq, void *dev_id) 100 - { 101 - if (irq > 255) { 102 - printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); 103 - return; 104 - } 105 - #if 0 106 - if (irq >= VEC_INT1 && irq <= VEC_INT7) { 107 - cpu_free_irq(irq - VEC_SPUR, dev_id); 108 - return; 109 - } 110 - #endif 111 - if (irq_tab[irq].dev_id != dev_id) 112 - printk("%s: Removing probably wrong IRQ %d from %s\n", 113 - __FUNCTION__, irq, irq_tab[irq].devname); 114 - 115 - irq_tab[irq].handler = bvme6000_defhand; 116 - irq_tab[irq].flags = IRQ_FLG_STD; 117 - irq_tab[irq].dev_id = NULL; 118 - irq_tab[irq].devname = NULL; 119 - } 120 - 121 - irqreturn_t bvme6000_process_int (unsigned long vec, struct pt_regs *fp) 122 - { 123 - if (vec > 255) { 124 - printk ("bvme6000_process_int: Illegal vector %ld", vec); 125 - return IRQ_NONE; 126 - } else { 127 - irq_tab[vec].count++; 128 - irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); 129 - return IRQ_HANDLED; 130 - } 131 - } 132 - 133 - int show_bvme6000_interrupts(struct seq_file *p, void *v) 134 - { 135 - int i; 136 - 137 - for (i = 0; i < 256; i++) { 138 - if (irq_tab[i].count) 139 - seq_printf(p, "Vec 0x%02x: %8d %s\n", 140 - i, irq_tab[i].count, 141 - irq_tab[i].devname ? irq_tab[i].devname : "free"); 142 - } 143 - return 0; 144 - } 145 - 146 - 147 - static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp) 148 - { 149 - printk ("Unknown interrupt 0x%02x\n", irq); 150 - return IRQ_NONE; 151 - } 152 - 153 - void bvme6000_enable_irq (unsigned int irq) 154 - { 155 - } 156 - 157 - 158 - void bvme6000_disable_irq (unsigned int irq) 159 - { 160 - } 161 -
+8 -13
arch/m68k/bvme6000/config.c
··· 36 36 #include <asm/machdep.h> 37 37 #include <asm/bvme6000hw.h> 38 38 39 - extern irqreturn_t bvme6000_process_int (int level, struct pt_regs *regs); 40 - extern void bvme6000_init_IRQ (void); 41 - extern void bvme6000_free_irq (unsigned int, void *); 42 - extern int show_bvme6000_interrupts(struct seq_file *, void *); 43 - extern void bvme6000_enable_irq (unsigned int); 44 - extern void bvme6000_disable_irq (unsigned int); 45 39 static void bvme6000_get_model(char *model); 46 40 static int bvme6000_get_hardware_list(char *buffer); 47 - 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); 48 41 extern void bvme6000_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 49 42 extern unsigned long bvme6000_gettimeoffset (void); 50 43 extern int bvme6000_hwclk (int, struct rtc_time *); ··· 93 100 return 0; 94 101 } 95 102 103 + /* 104 + * This function is called during kernel startup to initialize 105 + * the bvme6000 IRQ handling routines. 106 + */ 107 + static void bvme6000_init_IRQ(void) 108 + { 109 + m68k_setup_user_interrupt(VEC_USER, 192, NULL); 110 + } 96 111 97 112 void __init config_bvme6000(void) 98 113 { ··· 128 127 mach_hwclk = bvme6000_hwclk; 129 128 mach_set_clock_mmss = bvme6000_set_clock_mmss; 130 129 mach_reset = bvme6000_reset; 131 - mach_free_irq = bvme6000_free_irq; 132 - mach_process_int = bvme6000_process_int; 133 - mach_get_irq_list = show_bvme6000_interrupts; 134 - mach_request_irq = bvme6000_request_irq; 135 - enable_irq = bvme6000_enable_irq; 136 - disable_irq = bvme6000_disable_irq; 137 130 mach_get_model = bvme6000_get_model; 138 131 mach_get_hardware_list = bvme6000_get_hardware_list; 139 132
-146
arch/m68k/mvme147/147ints.c
··· 1 - /* 2 - * arch/m68k/mvme147/147ints.c 3 - * 4 - * Copyright (C) 1997 Richard Hirst [richard@sleepie.demon.co.uk] 5 - * 6 - * based on amiints.c -- Amiga Linux interrupt handling code 7 - * 8 - * This file is subject to the terms and conditions of the GNU General Public 9 - * License. See the file README.legal in the main directory of this archive 10 - * for more details. 11 - * 12 - */ 13 - 14 - #include <linux/types.h> 15 - #include <linux/kernel.h> 16 - #include <linux/errno.h> 17 - #include <linux/interrupt.h> 18 - #include <linux/seq_file.h> 19 - 20 - #include <asm/ptrace.h> 21 - #include <asm/system.h> 22 - #include <asm/irq.h> 23 - #include <asm/traps.h> 24 - 25 - static irqreturn_t mvme147_defhand (int irq, void *dev_id, struct pt_regs *fp); 26 - 27 - /* 28 - * This should ideally be 4 elements only, for speed. 29 - */ 30 - 31 - static struct { 32 - irqreturn_t (*handler)(int, void *, struct pt_regs *); 33 - unsigned long flags; 34 - void *dev_id; 35 - const char *devname; 36 - unsigned count; 37 - } irq_tab[256]; 38 - 39 - /* 40 - * void mvme147_init_IRQ (void) 41 - * 42 - * Parameters: None 43 - * 44 - * Returns: Nothing 45 - * 46 - * This function is called during kernel startup to initialize 47 - * the mvme147 IRQ handling routines. 48 - */ 49 - 50 - void mvme147_init_IRQ (void) 51 - { 52 - int i; 53 - 54 - for (i = 0; i < 256; i++) { 55 - irq_tab[i].handler = mvme147_defhand; 56 - irq_tab[i].flags = IRQ_FLG_STD; 57 - irq_tab[i].dev_id = NULL; 58 - irq_tab[i].devname = NULL; 59 - irq_tab[i].count = 0; 60 - } 61 - } 62 - 63 - int mvme147_request_irq(unsigned int irq, 64 - irqreturn_t (*handler)(int, void *, struct pt_regs *), 65 - unsigned long flags, const char *devname, void *dev_id) 66 - { 67 - if (irq > 255) { 68 - printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); 69 - return -ENXIO; 70 - } 71 - if (!(irq_tab[irq].flags & IRQ_FLG_STD)) { 72 - if (irq_tab[irq].flags & IRQ_FLG_LOCK) { 73 - printk("%s: IRQ %d from %s is not replaceable\n", 74 - __FUNCTION__, irq, irq_tab[irq].devname); 75 - return -EBUSY; 76 - } 77 - if (flags & IRQ_FLG_REPLACE) { 78 - printk("%s: %s can't replace IRQ %d from %s\n", 79 - __FUNCTION__, devname, irq, irq_tab[irq].devname); 80 - return -EBUSY; 81 - } 82 - } 83 - irq_tab[irq].handler = handler; 84 - irq_tab[irq].flags = flags; 85 - irq_tab[irq].dev_id = dev_id; 86 - irq_tab[irq].devname = devname; 87 - return 0; 88 - } 89 - 90 - void mvme147_free_irq(unsigned int irq, void *dev_id) 91 - { 92 - if (irq > 255) { 93 - printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); 94 - return; 95 - } 96 - if (irq_tab[irq].dev_id != dev_id) 97 - printk("%s: Removing probably wrong IRQ %d from %s\n", 98 - __FUNCTION__, irq, irq_tab[irq].devname); 99 - 100 - irq_tab[irq].handler = mvme147_defhand; 101 - irq_tab[irq].flags = IRQ_FLG_STD; 102 - irq_tab[irq].dev_id = NULL; 103 - irq_tab[irq].devname = NULL; 104 - } 105 - 106 - irqreturn_t mvme147_process_int (unsigned long vec, struct pt_regs *fp) 107 - { 108 - if (vec > 255) { 109 - printk ("mvme147_process_int: Illegal vector %ld\n", vec); 110 - return IRQ_NONE; 111 - } else { 112 - irq_tab[vec].count++; 113 - irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); 114 - return IRQ_HANDLED; 115 - } 116 - } 117 - 118 - int show_mvme147_interrupts (struct seq_file *p, void *v) 119 - { 120 - int i; 121 - 122 - for (i = 0; i < 256; i++) { 123 - if (irq_tab[i].count) 124 - seq_printf(p, "Vec 0x%02x: %8d %s\n", 125 - i, irq_tab[i].count, 126 - irq_tab[i].devname ? irq_tab[i].devname : "free"); 127 - } 128 - return 0; 129 - } 130 - 131 - 132 - static irqreturn_t mvme147_defhand (int irq, void *dev_id, struct pt_regs *fp) 133 - { 134 - printk ("Unknown interrupt 0x%02x\n", irq); 135 - return IRQ_NONE; 136 - } 137 - 138 - void mvme147_enable_irq (unsigned int irq) 139 - { 140 - } 141 - 142 - 143 - void mvme147_disable_irq (unsigned int irq) 144 - { 145 - } 146 -
+1 -1
arch/m68k/mvme147/Makefile
··· 2 2 # Makefile for Linux arch/m68k/mvme147 source directory 3 3 # 4 4 5 - obj-y := config.o 147ints.o 5 + obj-y := config.o
+9 -13
arch/m68k/mvme147/config.c
··· 36 36 #include <asm/mvme147hw.h> 37 37 38 38 39 - extern irqreturn_t mvme147_process_int (int level, struct pt_regs *regs); 40 - extern void mvme147_init_IRQ (void); 41 - extern void mvme147_free_irq (unsigned int, void *); 42 - extern int show_mvme147_interrupts (struct seq_file *, void *); 43 - extern void mvme147_enable_irq (unsigned int); 44 - extern void mvme147_disable_irq (unsigned int); 45 39 static void mvme147_get_model(char *model); 46 40 static int mvme147_get_hardware_list(char *buffer); 47 - extern int mvme147_request_irq (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); 48 41 extern void mvme147_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 49 42 extern unsigned long mvme147_gettimeoffset (void); 50 43 extern int mvme147_hwclk (int, struct rtc_time *); ··· 84 91 return 0; 85 92 } 86 93 94 + /* 95 + * This function is called during kernel startup to initialize 96 + * the mvme147 IRQ handling routines. 97 + */ 98 + 99 + void mvme147_init_IRQ(void) 100 + { 101 + m68k_setup_user_interrupt(VEC_USER, 192, NULL); 102 + } 87 103 88 104 void __init config_mvme147(void) 89 105 { ··· 103 101 mach_hwclk = mvme147_hwclk; 104 102 mach_set_clock_mmss = mvme147_set_clock_mmss; 105 103 mach_reset = mvme147_reset; 106 - mach_free_irq = mvme147_free_irq; 107 - mach_process_int = mvme147_process_int; 108 - mach_get_irq_list = show_mvme147_interrupts; 109 - mach_request_irq = mvme147_request_irq; 110 - enable_irq = mvme147_enable_irq; 111 - disable_irq = mvme147_disable_irq; 112 104 mach_get_model = mvme147_get_model; 113 105 mach_get_hardware_list = mvme147_get_hardware_list; 114 106
-150
arch/m68k/mvme16x/16xints.c
··· 1 - /* 2 - * arch/m68k/mvme16x/16xints.c 3 - * 4 - * Copyright (C) 1995 Richard Hirst [richard@sleepie.demon.co.uk] 5 - * 6 - * based on amiints.c -- Amiga Linux interrupt handling code 7 - * 8 - * This file is subject to the terms and conditions of the GNU General Public 9 - * License. See the file README.legal in the main directory of this archive 10 - * for more details. 11 - * 12 - */ 13 - 14 - #include <linux/types.h> 15 - #include <linux/kernel.h> 16 - #include <linux/errno.h> 17 - #include <linux/interrupt.h> 18 - #include <linux/seq_file.h> 19 - 20 - #include <asm/system.h> 21 - #include <asm/ptrace.h> 22 - #include <asm/irq.h> 23 - 24 - static irqreturn_t mvme16x_defhand (int irq, void *dev_id, struct pt_regs *fp); 25 - 26 - /* 27 - * This should ideally be 4 elements only, for speed. 28 - */ 29 - 30 - static struct { 31 - irqreturn_t (*handler)(int, void *, struct pt_regs *); 32 - unsigned long flags; 33 - void *dev_id; 34 - const char *devname; 35 - unsigned count; 36 - } irq_tab[192]; 37 - 38 - /* 39 - * void mvme16x_init_IRQ (void) 40 - * 41 - * Parameters: None 42 - * 43 - * Returns: Nothing 44 - * 45 - * This function is called during kernel startup to initialize 46 - * the mvme16x IRQ handling routines. Should probably ensure 47 - * that the base vectors for the VMEChip2 and PCCChip2 are valid. 48 - */ 49 - 50 - void mvme16x_init_IRQ (void) 51 - { 52 - int i; 53 - 54 - for (i = 0; i < 192; i++) { 55 - irq_tab[i].handler = mvme16x_defhand; 56 - irq_tab[i].flags = IRQ_FLG_STD; 57 - irq_tab[i].dev_id = NULL; 58 - irq_tab[i].devname = NULL; 59 - irq_tab[i].count = 0; 60 - } 61 - } 62 - 63 - int mvme16x_request_irq(unsigned int irq, 64 - irqreturn_t (*handler)(int, void *, struct pt_regs *), 65 - unsigned long flags, const char *devname, void *dev_id) 66 - { 67 - if (irq < 64 || irq > 255) { 68 - printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); 69 - return -ENXIO; 70 - } 71 - 72 - if (!(irq_tab[irq-64].flags & IRQ_FLG_STD)) { 73 - if (irq_tab[irq-64].flags & IRQ_FLG_LOCK) { 74 - printk("%s: IRQ %d from %s is not replaceable\n", 75 - __FUNCTION__, irq, irq_tab[irq-64].devname); 76 - return -EBUSY; 77 - } 78 - if (flags & IRQ_FLG_REPLACE) { 79 - printk("%s: %s can't replace IRQ %d from %s\n", 80 - __FUNCTION__, devname, irq, irq_tab[irq-64].devname); 81 - return -EBUSY; 82 - } 83 - } 84 - irq_tab[irq-64].handler = handler; 85 - irq_tab[irq-64].flags = flags; 86 - irq_tab[irq-64].dev_id = dev_id; 87 - irq_tab[irq-64].devname = devname; 88 - return 0; 89 - } 90 - 91 - void mvme16x_free_irq(unsigned int irq, void *dev_id) 92 - { 93 - if (irq < 64 || irq > 255) { 94 - printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); 95 - return; 96 - } 97 - 98 - if (irq_tab[irq-64].dev_id != dev_id) 99 - printk("%s: Removing probably wrong IRQ %d from %s\n", 100 - __FUNCTION__, irq, irq_tab[irq-64].devname); 101 - 102 - irq_tab[irq-64].handler = mvme16x_defhand; 103 - irq_tab[irq-64].flags = IRQ_FLG_STD; 104 - irq_tab[irq-64].dev_id = NULL; 105 - irq_tab[irq-64].devname = NULL; 106 - } 107 - 108 - irqreturn_t mvme16x_process_int (unsigned long vec, struct pt_regs *fp) 109 - { 110 - if (vec < 64 || vec > 255) { 111 - printk ("mvme16x_process_int: Illegal vector %ld", vec); 112 - return IRQ_NONE; 113 - } else { 114 - irq_tab[vec-64].count++; 115 - irq_tab[vec-64].handler(vec, irq_tab[vec-64].dev_id, fp); 116 - return IRQ_HANDLED; 117 - } 118 - } 119 - 120 - int show_mvme16x_interrupts (struct seq_file *p, void *v) 121 - { 122 - int i; 123 - 124 - for (i = 0; i < 192; i++) { 125 - if (irq_tab[i].count) 126 - seq_printf(p, "Vec 0x%02x: %8d %s\n", 127 - i+64, irq_tab[i].count, 128 - irq_tab[i].devname ? irq_tab[i].devname : "free"); 129 - } 130 - return 0; 131 - } 132 - 133 - 134 - static irqreturn_t mvme16x_defhand (int irq, void *dev_id, struct pt_regs *fp) 135 - { 136 - printk ("Unknown interrupt 0x%02x\n", irq); 137 - return IRQ_NONE; 138 - } 139 - 140 - 141 - void mvme16x_enable_irq (unsigned int irq) 142 - { 143 - } 144 - 145 - 146 - void mvme16x_disable_irq (unsigned int irq) 147 - { 148 - } 149 - 150 -
+1 -1
arch/m68k/mvme16x/Makefile
··· 2 2 # Makefile for Linux arch/m68k/mvme16x source directory 3 3 # 4 4 5 - obj-y := config.o 16xints.o rtc.o mvme16x_ksyms.o 5 + obj-y := config.o rtc.o mvme16x_ksyms.o
+10 -13
arch/m68k/mvme16x/config.c
··· 40 40 41 41 static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE; 42 42 43 - extern irqreturn_t mvme16x_process_int (int level, struct pt_regs *regs); 44 - extern void mvme16x_init_IRQ (void); 45 - extern void mvme16x_free_irq (unsigned int, void *); 46 - extern int show_mvme16x_interrupts (struct seq_file *, void *); 47 - extern void mvme16x_enable_irq (unsigned int); 48 - extern void mvme16x_disable_irq (unsigned int); 49 43 static void mvme16x_get_model(char *model); 50 44 static int mvme16x_get_hardware_list(char *buffer); 51 - extern int mvme16x_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); 52 45 extern void mvme16x_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 53 46 extern unsigned long mvme16x_gettimeoffset (void); 54 47 extern int mvme16x_hwclk (int, struct rtc_time *); ··· 113 120 return (len); 114 121 } 115 122 123 + /* 124 + * This function is called during kernel startup to initialize 125 + * the mvme16x IRQ handling routines. Should probably ensure 126 + * that the base vectors for the VMEChip2 and PCCChip2 are valid. 127 + */ 128 + 129 + static void mvme16x_init_IRQ (void) 130 + { 131 + m68k_setup_user_interrupt(VEC_USER, 192, NULL); 132 + } 116 133 117 134 #define pcc2chip ((volatile u_char *)0xfff42000) 118 135 #define PccSCCMICR 0x1d ··· 141 138 mach_hwclk = mvme16x_hwclk; 142 139 mach_set_clock_mmss = mvme16x_set_clock_mmss; 143 140 mach_reset = mvme16x_reset; 144 - mach_free_irq = mvme16x_free_irq; 145 - mach_process_int = mvme16x_process_int; 146 - mach_get_irq_list = show_mvme16x_interrupts; 147 - mach_request_irq = mvme16x_request_irq; 148 - enable_irq = mvme16x_enable_irq; 149 - disable_irq = mvme16x_disable_irq; 150 141 mach_get_model = mvme16x_get_model; 151 142 mach_get_hardware_list = mvme16x_get_hardware_list; 152 143
+15 -15
include/asm-m68k/bvme6000hw.h
··· 109 109 110 110 #define BVME_IRQ_TYPE_PRIO 0 111 111 112 - #define BVME_IRQ_PRN 0x54 113 - #define BVME_IRQ_I596 0x1a 114 - #define BVME_IRQ_SCSI 0x1b 115 - #define BVME_IRQ_TIMER 0x59 116 - #define BVME_IRQ_RTC 0x1e 117 - #define BVME_IRQ_ABORT 0x1f 112 + #define BVME_IRQ_PRN (IRQ_USER+20) 113 + #define BVME_IRQ_TIMER (IRQ_USER+25) 114 + #define BVME_IRQ_I596 IRQ_AUTO_2 115 + #define BVME_IRQ_SCSI IRQ_AUTO_3 116 + #define BVME_IRQ_RTC IRQ_AUTO_6 117 + #define BVME_IRQ_ABORT IRQ_AUTO_7 118 118 119 119 /* SCC interrupts */ 120 - #define BVME_IRQ_SCC_BASE 0x40 121 - #define BVME_IRQ_SCCB_TX 0x40 122 - #define BVME_IRQ_SCCB_STAT 0x42 123 - #define BVME_IRQ_SCCB_RX 0x44 124 - #define BVME_IRQ_SCCB_SPCOND 0x46 125 - #define BVME_IRQ_SCCA_TX 0x48 126 - #define BVME_IRQ_SCCA_STAT 0x4a 127 - #define BVME_IRQ_SCCA_RX 0x4c 128 - #define BVME_IRQ_SCCA_SPCOND 0x4e 120 + #define BVME_IRQ_SCC_BASE IRQ_USER 121 + #define BVME_IRQ_SCCB_TX IRQ_USER 122 + #define BVME_IRQ_SCCB_STAT (IRQ_USER+2) 123 + #define BVME_IRQ_SCCB_RX (IRQ_USER+4) 124 + #define BVME_IRQ_SCCB_SPCOND (IRQ_USER+6) 125 + #define BVME_IRQ_SCCA_TX (IRQ_USER+8) 126 + #define BVME_IRQ_SCCA_STAT (IRQ_USER+10) 127 + #define BVME_IRQ_SCCA_RX (IRQ_USER+12) 128 + #define BVME_IRQ_SCCA_SPCOND (IRQ_USER+14) 129 129 130 130 /* Address control registers */ 131 131
+23 -21
include/asm-m68k/mvme147hw.h
··· 1 1 #ifndef _MVME147HW_H_ 2 2 #define _MVME147HW_H_ 3 3 4 + #include <asm/irq.h> 5 + 4 6 typedef struct { 5 7 unsigned char 6 8 ctrl, ··· 74 72 #define PCC_LEVEL_SCSI_PORT 0x04 75 73 #define PCC_LEVEL_SCSI_DMA 0x04 76 74 77 - #define PCC_IRQ_AC_FAIL 0x40 78 - #define PCC_IRQ_BERR 0x41 79 - #define PCC_IRQ_ABORT 0x42 80 - /* #define PCC_IRQ_SERIAL 0x43 */ 81 - #define PCC_IRQ_PRINTER 0x47 82 - #define PCC_IRQ_TIMER1 0x48 83 - #define PCC_IRQ_TIMER2 0x49 84 - #define PCC_IRQ_SOFTWARE1 0x4a 85 - #define PCC_IRQ_SOFTWARE2 0x4b 75 + #define PCC_IRQ_AC_FAIL (IRQ_USER+0) 76 + #define PCC_IRQ_BERR (IRQ_USER+1) 77 + #define PCC_IRQ_ABORT (IRQ_USER+2) 78 + /* #define PCC_IRQ_SERIAL (IRQ_USER+3) */ 79 + #define PCC_IRQ_PRINTER (IRQ_USER+7) 80 + #define PCC_IRQ_TIMER1 (IRQ_USER+8) 81 + #define PCC_IRQ_TIMER2 (IRQ_USER+9) 82 + #define PCC_IRQ_SOFTWARE1 (IRQ_USER+10) 83 + #define PCC_IRQ_SOFTWARE2 (IRQ_USER+11) 86 84 87 85 88 86 #define M147_SCC_A_ADDR 0xfffe3002 89 87 #define M147_SCC_B_ADDR 0xfffe3000 90 88 #define M147_SCC_PCLK 5000000 91 89 92 - #define MVME147_IRQ_SCSI_PORT 0x45 93 - #define MVME147_IRQ_SCSI_DMA 0x46 90 + #define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45) 91 + #define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46) 94 92 95 93 /* SCC interrupts, for MVME147 */ 96 94 97 95 #define MVME147_IRQ_TYPE_PRIO 0 98 - #define MVME147_IRQ_SCC_BASE 0x60 99 - #define MVME147_IRQ_SCCB_TX 0x60 100 - #define MVME147_IRQ_SCCB_STAT 0x62 101 - #define MVME147_IRQ_SCCB_RX 0x64 102 - #define MVME147_IRQ_SCCB_SPCOND 0x66 103 - #define MVME147_IRQ_SCCA_TX 0x68 104 - #define MVME147_IRQ_SCCA_STAT 0x6a 105 - #define MVME147_IRQ_SCCA_RX 0x6c 106 - #define MVME147_IRQ_SCCA_SPCOND 0x6e 96 + #define MVME147_IRQ_SCC_BASE (IRQ_USER+32) 97 + #define MVME147_IRQ_SCCB_TX (IRQ_USER+32) 98 + #define MVME147_IRQ_SCCB_STAT (IRQ_USER+34) 99 + #define MVME147_IRQ_SCCB_RX (IRQ_USER+36) 100 + #define MVME147_IRQ_SCCB_SPCOND (IRQ_USER+38) 101 + #define MVME147_IRQ_SCCA_TX (IRQ_USER+40) 102 + #define MVME147_IRQ_SCCA_STAT (IRQ_USER+42) 103 + #define MVME147_IRQ_SCCA_RX (IRQ_USER+44) 104 + #define MVME147_IRQ_SCCA_SPCOND (IRQ_USER+46) 107 105 108 106 #define MVME147_LANCE_BASE 0xfffe1800 109 - #define MVME147_LANCE_IRQ 0x44 107 + #define MVME147_LANCE_IRQ (IRQ_USER+4) 110 108 111 109 #define ETHERNET_ADDRESS 0xfffe0778 112 110
+20 -20
include/asm-m68k/mvme16xhw.h
··· 66 66 67 67 #define MVME162_IRQ_TYPE_PRIO 0 68 68 69 - #define MVME167_IRQ_PRN 0x54 70 - #define MVME16x_IRQ_I596 0x57 71 - #define MVME16x_IRQ_SCSI 0x55 72 - #define MVME16x_IRQ_FLY 0x7f 73 - #define MVME167_IRQ_SER_ERR 0x5c 74 - #define MVME167_IRQ_SER_MODEM 0x5d 75 - #define MVME167_IRQ_SER_TX 0x5e 76 - #define MVME167_IRQ_SER_RX 0x5f 77 - #define MVME16x_IRQ_TIMER 0x59 78 - #define MVME167_IRQ_ABORT 0x6e 79 - #define MVME162_IRQ_ABORT 0x5e 69 + #define MVME167_IRQ_PRN (IRQ_USER+20) 70 + #define MVME16x_IRQ_I596 (IRQ_USER+23) 71 + #define MVME16x_IRQ_SCSI (IRQ_USER+21) 72 + #define MVME16x_IRQ_FLY (IRQ_USER+63) 73 + #define MVME167_IRQ_SER_ERR (IRQ_USER+28) 74 + #define MVME167_IRQ_SER_MODEM (IRQ_USER+29) 75 + #define MVME167_IRQ_SER_TX (IRQ_USER+30) 76 + #define MVME167_IRQ_SER_RX (IRQ_USER+31) 77 + #define MVME16x_IRQ_TIMER (IRQ_USER+25) 78 + #define MVME167_IRQ_ABORT (IRQ_USER+46) 79 + #define MVME162_IRQ_ABORT (IRQ_USER+30) 80 80 81 81 /* SCC interrupts, for MVME162 */ 82 - #define MVME162_IRQ_SCC_BASE 0x40 83 - #define MVME162_IRQ_SCCB_TX 0x40 84 - #define MVME162_IRQ_SCCB_STAT 0x42 85 - #define MVME162_IRQ_SCCB_RX 0x44 86 - #define MVME162_IRQ_SCCB_SPCOND 0x46 87 - #define MVME162_IRQ_SCCA_TX 0x48 88 - #define MVME162_IRQ_SCCA_STAT 0x4a 89 - #define MVME162_IRQ_SCCA_RX 0x4c 90 - #define MVME162_IRQ_SCCA_SPCOND 0x4e 82 + #define MVME162_IRQ_SCC_BASE (IRQ_USER+0) 83 + #define MVME162_IRQ_SCCB_TX (IRQ_USER+0) 84 + #define MVME162_IRQ_SCCB_STAT (IRQ_USER+2) 85 + #define MVME162_IRQ_SCCB_RX (IRQ_USER+4) 86 + #define MVME162_IRQ_SCCB_SPCOND (IRQ_USER+6) 87 + #define MVME162_IRQ_SCCA_TX (IRQ_USER+8) 88 + #define MVME162_IRQ_SCCA_STAT (IRQ_USER+10) 89 + #define MVME162_IRQ_SCCA_RX (IRQ_USER+12) 90 + #define MVME162_IRQ_SCCA_SPCOND (IRQ_USER+14) 91 91 92 92 /* MVME162 version register */ 93 93