Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (37 commits)
um: Use generic irq Kconfig
tile: Use generic irq Kconfig
sparc: Use generic irq Kconfig
score: Use generic irq Kconfig
powerpc: Use generic irq Kconfig
parisc: Use generic irq Kconfig
mn10300: Use generic irq Kconfig
microblaze: Use generic irq Kconfig
m68knommu: Use generic irq Kconfig
ia64: Use generic irq Kconfig
frv: Use generic irq Kconfig
blackfin: Use generic irq Kconfig
alpha: Use generic irq Kconfig
genirq: Remove __do_IRQ
m32r: Convert to generic irq Kconfig
m32r: Convert usrv platform irq handling
m32r: Convert opsput_lcdpld irq chip
m32r: Convert opsput lanpld irq chip
m32r: Convert opsput pld irq chip
m32r: Convert opsput irq chip
...

+430 -1050
-8
Documentation/feature-removal-schedule.txt
··· 357 358 ----------------------------- 359 360 - What: __do_IRQ all in one fits nothing interrupt handler 361 - When: 2.6.32 362 - Why: __do_IRQ was kept for easy migration to the type flow handlers. 363 - More than two years of migration time is enough. 364 - Who: Thomas Gleixner <tglx@linutronix.de> 365 - 366 - ----------------------------- 367 - 368 What: fakephp and associated sysfs files in /sys/bus/pci/slots/ 369 When: 2011 370 Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
··· 357 358 ----------------------------- 359 360 What: fakephp and associated sysfs files in /sys/bus/pci/slots/ 361 When: 2011 362 Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
+3 -16
arch/alpha/Kconfig
··· 8 select HAVE_IRQ_WORK 9 select HAVE_PERF_EVENTS 10 select HAVE_DMA_ATTRS 11 help 12 The Alpha is a 64-bit general-purpose processor designed and 13 marketed by the Digital Equipment Corporation of blessed memory, ··· 70 config GENERIC_IOMAP 71 bool 72 default n 73 - 74 - config GENERIC_HARDIRQS_NO__DO_IRQ 75 - def_bool y 76 - 77 - config GENERIC_HARDIRQS 78 - bool 79 - default y 80 - 81 - config GENERIC_IRQ_PROBE 82 - bool 83 - default y 84 - 85 - config AUTO_IRQ_AFFINITY 86 - bool 87 - depends on SMP 88 - default y 89 90 source "init/Kconfig" 91 source "kernel/Kconfig.freezer"
··· 8 select HAVE_IRQ_WORK 9 select HAVE_PERF_EVENTS 10 select HAVE_DMA_ATTRS 11 + select HAVE_GENERIC_HARDIRQS 12 + select GENERIC_IRQ_PROBE 13 + select AUTO_IRQ_AFFINITY if SMP 14 help 15 The Alpha is a 64-bit general-purpose processor designed and 16 marketed by the Digital Equipment Corporation of blessed memory, ··· 67 config GENERIC_IOMAP 68 bool 69 default n 70 71 source "init/Kconfig" 72 source "kernel/Kconfig.freezer"
+3 -14
arch/blackfin/Kconfig
··· 30 select HAVE_KERNEL_LZO if RAMKERNEL 31 select HAVE_OPROFILE 32 select ARCH_WANT_OPTIONAL_GPIOLIB 33 34 config GENERIC_CSUM 35 def_bool y ··· 45 def_bool y 46 47 config GENERIC_FIND_NEXT_BIT 48 - def_bool y 49 - 50 - config GENERIC_HARDIRQS 51 - def_bool y 52 - 53 - config GENERIC_IRQ_PROBE 54 - def_bool y 55 - 56 - config GENERIC_HARDIRQS_NO__DO_IRQ 57 def_bool y 58 59 config GENERIC_GPIO ··· 246 config HOTPLUG_CPU 247 bool "Support for hot-pluggable CPUs" 248 depends on SMP && HOTPLUG 249 - default y 250 - 251 - config IRQ_PER_CPU 252 - bool 253 - depends on SMP 254 default y 255 256 config HAVE_LEGACY_PER_CPU_AREA
··· 30 select HAVE_KERNEL_LZO if RAMKERNEL 31 select HAVE_OPROFILE 32 select ARCH_WANT_OPTIONAL_GPIOLIB 33 + select HAVE_GENERIC_HARDIRQS 34 + select GENERIC_IRQ_PROBE 35 + select IRQ_PER_CPU if SMP 36 37 config GENERIC_CSUM 38 def_bool y ··· 42 def_bool y 43 44 config GENERIC_FIND_NEXT_BIT 45 def_bool y 46 47 config GENERIC_GPIO ··· 252 config HOTPLUG_CPU 253 bool "Support for hot-pluggable CPUs" 254 depends on SMP && HOTPLUG 255 default y 256 257 config HAVE_LEGACY_PER_CPU_AREA
+2 -4
arch/cris/Kconfig
··· 54 bool 55 default y 56 select HAVE_IDE 57 58 config HZ 59 int ··· 68 menu "General setup" 69 70 source "fs/Kconfig.binfmt" 71 - 72 - config GENERIC_HARDIRQS 73 - bool 74 - default y 75 76 config ETRAX_CMDLINE 77 string "Kernel command line"
··· 54 bool 55 default y 56 select HAVE_IDE 57 + select HAVE_GENERIC_HARDIRQS 58 + select GENERIC_HARDIRQS_NO_DEPRECATED 59 60 config HZ 61 int ··· 66 menu "General setup" 67 68 source "fs/Kconfig.binfmt" 69 70 config ETRAX_CMDLINE 71 string "Kernel command line"
+10 -31
arch/cris/arch-v10/kernel/irq.c
··· 104 IRQ31_interrupt 105 }; 106 107 - static void enable_crisv10_irq(unsigned int irq); 108 - 109 - static unsigned int startup_crisv10_irq(unsigned int irq) 110 { 111 - enable_crisv10_irq(irq); 112 - return 0; 113 } 114 115 - #define shutdown_crisv10_irq disable_crisv10_irq 116 - 117 - static void enable_crisv10_irq(unsigned int irq) 118 { 119 - crisv10_unmask_irq(irq); 120 - } 121 - 122 - static void disable_crisv10_irq(unsigned int irq) 123 - { 124 - crisv10_mask_irq(irq); 125 - } 126 - 127 - static void ack_crisv10_irq(unsigned int irq) 128 - { 129 - } 130 - 131 - static void end_crisv10_irq(unsigned int irq) 132 - { 133 } 134 135 static struct irq_chip crisv10_irq_type = { 136 - .name = "CRISv10", 137 - .startup = startup_crisv10_irq, 138 - .shutdown = shutdown_crisv10_irq, 139 - .enable = enable_crisv10_irq, 140 - .disable = disable_crisv10_irq, 141 - .ack = ack_crisv10_irq, 142 - .end = end_crisv10_irq, 143 - .set_affinity = NULL 144 }; 145 146 void weird_irq(void); ··· 199 200 /* Initialize IRQ handler descriptors. */ 201 for(i = 2; i < NR_IRQS; i++) { 202 - irq_desc[i].chip = &crisv10_irq_type; 203 set_int_vector(i, interrupt[i]); 204 } 205
··· 104 IRQ31_interrupt 105 }; 106 107 + static void enable_crisv10_irq(struct irq_data *data) 108 { 109 + crisv10_unmask_irq(data->irq); 110 } 111 112 + static void disable_crisv10_irq(struct irq_data *data) 113 { 114 + crisv10_mask_irq(data->irq); 115 } 116 117 static struct irq_chip crisv10_irq_type = { 118 + .name = "CRISv10", 119 + .irq_shutdown = disable_crisv10_irq, 120 + .irq_enable = enable_crisv10_irq, 121 + .irq_disable = disable_crisv10_irq, 122 }; 123 124 void weird_irq(void); ··· 221 222 /* Initialize IRQ handler descriptors. */ 223 for(i = 2; i < NR_IRQS; i++) { 224 + set_irq_desc_and_handler(i, &crisv10_irq_type, 225 + handle_simple_irq); 226 set_int_vector(i, interrupt[i]); 227 } 228
+16 -36
arch/cris/arch-v32/kernel/irq.c
··· 291 } 292 293 294 - static unsigned int startup_crisv32_irq(unsigned int irq) 295 { 296 - crisv32_unmask_irq(irq); 297 - return 0; 298 } 299 300 - static void shutdown_crisv32_irq(unsigned int irq) 301 { 302 - crisv32_mask_irq(irq); 303 } 304 305 - static void enable_crisv32_irq(unsigned int irq) 306 - { 307 - crisv32_unmask_irq(irq); 308 - } 309 - 310 - static void disable_crisv32_irq(unsigned int irq) 311 - { 312 - crisv32_mask_irq(irq); 313 - } 314 - 315 - static void ack_crisv32_irq(unsigned int irq) 316 - { 317 - } 318 - 319 - static void end_crisv32_irq(unsigned int irq) 320 - { 321 - } 322 - 323 - int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest) 324 { 325 unsigned long flags; 326 - spin_lock_irqsave(&irq_lock, flags); 327 - irq_allocations[irq - FIRST_IRQ].mask = *dest; 328 - spin_unlock_irqrestore(&irq_lock, flags); 329 330 return 0; 331 } 332 333 static struct irq_chip crisv32_irq_type = { 334 - .name = "CRISv32", 335 - .startup = startup_crisv32_irq, 336 - .shutdown = shutdown_crisv32_irq, 337 - .enable = enable_crisv32_irq, 338 - .disable = disable_crisv32_irq, 339 - .ack = ack_crisv32_irq, 340 - .end = end_crisv32_irq, 341 - .set_affinity = set_affinity_crisv32_irq 342 }; 343 344 void ··· 451 452 /* Point all IRQ's to bad handlers. */ 453 for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { 454 - irq_desc[j].chip = &crisv32_irq_type; 455 set_exception_vector(i, interrupt[j]); 456 } 457
··· 291 } 292 293 294 + static void enable_crisv32_irq(struct irq_data *data) 295 { 296 + crisv32_unmask_irq(data->irq); 297 } 298 299 + static void disable_crisv32_irq(struct irq_data *data) 300 { 301 + crisv32_mask_irq(data->irq); 302 } 303 304 + static int set_affinity_crisv32_irq(struct irq_data *data, 305 + const struct cpumask *dest, bool force) 306 { 307 unsigned long flags; 308 309 + spin_lock_irqsave(&irq_lock, flags); 310 + irq_allocations[data->irq - FIRST_IRQ].mask = *dest; 311 + spin_unlock_irqrestore(&irq_lock, flags); 312 return 0; 313 } 314 315 static struct irq_chip crisv32_irq_type = { 316 + .name = "CRISv32", 317 + .irq_shutdown = disable_crisv32_irq, 318 + .irq_enable = enable_crisv32_irq, 319 + .irq_disable = disable_crisv32_irq, 320 + .irq_set_affinity = set_affinity_crisv32_irq, 321 }; 322 323 void ··· 472 473 /* Point all IRQ's to bad handlers. */ 474 for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { 475 + set_irq_chip_and_handler(j, &crisv32_irq_type, 476 + handle_simple_irq); 477 set_exception_vector(i, interrupt[j]); 478 } 479
+3 -3
arch/cris/kernel/irq.c
··· 62 for_each_online_cpu(j) 63 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 64 #endif 65 - seq_printf(p, " %14s", irq_desc[i].chip->name); 66 seq_printf(p, " %s", action->name); 67 68 for (action=action->next; action; action = action->next) ··· 93 printk("do_IRQ: stack overflow: %lX\n", sp); 94 show_stack(NULL, (unsigned long *)sp); 95 } 96 - __do_IRQ(irq); 97 - irq_exit(); 98 set_irq_regs(old_regs); 99 } 100
··· 62 for_each_online_cpu(j) 63 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 64 #endif 65 + seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); 66 seq_printf(p, " %s", action->name); 67 68 for (action=action->next; action; action = action->next) ··· 93 printk("do_IRQ: stack overflow: %lX\n", sp); 94 show_stack(NULL, (unsigned long *)sp); 95 } 96 + generic_handle_irq(irq); 97 + irq_exit(); 98 set_irq_regs(old_regs); 99 } 100
+1 -8
arch/frv/Kconfig
··· 5 select HAVE_ARCH_TRACEHOOK 6 select HAVE_IRQ_WORK 7 select HAVE_PERF_EVENTS 8 9 config ZONE_DMA 10 bool ··· 29 config GENERIC_CALIBRATE_DELAY 30 bool 31 default n 32 - 33 - config GENERIC_HARDIRQS 34 - bool 35 - default y 36 - 37 - config GENERIC_HARDIRQS_NO__DO_IRQ 38 - bool 39 - default y 40 41 config TIME_LOW_RES 42 bool
··· 5 select HAVE_ARCH_TRACEHOOK 6 select HAVE_IRQ_WORK 7 select HAVE_PERF_EVENTS 8 + select HAVE_GENERIC_HARDIRQS 9 10 config ZONE_DMA 11 bool ··· 28 config GENERIC_CALIBRATE_DELAY 29 bool 30 default n 31 32 config TIME_LOW_RES 33 bool
+2 -4
arch/h8300/Kconfig
··· 2 bool 3 default y 4 select HAVE_IDE 5 6 config SYMBOL_PREFIX 7 string ··· 46 default y 47 48 config GENERIC_HWEIGHT 49 - bool 50 - default y 51 - 52 - config GENERIC_HARDIRQS 53 bool 54 default y 55
··· 2 bool 3 default y 4 select HAVE_IDE 5 + select HAVE_GENERIC_HARDIRQS 6 + select GENERIC_HARDIRQS_NO_DEPRECATED 7 8 config SYMBOL_PREFIX 9 string ··· 44 default y 45 46 config GENERIC_HWEIGHT 47 bool 48 default y 49
+20 -30
arch/h8300/kernel/irq.c
··· 38 return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); 39 } 40 41 - static void h8300_enable_irq(unsigned int irq) 42 { 43 - if (is_ext_irq(irq)) 44 - IER_REGS |= 1 << (irq - EXT_IRQ0); 45 } 46 47 - static void h8300_disable_irq(unsigned int irq) 48 { 49 - if (is_ext_irq(irq)) 50 - IER_REGS &= ~(1 << (irq - EXT_IRQ0)); 51 } 52 53 - static void h8300_end_irq(unsigned int irq) 54 { 55 - } 56 - 57 - static unsigned int h8300_startup_irq(unsigned int irq) 58 - { 59 - if (is_ext_irq(irq)) 60 - return h8300_enable_irq_pin(irq); 61 else 62 return 0; 63 } 64 65 - static void h8300_shutdown_irq(unsigned int irq) 66 { 67 - if (is_ext_irq(irq)) 68 - h8300_disable_irq_pin(irq); 69 } 70 71 /* ··· 69 */ 70 struct irq_chip h8300irq_chip = { 71 .name = "H8300-INTC", 72 - .startup = h8300_startup_irq, 73 - .shutdown = h8300_shutdown_irq, 74 - .enable = h8300_enable_irq, 75 - .disable = h8300_disable_irq, 76 - .ack = NULL, 77 - .end = h8300_end_irq, 78 }; 79 80 #if defined(CONFIG_RAMKERNEL) ··· 154 155 setup_vector(); 156 157 - for (c = 0; c < NR_IRQS; c++) { 158 - irq_desc[c].status = IRQ_DISABLED; 159 - irq_desc[c].action = NULL; 160 - irq_desc[c].depth = 1; 161 - irq_desc[c].chip = &h8300irq_chip; 162 - } 163 } 164 165 asmlinkage void do_IRQ(int irq) 166 { 167 irq_enter(); 168 - __do_IRQ(irq); 169 irq_exit(); 170 } 171 ··· 182 goto unlock; 183 seq_printf(p, "%3d: ",i); 184 seq_printf(p, "%10u ", kstat_irqs(i)); 185 - seq_printf(p, " %14s", irq_desc[i].chip->name); 186 seq_printf(p, "-%-8s", irq_desc[i].name); 187 seq_printf(p, " %s", action->name); 188
··· 38 return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); 39 } 40 41 + static void h8300_enable_irq(struct irq_data *data) 42 { 43 + if (is_ext_irq(data->irq)) 44 + IER_REGS |= 1 << (data->irq - EXT_IRQ0); 45 } 46 47 + static void h8300_disable_irq(struct irq_data *data) 48 { 49 + if (is_ext_irq(data->irq)) 50 + IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); 51 } 52 53 + static unsigned int h8300_startup_irq(struct irq_data *data) 54 { 55 + if (is_ext_irq(data->irq)) 56 + return h8300_enable_irq_pin(data->irq); 57 else 58 return 0; 59 } 60 61 + static void h8300_shutdown_irq(struct irq_data *data) 62 { 63 + if (is_ext_irq(data->irq)) 64 + h8300_disable_irq_pin(data->irq); 65 } 66 67 /* ··· 73 */ 74 struct irq_chip h8300irq_chip = { 75 .name = "H8300-INTC", 76 + .irq_startup = h8300_startup_irq, 77 + .irq_shutdown = h8300_shutdown_irq, 78 + .irq_enable = h8300_enable_irq, 79 + .irq_disable = h8300_disable_irq, 80 }; 81 82 #if defined(CONFIG_RAMKERNEL) ··· 160 161 setup_vector(); 162 163 + for (c = 0; c < NR_IRQS; c++) 164 + set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); 165 } 166 167 asmlinkage void do_IRQ(int irq) 168 { 169 irq_enter(); 170 + generic_handle_irq(irq); 171 irq_exit(); 172 } 173 ··· 192 goto unlock; 193 seq_printf(p, "%3d: ",i); 194 seq_printf(p, "%10u ", kstat_irqs(i)); 195 + seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); 196 seq_printf(p, "-%-8s", irq_desc[i].name); 197 seq_printf(p, " %s", action->name); 198
+4 -22
arch/ia64/Kconfig
··· 22 select HAVE_KVM 23 select HAVE_ARCH_TRACEHOOK 24 select HAVE_DMA_API_DEBUG 25 default y 26 help 27 The Itanium Processor Family is Intel's 64-bit successor to ··· 681 source "arch/ia64/kvm/Kconfig" 682 683 source "lib/Kconfig" 684 - 685 - # 686 - # Use the generic interrupt handling code in kernel/irq/: 687 - # 688 - config GENERIC_HARDIRQS 689 - def_bool y 690 - 691 - config GENERIC_HARDIRQS_NO__DO_IRQ 692 - def_bool y 693 - 694 - config GENERIC_IRQ_PROBE 695 - bool 696 - default y 697 - 698 - config GENERIC_PENDING_IRQ 699 - bool 700 - depends on GENERIC_HARDIRQS && SMP 701 - default y 702 - 703 - config IRQ_PER_CPU 704 - bool 705 - default y 706 707 config IOMMU_HELPER 708 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
··· 22 select HAVE_KVM 23 select HAVE_ARCH_TRACEHOOK 24 select HAVE_DMA_API_DEBUG 25 + select HAVE_GENERIC_HARDIRQS 26 + select GENERIC_IRQ_PROBE 27 + select GENERIC_PENDING_IRQ if SMP 28 + select IRQ_PER_CPU 29 default y 30 help 31 The Itanium Processor Family is Intel's 64-bit successor to ··· 677 source "arch/ia64/kvm/Kconfig" 678 679 source "lib/Kconfig" 680 681 config IOMMU_HELPER 682 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
+3 -8
arch/m32r/Kconfig
··· 7 select HAVE_KERNEL_GZIP 8 select HAVE_KERNEL_BZIP2 9 select HAVE_KERNEL_LZMA 10 11 config SBUS 12 bool ··· 19 default y 20 21 config ZONE_DMA 22 - bool 23 - default y 24 - 25 - config GENERIC_HARDIRQS 26 - bool 27 - default y 28 - 29 - config GENERIC_IRQ_PROBE 30 bool 31 default y 32
··· 7 select HAVE_KERNEL_GZIP 8 select HAVE_KERNEL_BZIP2 9 select HAVE_KERNEL_LZMA 10 + select HAVE_GENERIC_HARDIRQS 11 + select GENERIC_HARDIRQS_NO_DEPRECATED 12 + select GENERIC_IRQ_PROBE 13 14 config SBUS 15 bool ··· 16 default y 17 18 config ZONE_DMA 19 bool 20 default y 21
+6 -4
arch/m32r/kernel/irq.c
··· 40 } 41 42 if (i < NR_IRQS) { 43 - raw_spin_lock_irqsave(&irq_desc[i].lock, flags); 44 - action = irq_desc[i].action; 45 if (!action) 46 goto skip; 47 seq_printf(p, "%3d: ",i); ··· 53 for_each_online_cpu(j) 54 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 55 #endif 56 - seq_printf(p, " %14s", irq_desc[i].chip->name); 57 seq_printf(p, " %s", action->name); 58 59 for (action=action->next; action; action = action->next) ··· 61 62 seq_putc(p, '\n'); 63 skip: 64 - raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); 65 } 66 return 0; 67 }
··· 40 } 41 42 if (i < NR_IRQS) { 43 + struct irq_desc *desc = irq_to_desc(i); 44 + 45 + raw_spin_lock_irqsave(&desc->lock, flags); 46 + action = desc->action; 47 if (!action) 48 goto skip; 49 seq_printf(p, "%3d: ",i); ··· 51 for_each_online_cpu(j) 52 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 53 #endif 54 + seq_printf(p, " %14s", desc->irq_data.chip->name); 55 seq_printf(p, " %s", action->name); 56 57 for (action=action->next; action; action = action->next) ··· 59 60 seq_putc(p, '\n'); 61 skip: 62 + raw_spin_unlock_irqrestore(&desc->lock, flags); 63 } 64 return 0; 65 }
+21 -37
arch/m32r/platforms/m32104ut/setup.c
··· 39 outl(data, port); 40 } 41 42 - static void mask_and_ack_m32104ut(unsigned int irq) 43 { 44 - disable_m32104ut_irq(irq); 45 } 46 47 - static void end_m32104ut_irq(unsigned int irq) 48 { 49 - enable_m32104ut_irq(irq); 50 } 51 52 - static unsigned int startup_m32104ut_irq(unsigned int irq) 53 { 54 - enable_m32104ut_irq(irq); 55 - return (0); 56 - } 57 58 - static void shutdown_m32104ut_irq(unsigned int irq) 59 - { 60 - unsigned long port; 61 - 62 - port = irq2port(irq); 63 outl(M32R_ICUCR_ILEVEL7, port); 64 } 65 66 static struct irq_chip m32104ut_irq_type = 67 { 68 - .name = "M32104UT-IRQ", 69 - .startup = startup_m32104ut_irq, 70 - .shutdown = shutdown_m32104ut_irq, 71 - .enable = enable_m32104ut_irq, 72 - .disable = disable_m32104ut_irq, 73 - .ack = mask_and_ack_m32104ut, 74 - .end = end_m32104ut_irq 75 }; 76 77 void __init init_IRQ(void) ··· 76 77 #if defined(CONFIG_SMC91X) 78 /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ 79 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 80 - irq_desc[M32R_IRQ_INT0].chip = &m32104ut_irq_type; 81 - irq_desc[M32R_IRQ_INT0].action = 0; 82 - irq_desc[M32R_IRQ_INT0].depth = 1; 83 - icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */ 84 disable_m32104ut_irq(M32R_IRQ_INT0); 85 #endif /* CONFIG_SMC91X */ 86 87 /* MFT2 : system timer */ 88 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_MFT2].chip = &m32104ut_irq_type; 90 - irq_desc[M32R_IRQ_MFT2].action = 0; 91 - irq_desc[M32R_IRQ_MFT2].depth = 1; 92 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 93 disable_m32104ut_irq(M32R_IRQ_MFT2); 94 95 #ifdef CONFIG_SERIAL_M32R_SIO 96 /* SIO0_R : uart receive data */ 97 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_SIO0_R].chip = &m32104ut_irq_type; 99 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 100 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 101 icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; 102 disable_m32104ut_irq(M32R_IRQ_SIO0_R); 103 104 /* SIO0_S : uart send data */ 105 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 106 - irq_desc[M32R_IRQ_SIO0_S].chip = &m32104ut_irq_type; 107 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 108 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 109 icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; 110 disable_m32104ut_irq(M32R_IRQ_SIO0_S); 111 #endif /* CONFIG_SERIAL_M32R_SIO */
··· 39 outl(data, port); 40 } 41 42 + static void mask_m32104ut_irq(struct irq_data *data) 43 { 44 + disable_m32104ut_irq(data->irq); 45 } 46 47 + static void unmask_m32104ut_irq(struct irq_data *data) 48 { 49 + enable_m32104ut_irq(data->irq); 50 } 51 52 + static void shutdown_m32104ut_irq(struct irq_data *data) 53 { 54 + unsigned int irq = data->irq; 55 + unsigned long port = irq2port(irq); 56 57 outl(M32R_ICUCR_ILEVEL7, port); 58 } 59 60 static struct irq_chip m32104ut_irq_type = 61 { 62 + .name = "M32104UT-IRQ", 63 + .irq_shutdown = shutdown_m32104ut_irq, 64 + .irq_unmask = unmask_m32104ut_irq, 65 + .irq_mask = mask_m32104ut_irq, 66 }; 67 68 void __init init_IRQ(void) ··· 85 86 #if defined(CONFIG_SMC91X) 87 /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ 88 + set_irq_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type, 89 + handle_level_irq); 90 + /* "H" level sense */ 91 + cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; 92 disable_m32104ut_irq(M32R_IRQ_INT0); 93 #endif /* CONFIG_SMC91X */ 94 95 /* MFT2 : system timer */ 96 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type, 97 + handle_level_irq); 98 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 99 disable_m32104ut_irq(M32R_IRQ_MFT2); 100 101 #ifdef CONFIG_SERIAL_M32R_SIO 102 /* SIO0_R : uart receive data */ 103 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type, 104 + handle_level_irq); 105 icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; 106 disable_m32104ut_irq(M32R_IRQ_SIO0_R); 107 108 /* SIO0_S : uart send data */ 109 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type, 110 + handle_level_irq); 111 icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; 112 disable_m32104ut_irq(M32R_IRQ_SIO0_S); 113 #endif /* CONFIG_SERIAL_M32R_SIO */
+73 -141
arch/m32r/platforms/m32700ut/setup.c
··· 45 outl(data, port); 46 } 47 48 - static void mask_and_ack_m32700ut(unsigned int irq) 49 { 50 - disable_m32700ut_irq(irq); 51 } 52 53 - static void end_m32700ut_irq(unsigned int irq) 54 { 55 - enable_m32700ut_irq(irq); 56 } 57 58 - static unsigned int startup_m32700ut_irq(unsigned int irq) 59 - { 60 - enable_m32700ut_irq(irq); 61 - return (0); 62 - } 63 - 64 - static void shutdown_m32700ut_irq(unsigned int irq) 65 { 66 unsigned long port; 67 68 - port = irq2port(irq); 69 outl(M32R_ICUCR_ILEVEL7, port); 70 } 71 72 static struct irq_chip m32700ut_irq_type = 73 { 74 - .name = "M32700UT-IRQ", 75 - .startup = startup_m32700ut_irq, 76 - .shutdown = shutdown_m32700ut_irq, 77 - .enable = enable_m32700ut_irq, 78 - .disable = disable_m32700ut_irq, 79 - .ack = mask_and_ack_m32700ut, 80 - .end = end_m32700ut_irq 81 }; 82 83 /* ··· 90 unsigned int pldirq; 91 92 pldirq = irq2pldirq(irq); 93 - // disable_m32700ut_irq(M32R_IRQ_INT1); 94 port = pldirq2port(pldirq); 95 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 96 outw(data, port); ··· 101 unsigned int pldirq; 102 103 pldirq = irq2pldirq(irq); 104 - // enable_m32700ut_irq(M32R_IRQ_INT1); 105 port = pldirq2port(pldirq); 106 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 107 outw(data, port); 108 } 109 110 - static void mask_and_ack_m32700ut_pld(unsigned int irq) 111 { 112 - disable_m32700ut_pld_irq(irq); 113 - // mask_and_ack_m32700ut(M32R_IRQ_INT1); 114 } 115 116 - static void end_m32700ut_pld_irq(unsigned int irq) 117 { 118 - enable_m32700ut_pld_irq(irq); 119 - end_m32700ut_irq(M32R_IRQ_INT1); 120 } 121 122 - static unsigned int startup_m32700ut_pld_irq(unsigned int irq) 123 - { 124 - enable_m32700ut_pld_irq(irq); 125 - return (0); 126 - } 127 - 128 - static void shutdown_m32700ut_pld_irq(unsigned int irq) 129 { 130 unsigned long port; 131 unsigned int pldirq; 132 133 - pldirq = irq2pldirq(irq); 134 - // shutdown_m32700ut_irq(M32R_IRQ_INT1); 135 port = pldirq2port(pldirq); 136 outw(PLD_ICUCR_ILEVEL7, port); 137 } 138 139 static struct irq_chip m32700ut_pld_irq_type = 140 { 141 - .name = "M32700UT-PLD-IRQ", 142 - .startup = startup_m32700ut_pld_irq, 143 - .shutdown = shutdown_m32700ut_pld_irq, 144 - .enable = enable_m32700ut_pld_irq, 145 - .disable = disable_m32700ut_pld_irq, 146 - .ack = mask_and_ack_m32700ut_pld, 147 - .end = end_m32700ut_pld_irq 148 }; 149 150 /* ··· 166 outw(data, port); 167 } 168 169 - static void mask_and_ack_m32700ut_lanpld(unsigned int irq) 170 { 171 - disable_m32700ut_lanpld_irq(irq); 172 } 173 174 - static void end_m32700ut_lanpld_irq(unsigned int irq) 175 { 176 - enable_m32700ut_lanpld_irq(irq); 177 - end_m32700ut_irq(M32R_IRQ_INT0); 178 } 179 180 - static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) 181 - { 182 - enable_m32700ut_lanpld_irq(irq); 183 - return (0); 184 - } 185 - 186 - static void shutdown_m32700ut_lanpld_irq(unsigned int irq) 187 { 188 unsigned long port; 189 unsigned int pldirq; 190 191 - pldirq = irq2lanpldirq(irq); 192 port = lanpldirq2port(pldirq); 193 outw(PLD_ICUCR_ILEVEL7, port); 194 } 195 196 static struct irq_chip m32700ut_lanpld_irq_type = 197 { 198 - .name = "M32700UT-PLD-LAN-IRQ", 199 - .startup = startup_m32700ut_lanpld_irq, 200 - .shutdown = shutdown_m32700ut_lanpld_irq, 201 - .enable = enable_m32700ut_lanpld_irq, 202 - .disable = disable_m32700ut_lanpld_irq, 203 - .ack = mask_and_ack_m32700ut_lanpld, 204 - .end = end_m32700ut_lanpld_irq 205 }; 206 207 /* ··· 226 outw(data, port); 227 } 228 229 - static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) 230 { 231 - disable_m32700ut_lcdpld_irq(irq); 232 } 233 234 - static void end_m32700ut_lcdpld_irq(unsigned int irq) 235 { 236 - enable_m32700ut_lcdpld_irq(irq); 237 - end_m32700ut_irq(M32R_IRQ_INT2); 238 } 239 240 - static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) 241 - { 242 - enable_m32700ut_lcdpld_irq(irq); 243 - return (0); 244 - } 245 - 246 - static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) 247 { 248 unsigned long port; 249 unsigned int pldirq; 250 251 - pldirq = irq2lcdpldirq(irq); 252 port = lcdpldirq2port(pldirq); 253 outw(PLD_ICUCR_ILEVEL7, port); 254 } 255 256 static struct irq_chip m32700ut_lcdpld_irq_type = 257 { 258 - .name = "M32700UT-PLD-LCD-IRQ", 259 - .startup = startup_m32700ut_lcdpld_irq, 260 - .shutdown = shutdown_m32700ut_lcdpld_irq, 261 - .enable = enable_m32700ut_lcdpld_irq, 262 - .disable = disable_m32700ut_lcdpld_irq, 263 - .ack = mask_and_ack_m32700ut_lcdpld, 264 - .end = end_m32700ut_lcdpld_irq 265 }; 266 267 void __init init_IRQ(void) 268 { 269 #if defined(CONFIG_SMC91X) 270 /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ 271 - irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED; 272 - irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type; 273 - irq_desc[M32700UT_LAN_IRQ_LAN].action = 0; 274 - irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ 275 lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 276 disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); 277 #endif /* CONFIG_SMC91X */ 278 279 /* MFT2 : system timer */ 280 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 281 - irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type; 282 - irq_desc[M32R_IRQ_MFT2].action = 0; 283 - irq_desc[M32R_IRQ_MFT2].depth = 1; 284 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 285 disable_m32700ut_irq(M32R_IRQ_MFT2); 286 287 /* SIO0 : receive */ 288 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 289 - irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type; 290 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 291 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 292 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 293 disable_m32700ut_irq(M32R_IRQ_SIO0_R); 294 295 /* SIO0 : send */ 296 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 297 - irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type; 298 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 299 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 300 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 301 disable_m32700ut_irq(M32R_IRQ_SIO0_S); 302 303 /* SIO1 : receive */ 304 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 305 - irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type; 306 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 307 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 308 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 309 disable_m32700ut_irq(M32R_IRQ_SIO1_R); 310 311 /* SIO1 : send */ 312 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 313 - irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type; 314 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 315 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 316 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 317 disable_m32700ut_irq(M32R_IRQ_SIO1_S); 318 319 /* DMA1 : */ 320 - irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; 321 - irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type; 322 - irq_desc[M32R_IRQ_DMA1].action = 0; 323 - irq_desc[M32R_IRQ_DMA1].depth = 1; 324 icu_data[M32R_IRQ_DMA1].icucr = 0; 325 disable_m32700ut_irq(M32R_IRQ_DMA1); 326 327 #ifdef CONFIG_SERIAL_M32R_PLDSIO 328 /* INT#1: SIO0 Receive on PLD */ 329 - irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; 330 - irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type; 331 - irq_desc[PLD_IRQ_SIO0_RCV].action = 0; 332 - irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ 333 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 334 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); 335 336 /* INT#1: SIO0 Send on PLD */ 337 - irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; 338 - irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type; 339 - irq_desc[PLD_IRQ_SIO0_SND].action = 0; 340 - irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ 341 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 342 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); 343 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 344 345 /* INT#1: CFC IREQ on PLD */ 346 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 347 - irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type; 348 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 349 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 350 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 351 disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); 352 353 /* INT#1: CFC Insert on PLD */ 354 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 355 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type; 356 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 357 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 358 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 359 disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); 360 361 /* INT#1: CFC Eject on PLD */ 362 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 363 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type; 364 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 365 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 366 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 367 disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); 368 ··· 349 350 #if defined(CONFIG_USB) 351 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 352 353 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; 354 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type; 355 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0; 356 - irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1; 357 - lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 358 - disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); 359 #endif 360 /* 361 * INT2# is used for BAT, USB, AUDIO ··· 366 /* 367 * INT3# is used for AR 368 */ 369 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 370 - irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type; 371 - irq_desc[M32R_IRQ_INT3].action = 0; 372 - irq_desc[M32R_IRQ_INT3].depth = 1; 373 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 374 disable_m32700ut_irq(M32R_IRQ_INT3); 375 #endif /* CONFIG_VIDEO_M32R_AR */
··· 45 outl(data, port); 46 } 47 48 + static void mask_m32700ut(struct irq_data *data) 49 { 50 + disable_m32700ut_irq(data->irq); 51 } 52 53 + static void unmask_m32700ut(struct irq_data *data) 54 { 55 + enable_m32700ut_irq(data->irq); 56 } 57 58 + static void shutdown_m32700ut(struct irq_data *data) 59 { 60 unsigned long port; 61 62 + port = irq2port(data->irq); 63 outl(M32R_ICUCR_ILEVEL7, port); 64 } 65 66 static struct irq_chip m32700ut_irq_type = 67 { 68 + .name = "M32700UT-IRQ", 69 + .irq_shutdown = shutdown_m32700ut, 70 + .irq_mask = mask_m32700ut, 71 + .irq_unmask = unmask_m32700ut 72 }; 73 74 /* ··· 99 unsigned int pldirq; 100 101 pldirq = irq2pldirq(irq); 102 port = pldirq2port(pldirq); 103 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 104 outw(data, port); ··· 111 unsigned int pldirq; 112 113 pldirq = irq2pldirq(irq); 114 port = pldirq2port(pldirq); 115 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 116 outw(data, port); 117 } 118 119 + static void mask_m32700ut_pld(struct irq_data *data) 120 { 121 + disable_m32700ut_pld_irq(data->irq); 122 } 123 124 + static void unmask_m32700ut_pld(struct irq_data *data) 125 { 126 + enable_m32700ut_pld_irq(data->irq); 127 + enable_m32700ut_irq(M32R_IRQ_INT1); 128 } 129 130 + static void shutdown_m32700ut_pld_irq(struct irq_data *data) 131 { 132 unsigned long port; 133 unsigned int pldirq; 134 135 + pldirq = irq2pldirq(data->irq); 136 port = pldirq2port(pldirq); 137 outw(PLD_ICUCR_ILEVEL7, port); 138 } 139 140 static struct irq_chip m32700ut_pld_irq_type = 141 { 142 + .name = "M32700UT-PLD-IRQ", 143 + .irq_shutdown = shutdown_m32700ut_pld_irq, 144 + .irq_mask = mask_m32700ut_pld, 145 + .irq_unmask = unmask_m32700ut_pld, 146 }; 147 148 /* ··· 188 outw(data, port); 189 } 190 191 + static void mask_m32700ut_lanpld(struct irq_data *data) 192 { 193 + disable_m32700ut_lanpld_irq(data->irq); 194 } 195 196 + static void unmask_m32700ut_lanpld(struct irq_data *data) 197 { 198 + enable_m32700ut_lanpld_irq(data->irq); 199 + enable_m32700ut_irq(M32R_IRQ_INT0); 200 } 201 202 + static void shutdown_m32700ut_lanpld(struct irq_data *data) 203 { 204 unsigned long port; 205 unsigned int pldirq; 206 207 + pldirq = irq2lanpldirq(data->irq); 208 port = lanpldirq2port(pldirq); 209 outw(PLD_ICUCR_ILEVEL7, port); 210 } 211 212 static struct irq_chip m32700ut_lanpld_irq_type = 213 { 214 + .name = "M32700UT-PLD-LAN-IRQ", 215 + .irq_shutdown = shutdown_m32700ut_lanpld, 216 + .irq_mask = mask_m32700ut_lanpld, 217 + .irq_unmask = unmask_m32700ut_lanpld, 218 }; 219 220 /* ··· 257 outw(data, port); 258 } 259 260 + static void mask_m32700ut_lcdpld(struct irq_data *data) 261 { 262 + disable_m32700ut_lcdpld_irq(data->irq); 263 } 264 265 + static void unmask_m32700ut_lcdpld(struct irq_data *data) 266 { 267 + enable_m32700ut_lcdpld_irq(data->irq); 268 + enable_m32700ut_irq(M32R_IRQ_INT2); 269 } 270 271 + static void shutdown_m32700ut_lcdpld(struct irq_data *data) 272 { 273 unsigned long port; 274 unsigned int pldirq; 275 276 + pldirq = irq2lcdpldirq(data->irq); 277 port = lcdpldirq2port(pldirq); 278 outw(PLD_ICUCR_ILEVEL7, port); 279 } 280 281 static struct irq_chip m32700ut_lcdpld_irq_type = 282 { 283 + .name = "M32700UT-PLD-LCD-IRQ", 284 + .irq_shutdown = shutdown_m32700ut_lcdpld, 285 + .irq_mask = mask_m32700ut_lcdpld, 286 + .irq_unmask = unmask_m32700ut_lcdpld, 287 }; 288 289 void __init init_IRQ(void) 290 { 291 #if defined(CONFIG_SMC91X) 292 /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ 293 + set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, 294 + &m32700ut_lanpld_irq_type, handle_level_irq); 295 lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 296 disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); 297 #endif /* CONFIG_SMC91X */ 298 299 /* MFT2 : system timer */ 300 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, 301 + handle_level_irq); 302 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 303 disable_m32700ut_irq(M32R_IRQ_MFT2); 304 305 /* SIO0 : receive */ 306 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, 307 + handle_level_irq); 308 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 309 disable_m32700ut_irq(M32R_IRQ_SIO0_R); 310 311 /* SIO0 : send */ 312 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, 313 + handle_level_irq); 314 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 315 disable_m32700ut_irq(M32R_IRQ_SIO0_S); 316 317 /* SIO1 : receive */ 318 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, 319 + handle_level_irq); 320 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 321 disable_m32700ut_irq(M32R_IRQ_SIO1_R); 322 323 /* SIO1 : send */ 324 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, 325 + handle_level_irq); 326 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 327 disable_m32700ut_irq(M32R_IRQ_SIO1_S); 328 329 /* DMA1 : */ 330 + set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, 331 + handle_level_irq); 332 icu_data[M32R_IRQ_DMA1].icucr = 0; 333 disable_m32700ut_irq(M32R_IRQ_DMA1); 334 335 #ifdef CONFIG_SERIAL_M32R_PLDSIO 336 /* INT#1: SIO0 Receive on PLD */ 337 + set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, 338 + handle_level_irq); 339 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 340 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); 341 342 /* INT#1: SIO0 Send on PLD */ 343 + set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, 344 + handle_level_irq); 345 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 346 disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); 347 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 348 349 /* INT#1: CFC IREQ on PLD */ 350 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, 351 + handle_level_irq); 352 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 353 disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); 354 355 /* INT#1: CFC Insert on PLD */ 356 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, 357 + handle_level_irq); 358 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 359 disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); 360 361 /* INT#1: CFC Eject on PLD */ 362 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, 363 + handle_level_irq); 364 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 365 disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); 366 ··· 413 414 #if defined(CONFIG_USB) 415 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 416 + set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, 417 + &m32700ut_lcdpld_irq_type, handle_level_irq); 418 419 + lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 420 + disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); 421 #endif 422 /* 423 * INT2# is used for BAT, USB, AUDIO ··· 432 /* 433 * INT3# is used for AR 434 */ 435 + set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, 436 + handle_level_irq); 437 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 438 disable_m32700ut_irq(M32R_IRQ_INT3); 439 #endif /* CONFIG_VIDEO_M32R_AR */
+26 -52
arch/m32r/platforms/mappi/setup.c
··· 38 outl(data, port); 39 } 40 41 - static void mask_and_ack_mappi(unsigned int irq) 42 { 43 - disable_mappi_irq(irq); 44 } 45 46 - static void end_mappi_irq(unsigned int irq) 47 { 48 - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) 49 - enable_mappi_irq(irq); 50 } 51 52 - static unsigned int startup_mappi_irq(unsigned int irq) 53 - { 54 - enable_mappi_irq(irq); 55 - return (0); 56 - } 57 - 58 - static void shutdown_mappi_irq(unsigned int irq) 59 { 60 unsigned long port; 61 62 - port = irq2port(irq); 63 outl(M32R_ICUCR_ILEVEL7, port); 64 } 65 66 static struct irq_chip mappi_irq_type = 67 { 68 - .name = "MAPPI-IRQ", 69 - .startup = startup_mappi_irq, 70 - .shutdown = shutdown_mappi_irq, 71 - .enable = enable_mappi_irq, 72 - .disable = disable_mappi_irq, 73 - .ack = mask_and_ack_mappi, 74 - .end = end_mappi_irq 75 }; 76 77 void __init init_IRQ(void) ··· 75 76 #ifdef CONFIG_NE2000 77 /* INT0 : LAN controller (RTL8019AS) */ 78 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 79 - irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 80 - irq_desc[M32R_IRQ_INT0].action = NULL; 81 - irq_desc[M32R_IRQ_INT0].depth = 1; 82 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; 83 disable_mappi_irq(M32R_IRQ_INT0); 84 #endif /* CONFIG_M32R_NE2000 */ 85 86 /* MFT2 : system timer */ 87 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 88 - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 89 - irq_desc[M32R_IRQ_MFT2].action = NULL; 90 - irq_desc[M32R_IRQ_MFT2].depth = 1; 91 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 92 disable_mappi_irq(M32R_IRQ_MFT2); 93 94 #ifdef CONFIG_SERIAL_M32R_SIO 95 /* SIO0_R : uart receive data */ 96 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 97 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 98 - irq_desc[M32R_IRQ_SIO0_R].action = NULL; 99 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 100 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 101 disable_mappi_irq(M32R_IRQ_SIO0_R); 102 103 /* SIO0_S : uart send data */ 104 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 105 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 106 - irq_desc[M32R_IRQ_SIO0_S].action = NULL; 107 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 108 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 109 disable_mappi_irq(M32R_IRQ_SIO0_S); 110 111 /* SIO1_R : uart receive data */ 112 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 113 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 114 - irq_desc[M32R_IRQ_SIO1_R].action = NULL; 115 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 116 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 117 disable_mappi_irq(M32R_IRQ_SIO1_R); 118 119 /* SIO1_S : uart send data */ 120 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 121 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 122 - irq_desc[M32R_IRQ_SIO1_S].action = NULL; 123 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 124 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 125 disable_mappi_irq(M32R_IRQ_SIO1_S); 126 #endif /* CONFIG_SERIAL_M32R_SIO */ 127 128 #if defined(CONFIG_M32R_PCC) 129 /* INT1 : pccard0 interrupt */ 130 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 131 - irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; 132 - irq_desc[M32R_IRQ_INT1].action = NULL; 133 - irq_desc[M32R_IRQ_INT1].depth = 1; 134 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 135 disable_mappi_irq(M32R_IRQ_INT1); 136 137 /* INT2 : pccard1 interrupt */ 138 - irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; 139 - irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; 140 - irq_desc[M32R_IRQ_INT2].action = NULL; 141 - irq_desc[M32R_IRQ_INT2].depth = 1; 142 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 143 disable_mappi_irq(M32R_IRQ_INT2); 144 #endif /* CONFIG_M32RPCC */
··· 38 outl(data, port); 39 } 40 41 + static void mask_mappi(struct irq_data *data) 42 { 43 + disable_mappi_irq(data->irq); 44 } 45 46 + static void unmask_mappi(struct irq_data *data) 47 { 48 + enable_mappi_irq(data->irq); 49 } 50 51 + static void shutdown_mappi(struct irq_data *data) 52 { 53 unsigned long port; 54 55 + port = irq2port(data->irq); 56 outl(M32R_ICUCR_ILEVEL7, port); 57 } 58 59 static struct irq_chip mappi_irq_type = 60 { 61 + .name = "MAPPI-IRQ", 62 + .irq_shutdown = shutdown_mappi, 63 + .irq_mask = mask_mappi, 64 + .irq_unmask = unmask_mappi, 65 }; 66 67 void __init init_IRQ(void) ··· 85 86 #ifdef CONFIG_NE2000 87 /* INT0 : LAN controller (RTL8019AS) */ 88 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type, 89 + handle_level_irq); 90 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; 91 disable_mappi_irq(M32R_IRQ_INT0); 92 #endif /* CONFIG_M32R_NE2000 */ 93 94 /* MFT2 : system timer */ 95 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, 96 + handle_level_irq); 97 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 98 disable_mappi_irq(M32R_IRQ_MFT2); 99 100 #ifdef CONFIG_SERIAL_M32R_SIO 101 /* SIO0_R : uart receive data */ 102 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, 103 + handle_level_irq); 104 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 105 disable_mappi_irq(M32R_IRQ_SIO0_R); 106 107 /* SIO0_S : uart send data */ 108 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, 109 + handle_level_irq); 110 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 111 disable_mappi_irq(M32R_IRQ_SIO0_S); 112 113 /* SIO1_R : uart receive data */ 114 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, 115 + handle_level_irq); 116 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 117 disable_mappi_irq(M32R_IRQ_SIO1_R); 118 119 /* SIO1_S : uart send data */ 120 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, 121 + handle_level_irq); 122 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 123 disable_mappi_irq(M32R_IRQ_SIO1_S); 124 #endif /* CONFIG_SERIAL_M32R_SIO */ 125 126 #if defined(CONFIG_M32R_PCC) 127 /* INT1 : pccard0 interrupt */ 128 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type, 129 + handle_level_irq); 130 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 131 disable_mappi_irq(M32R_IRQ_INT1); 132 133 /* INT2 : pccard1 interrupt */ 134 + set_irq_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type, 135 + handle_level_irq); 136 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 137 disable_mappi_irq(M32R_IRQ_INT2); 138 #endif /* CONFIG_M32RPCC */
+30 -59
arch/m32r/platforms/mappi2/setup.c
··· 46 outl(data, port); 47 } 48 49 - static void mask_and_ack_mappi2(unsigned int irq) 50 { 51 - disable_mappi2_irq(irq); 52 } 53 54 - static void end_mappi2_irq(unsigned int irq) 55 { 56 - enable_mappi2_irq(irq); 57 } 58 59 - static unsigned int startup_mappi2_irq(unsigned int irq) 60 - { 61 - enable_mappi2_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_mappi2_irq(unsigned int irq) 66 { 67 unsigned long port; 68 69 - port = irq2port(irq); 70 outl(M32R_ICUCR_ILEVEL7, port); 71 } 72 73 static struct irq_chip mappi2_irq_type = 74 { 75 - .name = "MAPPI2-IRQ", 76 - .startup = startup_mappi2_irq, 77 - .shutdown = shutdown_mappi2_irq, 78 - .enable = enable_mappi2_irq, 79 - .disable = disable_mappi2_irq, 80 - .ack = mask_and_ack_mappi2, 81 - .end = end_mappi2_irq 82 }; 83 84 void __init init_IRQ(void) 85 { 86 #if defined(CONFIG_SMC91X) 87 /* INT0 : LAN controller (SMC91111) */ 88 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_INT0].chip = &mappi2_irq_type; 90 - irq_desc[M32R_IRQ_INT0].action = 0; 91 - irq_desc[M32R_IRQ_INT0].depth = 1; 92 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 93 disable_mappi2_irq(M32R_IRQ_INT0); 94 #endif /* CONFIG_SMC91X */ 95 96 /* MFT2 : system timer */ 97 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_MFT2].chip = &mappi2_irq_type; 99 - irq_desc[M32R_IRQ_MFT2].action = 0; 100 - irq_desc[M32R_IRQ_MFT2].depth = 1; 101 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 102 disable_mappi2_irq(M32R_IRQ_MFT2); 103 104 #ifdef CONFIG_SERIAL_M32R_SIO 105 /* SIO0_R : uart receive data */ 106 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 107 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi2_irq_type; 108 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 109 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 110 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 111 disable_mappi2_irq(M32R_IRQ_SIO0_R); 112 113 /* SIO0_S : uart send data */ 114 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 115 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi2_irq_type; 116 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 117 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 118 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 119 disable_mappi2_irq(M32R_IRQ_SIO0_S); 120 /* SIO1_R : uart receive data */ 121 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 122 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi2_irq_type; 123 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 124 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 125 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 126 disable_mappi2_irq(M32R_IRQ_SIO1_R); 127 128 /* SIO1_S : uart send data */ 129 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 130 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi2_irq_type; 131 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 132 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 133 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 134 disable_mappi2_irq(M32R_IRQ_SIO1_S); 135 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 136 137 #if defined(CONFIG_USB) 138 /* INT1 : USB Host controller interrupt */ 139 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 140 - irq_desc[M32R_IRQ_INT1].chip = &mappi2_irq_type; 141 - irq_desc[M32R_IRQ_INT1].action = 0; 142 - irq_desc[M32R_IRQ_INT1].depth = 1; 143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 144 disable_mappi2_irq(M32R_IRQ_INT1); 145 #endif /* CONFIG_USB */ 146 147 /* ICUCR40: CFC IREQ */ 148 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 149 - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi2_irq_type; 150 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 151 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 152 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 153 disable_mappi2_irq(PLD_IRQ_CFIREQ); 154 155 #if defined(CONFIG_M32R_CFC) 156 /* ICUCR41: CFC Insert */ 157 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 158 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi2_irq_type; 159 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 160 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 161 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 162 disable_mappi2_irq(PLD_IRQ_CFC_INSERT); 163 164 /* ICUCR42: CFC Eject */ 165 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 166 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &mappi2_irq_type; 167 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 168 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 169 icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 170 disable_mappi2_irq(PLD_IRQ_CFC_EJECT); 171 #endif /* CONFIG_MAPPI2_CFC */
··· 46 outl(data, port); 47 } 48 49 + static void mask_mappi2(struct irq_data *data) 50 { 51 + disable_mappi2_irq(data->irq); 52 } 53 54 + static void unmask_mappi2(struct irq_data *data) 55 { 56 + enable_mappi2_irq(data->irq); 57 } 58 59 + static void shutdown_mappi2(struct irq_data *data) 60 { 61 unsigned long port; 62 63 + port = irq2port(data->irq); 64 outl(M32R_ICUCR_ILEVEL7, port); 65 } 66 67 static struct irq_chip mappi2_irq_type = 68 { 69 + .name = "MAPPI2-IRQ", 70 + .irq_shutdown = shutdown_mappi2, 71 + .irq_mask = mask_mappi2, 72 + .irq_unmask = unmask_mappi2, 73 }; 74 75 void __init init_IRQ(void) 76 { 77 #if defined(CONFIG_SMC91X) 78 /* INT0 : LAN controller (SMC91111) */ 79 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, 80 + handle_level_irq); 81 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 82 disable_mappi2_irq(M32R_IRQ_INT0); 83 #endif /* CONFIG_SMC91X */ 84 85 /* MFT2 : system timer */ 86 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, 87 + handle_level_irq); 88 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 89 disable_mappi2_irq(M32R_IRQ_MFT2); 90 91 #ifdef CONFIG_SERIAL_M32R_SIO 92 /* SIO0_R : uart receive data */ 93 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, 94 + handle_level_irq); 95 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 96 disable_mappi2_irq(M32R_IRQ_SIO0_R); 97 98 /* SIO0_S : uart send data */ 99 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, 100 + handle_level_irq); 101 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 102 disable_mappi2_irq(M32R_IRQ_SIO0_S); 103 /* SIO1_R : uart receive data */ 104 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, 105 + handle_level_irq); 106 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 107 disable_mappi2_irq(M32R_IRQ_SIO1_R); 108 109 /* SIO1_S : uart send data */ 110 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, 111 + handle_level_irq); 112 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 113 disable_mappi2_irq(M32R_IRQ_SIO1_S); 114 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 115 116 #if defined(CONFIG_USB) 117 /* INT1 : USB Host controller interrupt */ 118 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, 119 + handle_level_irq); 120 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 121 disable_mappi2_irq(M32R_IRQ_INT1); 122 #endif /* CONFIG_USB */ 123 124 /* ICUCR40: CFC IREQ */ 125 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, 126 + handle_level_irq); 127 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 128 disable_mappi2_irq(PLD_IRQ_CFIREQ); 129 130 #if defined(CONFIG_M32R_CFC) 131 /* ICUCR41: CFC Insert */ 132 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, 133 + handle_level_irq); 134 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 135 disable_mappi2_irq(PLD_IRQ_CFC_INSERT); 136 137 /* ICUCR42: CFC Eject */ 138 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, 139 + handle_level_irq); 140 icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 141 disable_mappi2_irq(PLD_IRQ_CFC_EJECT); 142 #endif /* CONFIG_MAPPI2_CFC */
+31 -61
arch/m32r/platforms/mappi3/setup.c
··· 46 outl(data, port); 47 } 48 49 - static void mask_and_ack_mappi3(unsigned int irq) 50 { 51 - disable_mappi3_irq(irq); 52 } 53 54 - static void end_mappi3_irq(unsigned int irq) 55 { 56 - enable_mappi3_irq(irq); 57 } 58 59 - static unsigned int startup_mappi3_irq(unsigned int irq) 60 - { 61 - enable_mappi3_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_mappi3_irq(unsigned int irq) 66 { 67 unsigned long port; 68 69 - port = irq2port(irq); 70 outl(M32R_ICUCR_ILEVEL7, port); 71 } 72 73 - static struct irq_chip mappi3_irq_type = 74 - { 75 - .name = "MAPPI3-IRQ", 76 - .startup = startup_mappi3_irq, 77 - .shutdown = shutdown_mappi3_irq, 78 - .enable = enable_mappi3_irq, 79 - .disable = disable_mappi3_irq, 80 - .ack = mask_and_ack_mappi3, 81 - .end = end_mappi3_irq 82 }; 83 84 void __init init_IRQ(void) 85 { 86 #if defined(CONFIG_SMC91X) 87 /* INT0 : LAN controller (SMC91111) */ 88 - irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 89 - irq_desc[M32R_IRQ_INT0].chip = &mappi3_irq_type; 90 - irq_desc[M32R_IRQ_INT0].action = 0; 91 - irq_desc[M32R_IRQ_INT0].depth = 1; 92 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 93 disable_mappi3_irq(M32R_IRQ_INT0); 94 #endif /* CONFIG_SMC91X */ 95 96 /* MFT2 : system timer */ 97 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 98 - irq_desc[M32R_IRQ_MFT2].chip = &mappi3_irq_type; 99 - irq_desc[M32R_IRQ_MFT2].action = 0; 100 - irq_desc[M32R_IRQ_MFT2].depth = 1; 101 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 102 disable_mappi3_irq(M32R_IRQ_MFT2); 103 104 #ifdef CONFIG_SERIAL_M32R_SIO 105 /* SIO0_R : uart receive data */ 106 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 107 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi3_irq_type; 108 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 109 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 110 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 111 disable_mappi3_irq(M32R_IRQ_SIO0_R); 112 113 /* SIO0_S : uart send data */ 114 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 115 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi3_irq_type; 116 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 117 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 118 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 119 disable_mappi3_irq(M32R_IRQ_SIO0_S); 120 /* SIO1_R : uart receive data */ 121 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 122 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi3_irq_type; 123 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 124 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 125 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 126 disable_mappi3_irq(M32R_IRQ_SIO1_R); 127 128 /* SIO1_S : uart send data */ 129 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 130 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi3_irq_type; 131 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 132 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 133 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 134 disable_mappi3_irq(M32R_IRQ_SIO1_S); 135 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 136 137 #if defined(CONFIG_USB) 138 /* INT1 : USB Host controller interrupt */ 139 - irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 140 - irq_desc[M32R_IRQ_INT1].chip = &mappi3_irq_type; 141 - irq_desc[M32R_IRQ_INT1].action = 0; 142 - irq_desc[M32R_IRQ_INT1].depth = 1; 143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 144 disable_mappi3_irq(M32R_IRQ_INT1); 145 #endif /* CONFIG_USB */ 146 147 /* CFC IREQ */ 148 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 149 - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi3_irq_type; 150 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 151 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 152 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 153 disable_mappi3_irq(PLD_IRQ_CFIREQ); 154 155 #if defined(CONFIG_M32R_CFC) 156 /* ICUCR41: CFC Insert & eject */ 157 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 158 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi3_irq_type; 159 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 160 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 161 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 162 disable_mappi3_irq(PLD_IRQ_CFC_INSERT); 163 164 #endif /* CONFIG_M32R_CFC */ 165 166 /* IDE IREQ */ 167 - irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED; 168 - irq_desc[PLD_IRQ_IDEIREQ].chip = &mappi3_irq_type; 169 - irq_desc[PLD_IRQ_IDEIREQ].action = 0; 170 - irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */ 171 icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 172 disable_mappi3_irq(PLD_IRQ_IDEIREQ); 173
··· 46 outl(data, port); 47 } 48 49 + static void mask_mappi3(struct irq_data *data) 50 { 51 + disable_mappi3_irq(data->irq); 52 } 53 54 + static void unmask_mappi3(struct irq_data *data) 55 { 56 + enable_mappi3_irq(data->irq); 57 } 58 59 + static void shutdown_mappi3(struct irq_data *data) 60 { 61 unsigned long port; 62 63 + port = irq2port(data->irq); 64 outl(M32R_ICUCR_ILEVEL7, port); 65 } 66 67 + static struct irq_chip mappi3_irq_type = { 68 + .name = "MAPPI3-IRQ", 69 + .irq_shutdown = shutdown_mappi3, 70 + .irq_mask = mask_mappi3, 71 + .irq_unmask = unmask_mappi3, 72 }; 73 74 void __init init_IRQ(void) 75 { 76 #if defined(CONFIG_SMC91X) 77 /* INT0 : LAN controller (SMC91111) */ 78 + set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, 79 + handle_level_irq); 80 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 81 disable_mappi3_irq(M32R_IRQ_INT0); 82 #endif /* CONFIG_SMC91X */ 83 84 /* MFT2 : system timer */ 85 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, 86 + handle_level_irq); 87 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 88 disable_mappi3_irq(M32R_IRQ_MFT2); 89 90 #ifdef CONFIG_SERIAL_M32R_SIO 91 /* SIO0_R : uart receive data */ 92 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, 93 + handle_level_irq); 94 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 95 disable_mappi3_irq(M32R_IRQ_SIO0_R); 96 97 /* SIO0_S : uart send data */ 98 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, 99 + handle_level_irq); 100 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 101 disable_mappi3_irq(M32R_IRQ_SIO0_S); 102 /* SIO1_R : uart receive data */ 103 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, 104 + handle_level_irq); 105 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 106 disable_mappi3_irq(M32R_IRQ_SIO1_R); 107 108 /* SIO1_S : uart send data */ 109 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, 110 + handle_level_irq); 111 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 112 disable_mappi3_irq(M32R_IRQ_SIO1_S); 113 #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ 114 115 #if defined(CONFIG_USB) 116 /* INT1 : USB Host controller interrupt */ 117 + set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, 118 + handle_level_irq); 119 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; 120 disable_mappi3_irq(M32R_IRQ_INT1); 121 #endif /* CONFIG_USB */ 122 123 /* CFC IREQ */ 124 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, 125 + handle_level_irq); 126 icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; 127 disable_mappi3_irq(PLD_IRQ_CFIREQ); 128 129 #if defined(CONFIG_M32R_CFC) 130 /* ICUCR41: CFC Insert & eject */ 131 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, 132 + handle_level_irq); 133 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 134 disable_mappi3_irq(PLD_IRQ_CFC_INSERT); 135 136 #endif /* CONFIG_M32R_CFC */ 137 138 /* IDE IREQ */ 139 + set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, 140 + handle_level_irq); 141 icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 142 disable_mappi3_irq(PLD_IRQ_IDEIREQ); 143
+22 -43
arch/m32r/platforms/oaks32r/setup.c
··· 37 outl(data, port); 38 } 39 40 - static void mask_and_ack_mappi(unsigned int irq) 41 { 42 - disable_oaks32r_irq(irq); 43 } 44 45 - static void end_oaks32r_irq(unsigned int irq) 46 { 47 - enable_oaks32r_irq(irq); 48 } 49 50 - static unsigned int startup_oaks32r_irq(unsigned int irq) 51 - { 52 - enable_oaks32r_irq(irq); 53 - return (0); 54 - } 55 - 56 - static void shutdown_oaks32r_irq(unsigned int irq) 57 { 58 unsigned long port; 59 60 - port = irq2port(irq); 61 outl(M32R_ICUCR_ILEVEL7, port); 62 } 63 64 static struct irq_chip oaks32r_irq_type = 65 { 66 - .name = "OAKS32R-IRQ", 67 - .startup = startup_oaks32r_irq, 68 - .shutdown = shutdown_oaks32r_irq, 69 - .enable = enable_oaks32r_irq, 70 - .disable = disable_oaks32r_irq, 71 - .ack = mask_and_ack_mappi, 72 - .end = end_oaks32r_irq 73 }; 74 75 void __init init_IRQ(void) ··· 74 75 #ifdef CONFIG_NE2000 76 /* INT3 : LAN controller (RTL8019AS) */ 77 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 78 - irq_desc[M32R_IRQ_INT3].chip = &oaks32r_irq_type; 79 - irq_desc[M32R_IRQ_INT3].action = 0; 80 - irq_desc[M32R_IRQ_INT3].depth = 1; 81 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 82 disable_oaks32r_irq(M32R_IRQ_INT3); 83 #endif /* CONFIG_M32R_NE2000 */ 84 85 /* MFT2 : system timer */ 86 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 87 - irq_desc[M32R_IRQ_MFT2].chip = &oaks32r_irq_type; 88 - irq_desc[M32R_IRQ_MFT2].action = 0; 89 - irq_desc[M32R_IRQ_MFT2].depth = 1; 90 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 91 disable_oaks32r_irq(M32R_IRQ_MFT2); 92 93 #ifdef CONFIG_SERIAL_M32R_SIO 94 /* SIO0_R : uart receive data */ 95 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 96 - irq_desc[M32R_IRQ_SIO0_R].chip = &oaks32r_irq_type; 97 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 98 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 99 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 100 disable_oaks32r_irq(M32R_IRQ_SIO0_R); 101 102 /* SIO0_S : uart send data */ 103 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 104 - irq_desc[M32R_IRQ_SIO0_S].chip = &oaks32r_irq_type; 105 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 106 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 107 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 108 disable_oaks32r_irq(M32R_IRQ_SIO0_S); 109 110 /* SIO1_R : uart receive data */ 111 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 112 - irq_desc[M32R_IRQ_SIO1_R].chip = &oaks32r_irq_type; 113 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 114 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 115 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 116 disable_oaks32r_irq(M32R_IRQ_SIO1_R); 117 118 /* SIO1_S : uart send data */ 119 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 120 - irq_desc[M32R_IRQ_SIO1_S].chip = &oaks32r_irq_type; 121 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 122 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 123 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 124 disable_oaks32r_irq(M32R_IRQ_SIO1_S); 125 #endif /* CONFIG_SERIAL_M32R_SIO */
··· 37 outl(data, port); 38 } 39 40 + static void mask_oaks32r(struct irq_data *data) 41 { 42 + disable_oaks32r_irq(data->irq); 43 } 44 45 + static void unmask_oaks32r(struct irq_data *data) 46 { 47 + enable_oaks32r_irq(data->irq); 48 } 49 50 + static void shutdown_oaks32r(struct irq_data *data) 51 { 52 unsigned long port; 53 54 + port = irq2port(data->irq); 55 outl(M32R_ICUCR_ILEVEL7, port); 56 } 57 58 static struct irq_chip oaks32r_irq_type = 59 { 60 + .name = "OAKS32R-IRQ", 61 + .irq_shutdown = shutdown_oaks32r, 62 + .irq_mask = mask_oaks32r, 63 + .irq_unmask = unmask_oaks32r, 64 }; 65 66 void __init init_IRQ(void) ··· 83 84 #ifdef CONFIG_NE2000 85 /* INT3 : LAN controller (RTL8019AS) */ 86 + set_irq_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type, 87 + handle_level_irq); 88 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 89 disable_oaks32r_irq(M32R_IRQ_INT3); 90 #endif /* CONFIG_M32R_NE2000 */ 91 92 /* MFT2 : system timer */ 93 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type, 94 + handle_level_irq); 95 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 96 disable_oaks32r_irq(M32R_IRQ_MFT2); 97 98 #ifdef CONFIG_SERIAL_M32R_SIO 99 /* SIO0_R : uart receive data */ 100 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type, 101 + handle_level_irq); 102 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 103 disable_oaks32r_irq(M32R_IRQ_SIO0_R); 104 105 /* SIO0_S : uart send data */ 106 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type, 107 + handle_level_irq); 108 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 109 disable_oaks32r_irq(M32R_IRQ_SIO0_S); 110 111 /* SIO1_R : uart receive data */ 112 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type, 113 + handle_level_irq); 114 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 115 disable_oaks32r_irq(M32R_IRQ_SIO1_R); 116 117 /* SIO1_S : uart send data */ 118 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type, 119 + handle_level_irq); 120 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 121 disable_oaks32r_irq(M32R_IRQ_SIO1_S); 122 #endif /* CONFIG_SERIAL_M32R_SIO */
+75 -145
arch/m32r/platforms/opsput/setup.c
··· 46 outl(data, port); 47 } 48 49 - static void mask_and_ack_opsput(unsigned int irq) 50 { 51 - disable_opsput_irq(irq); 52 } 53 54 - static void end_opsput_irq(unsigned int irq) 55 { 56 - enable_opsput_irq(irq); 57 } 58 59 - static unsigned int startup_opsput_irq(unsigned int irq) 60 - { 61 - enable_opsput_irq(irq); 62 - return (0); 63 - } 64 - 65 - static void shutdown_opsput_irq(unsigned int irq) 66 { 67 unsigned long port; 68 69 - port = irq2port(irq); 70 outl(M32R_ICUCR_ILEVEL7, port); 71 } 72 73 static struct irq_chip opsput_irq_type = 74 { 75 - .name = "OPSPUT-IRQ", 76 - .startup = startup_opsput_irq, 77 - .shutdown = shutdown_opsput_irq, 78 - .enable = enable_opsput_irq, 79 - .disable = disable_opsput_irq, 80 - .ack = mask_and_ack_opsput, 81 - .end = end_opsput_irq 82 }; 83 84 /* ··· 91 unsigned int pldirq; 92 93 pldirq = irq2pldirq(irq); 94 - // disable_opsput_irq(M32R_IRQ_INT1); 95 port = pldirq2port(pldirq); 96 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 97 outw(data, port); ··· 102 unsigned int pldirq; 103 104 pldirq = irq2pldirq(irq); 105 - // enable_opsput_irq(M32R_IRQ_INT1); 106 port = pldirq2port(pldirq); 107 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 108 outw(data, port); 109 } 110 111 - static void mask_and_ack_opsput_pld(unsigned int irq) 112 { 113 - disable_opsput_pld_irq(irq); 114 - // mask_and_ack_opsput(M32R_IRQ_INT1); 115 } 116 117 - static void end_opsput_pld_irq(unsigned int irq) 118 { 119 - enable_opsput_pld_irq(irq); 120 - end_opsput_irq(M32R_IRQ_INT1); 121 } 122 123 - static unsigned int startup_opsput_pld_irq(unsigned int irq) 124 - { 125 - enable_opsput_pld_irq(irq); 126 - return (0); 127 - } 128 - 129 - static void shutdown_opsput_pld_irq(unsigned int irq) 130 { 131 unsigned long port; 132 unsigned int pldirq; 133 134 - pldirq = irq2pldirq(irq); 135 - // shutdown_opsput_irq(M32R_IRQ_INT1); 136 port = pldirq2port(pldirq); 137 outw(PLD_ICUCR_ILEVEL7, port); 138 } 139 140 static struct irq_chip opsput_pld_irq_type = 141 { 142 - .name = "OPSPUT-PLD-IRQ", 143 - .startup = startup_opsput_pld_irq, 144 - .shutdown = shutdown_opsput_pld_irq, 145 - .enable = enable_opsput_pld_irq, 146 - .disable = disable_opsput_pld_irq, 147 - .ack = mask_and_ack_opsput_pld, 148 - .end = end_opsput_pld_irq 149 }; 150 151 /* ··· 167 outw(data, port); 168 } 169 170 - static void mask_and_ack_opsput_lanpld(unsigned int irq) 171 { 172 - disable_opsput_lanpld_irq(irq); 173 } 174 175 - static void end_opsput_lanpld_irq(unsigned int irq) 176 { 177 - enable_opsput_lanpld_irq(irq); 178 - end_opsput_irq(M32R_IRQ_INT0); 179 } 180 181 - static unsigned int startup_opsput_lanpld_irq(unsigned int irq) 182 - { 183 - enable_opsput_lanpld_irq(irq); 184 - return (0); 185 - } 186 - 187 - static void shutdown_opsput_lanpld_irq(unsigned int irq) 188 { 189 unsigned long port; 190 unsigned int pldirq; 191 192 - pldirq = irq2lanpldirq(irq); 193 port = lanpldirq2port(pldirq); 194 outw(PLD_ICUCR_ILEVEL7, port); 195 } 196 197 static struct irq_chip opsput_lanpld_irq_type = 198 { 199 - .name = "OPSPUT-PLD-LAN-IRQ", 200 - .startup = startup_opsput_lanpld_irq, 201 - .shutdown = shutdown_opsput_lanpld_irq, 202 - .enable = enable_opsput_lanpld_irq, 203 - .disable = disable_opsput_lanpld_irq, 204 - .ack = mask_and_ack_opsput_lanpld, 205 - .end = end_opsput_lanpld_irq 206 }; 207 208 /* ··· 227 outw(data, port); 228 } 229 230 - static void mask_and_ack_opsput_lcdpld(unsigned int irq) 231 { 232 - disable_opsput_lcdpld_irq(irq); 233 } 234 235 - static void end_opsput_lcdpld_irq(unsigned int irq) 236 { 237 - enable_opsput_lcdpld_irq(irq); 238 - end_opsput_irq(M32R_IRQ_INT2); 239 } 240 241 - static unsigned int startup_opsput_lcdpld_irq(unsigned int irq) 242 - { 243 - enable_opsput_lcdpld_irq(irq); 244 - return (0); 245 - } 246 - 247 - static void shutdown_opsput_lcdpld_irq(unsigned int irq) 248 { 249 unsigned long port; 250 unsigned int pldirq; 251 252 - pldirq = irq2lcdpldirq(irq); 253 port = lcdpldirq2port(pldirq); 254 outw(PLD_ICUCR_ILEVEL7, port); 255 } 256 257 - static struct irq_chip opsput_lcdpld_irq_type = 258 - { 259 - "OPSPUT-PLD-LCD-IRQ", 260 - startup_opsput_lcdpld_irq, 261 - shutdown_opsput_lcdpld_irq, 262 - enable_opsput_lcdpld_irq, 263 - disable_opsput_lcdpld_irq, 264 - mask_and_ack_opsput_lcdpld, 265 - end_opsput_lcdpld_irq 266 }; 267 268 void __init init_IRQ(void) 269 { 270 #if defined(CONFIG_SMC91X) 271 /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ 272 - irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; 273 - irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; 274 - irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0; 275 - irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ 276 lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 277 disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); 278 #endif /* CONFIG_SMC91X */ 279 280 /* MFT2 : system timer */ 281 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 282 - irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; 283 - irq_desc[M32R_IRQ_MFT2].action = 0; 284 - irq_desc[M32R_IRQ_MFT2].depth = 1; 285 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 286 disable_opsput_irq(M32R_IRQ_MFT2); 287 288 /* SIO0 : receive */ 289 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 290 - irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; 291 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 292 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 293 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 294 disable_opsput_irq(M32R_IRQ_SIO0_R); 295 296 /* SIO0 : send */ 297 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 298 - irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; 299 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 300 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 301 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 302 disable_opsput_irq(M32R_IRQ_SIO0_S); 303 304 /* SIO1 : receive */ 305 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 306 - irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; 307 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 308 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 309 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 310 disable_opsput_irq(M32R_IRQ_SIO1_R); 311 312 /* SIO1 : send */ 313 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 314 - irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; 315 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 316 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 317 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 318 disable_opsput_irq(M32R_IRQ_SIO1_S); 319 320 /* DMA1 : */ 321 - irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; 322 - irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; 323 - irq_desc[M32R_IRQ_DMA1].action = 0; 324 - irq_desc[M32R_IRQ_DMA1].depth = 1; 325 icu_data[M32R_IRQ_DMA1].icucr = 0; 326 disable_opsput_irq(M32R_IRQ_DMA1); 327 328 #ifdef CONFIG_SERIAL_M32R_PLDSIO 329 /* INT#1: SIO0 Receive on PLD */ 330 - irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; 331 - irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; 332 - irq_desc[PLD_IRQ_SIO0_RCV].action = 0; 333 - irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ 334 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 335 disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); 336 337 /* INT#1: SIO0 Send on PLD */ 338 - irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; 339 - irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; 340 - irq_desc[PLD_IRQ_SIO0_SND].action = 0; 341 - irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ 342 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 343 disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); 344 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 345 346 /* INT#1: CFC IREQ on PLD */ 347 - irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 348 - irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; 349 - irq_desc[PLD_IRQ_CFIREQ].action = 0; 350 - irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ 351 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 352 disable_opsput_pld_irq(PLD_IRQ_CFIREQ); 353 354 /* INT#1: CFC Insert on PLD */ 355 - irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 356 - irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; 357 - irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 358 - irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ 359 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 360 disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); 361 362 /* INT#1: CFC Eject on PLD */ 363 - irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; 364 - irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; 365 - irq_desc[PLD_IRQ_CFC_EJECT].action = 0; 366 - irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ 367 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 368 disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); 369 ··· 348 enable_opsput_irq(M32R_IRQ_INT1); 349 350 #if defined(CONFIG_USB) 351 - outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 352 - 353 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; 354 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; 355 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; 356 - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1; 357 - lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 358 - disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); 359 #endif 360 /* 361 * INT2# is used for BAT, USB, AUDIO ··· 365 /* 366 * INT3# is used for AR 367 */ 368 - irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; 369 - irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; 370 - irq_desc[M32R_IRQ_INT3].action = 0; 371 - irq_desc[M32R_IRQ_INT3].depth = 1; 372 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 373 disable_opsput_irq(M32R_IRQ_INT3); 374 #endif /* CONFIG_VIDEO_M32R_AR */
··· 46 outl(data, port); 47 } 48 49 + static void mask_opsput(struct irq_data *data) 50 { 51 + disable_opsput_irq(data->irq); 52 } 53 54 + static void unmask_opsput(struct irq_data *data) 55 { 56 + enable_opsput_irq(data->irq); 57 } 58 59 + static void shutdown_opsput(struct irq_data *data) 60 { 61 unsigned long port; 62 63 + port = irq2port(data->irq); 64 outl(M32R_ICUCR_ILEVEL7, port); 65 } 66 67 static struct irq_chip opsput_irq_type = 68 { 69 + .name = "OPSPUT-IRQ", 70 + .irq_shutdown = shutdown_opsput, 71 + .irq_mask = mask_opsput, 72 + .irq_unmask = unmask_opsput, 73 }; 74 75 /* ··· 100 unsigned int pldirq; 101 102 pldirq = irq2pldirq(irq); 103 port = pldirq2port(pldirq); 104 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 105 outw(data, port); ··· 112 unsigned int pldirq; 113 114 pldirq = irq2pldirq(irq); 115 port = pldirq2port(pldirq); 116 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 117 outw(data, port); 118 } 119 120 + static void mask_opsput_pld(struct irq_data *data) 121 { 122 + disable_opsput_pld_irq(data->irq); 123 } 124 125 + static void unmask_opsput_pld(struct irq_data *data) 126 { 127 + enable_opsput_pld_irq(data->irq); 128 + enable_opsput_irq(M32R_IRQ_INT1); 129 } 130 131 + static void shutdown_opsput_pld(struct irq_data *data) 132 { 133 unsigned long port; 134 unsigned int pldirq; 135 136 + pldirq = irq2pldirq(data->irq); 137 port = pldirq2port(pldirq); 138 outw(PLD_ICUCR_ILEVEL7, port); 139 } 140 141 static struct irq_chip opsput_pld_irq_type = 142 { 143 + .name = "OPSPUT-PLD-IRQ", 144 + .irq_shutdown = shutdown_opsput_pld, 145 + .irq_mask = mask_opsput_pld, 146 + .irq_unmask = unmask_opsput_pld, 147 }; 148 149 /* ··· 189 outw(data, port); 190 } 191 192 + static void mask_opsput_lanpld(struct irq_data *data) 193 { 194 + disable_opsput_lanpld_irq(data->irq); 195 } 196 197 + static void unmask_opsput_lanpld(struct irq_data *data) 198 { 199 + enable_opsput_lanpld_irq(data->irq); 200 + enable_opsput_irq(M32R_IRQ_INT0); 201 } 202 203 + static void shutdown_opsput_lanpld(struct irq_data *data) 204 { 205 unsigned long port; 206 unsigned int pldirq; 207 208 + pldirq = irq2lanpldirq(data->irq); 209 port = lanpldirq2port(pldirq); 210 outw(PLD_ICUCR_ILEVEL7, port); 211 } 212 213 static struct irq_chip opsput_lanpld_irq_type = 214 { 215 + .name = "OPSPUT-PLD-LAN-IRQ", 216 + .irq_shutdown = shutdown_opsput_lanpld, 217 + .irq_mask = mask_opsput_lanpld, 218 + .irq_unmask = unmask_opsput_lanpld, 219 }; 220 221 /* ··· 258 outw(data, port); 259 } 260 261 + static void mask_opsput_lcdpld(struct irq_data *data) 262 { 263 + disable_opsput_lcdpld_irq(data->irq); 264 } 265 266 + static void unmask_opsput_lcdpld(struct irq_data *data) 267 { 268 + enable_opsput_lcdpld_irq(data->irq); 269 + enable_opsput_irq(M32R_IRQ_INT2); 270 } 271 272 + static void shutdown_opsput_lcdpld(struct irq_data *data) 273 { 274 unsigned long port; 275 unsigned int pldirq; 276 277 + pldirq = irq2lcdpldirq(data->irq); 278 port = lcdpldirq2port(pldirq); 279 outw(PLD_ICUCR_ILEVEL7, port); 280 } 281 282 + static struct irq_chip opsput_lcdpld_irq_type = { 283 + .name = "OPSPUT-PLD-LCD-IRQ", 284 + .irq_shutdown = shutdown_opsput_lcdpld, 285 + .irq_mask = mask_opsput_lcdpld, 286 + .irq_unmask = unmask_opsput_lcdpld, 287 }; 288 289 void __init init_IRQ(void) 290 { 291 #if defined(CONFIG_SMC91X) 292 /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ 293 + set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, 294 + handle_level_irq); 295 lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 296 disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); 297 #endif /* CONFIG_SMC91X */ 298 299 /* MFT2 : system timer */ 300 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, 301 + handle_level_irq); 302 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 303 disable_opsput_irq(M32R_IRQ_MFT2); 304 305 /* SIO0 : receive */ 306 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, 307 + handle_level_irq); 308 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 309 disable_opsput_irq(M32R_IRQ_SIO0_R); 310 311 /* SIO0 : send */ 312 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, 313 + handle_level_irq); 314 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 315 disable_opsput_irq(M32R_IRQ_SIO0_S); 316 317 /* SIO1 : receive */ 318 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, 319 + handle_level_irq); 320 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 321 disable_opsput_irq(M32R_IRQ_SIO1_R); 322 323 /* SIO1 : send */ 324 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, 325 + handle_level_irq); 326 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 327 disable_opsput_irq(M32R_IRQ_SIO1_S); 328 329 /* DMA1 : */ 330 + set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, 331 + handle_level_irq); 332 icu_data[M32R_IRQ_DMA1].icucr = 0; 333 disable_opsput_irq(M32R_IRQ_DMA1); 334 335 #ifdef CONFIG_SERIAL_M32R_PLDSIO 336 /* INT#1: SIO0 Receive on PLD */ 337 + set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, 338 + handle_level_irq); 339 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 340 disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); 341 342 /* INT#1: SIO0 Send on PLD */ 343 + set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, 344 + handle_level_irq); 345 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; 346 disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); 347 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 348 349 /* INT#1: CFC IREQ on PLD */ 350 + set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, 351 + handle_level_irq); 352 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ 353 disable_opsput_pld_irq(PLD_IRQ_CFIREQ); 354 355 /* INT#1: CFC Insert on PLD */ 356 + set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, 357 + handle_level_irq); 358 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ 359 disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); 360 361 /* INT#1: CFC Eject on PLD */ 362 + set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, 363 + handle_level_irq); 364 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ 365 disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); 366 ··· 413 enable_opsput_irq(M32R_IRQ_INT1); 414 415 #if defined(CONFIG_USB) 416 + outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ 417 + set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, 418 + &opsput_lcdpld_irq_type, handle_level_irq); 419 + lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ 420 + disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); 421 #endif 422 /* 423 * INT2# is used for BAT, USB, AUDIO ··· 433 /* 434 * INT3# is used for AR 435 */ 436 + set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, 437 + handle_level_irq); 438 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 439 disable_opsput_irq(M32R_IRQ_INT3); 440 #endif /* CONFIG_VIDEO_M32R_AR */
+40 -75
arch/m32r/platforms/usrv/setup.c
··· 37 outl(data, port); 38 } 39 40 - static void mask_and_ack_mappi(unsigned int irq) 41 { 42 - disable_mappi_irq(irq); 43 } 44 45 - static void end_mappi_irq(unsigned int irq) 46 { 47 - enable_mappi_irq(irq); 48 } 49 50 - static unsigned int startup_mappi_irq(unsigned int irq) 51 - { 52 - enable_mappi_irq(irq); 53 - return 0; 54 - } 55 - 56 - static void shutdown_mappi_irq(unsigned int irq) 57 { 58 unsigned long port; 59 60 - port = irq2port(irq); 61 outl(M32R_ICUCR_ILEVEL7, port); 62 } 63 64 static struct irq_chip mappi_irq_type = 65 { 66 - .name = "M32700-IRQ", 67 - .startup = startup_mappi_irq, 68 - .shutdown = shutdown_mappi_irq, 69 - .enable = enable_mappi_irq, 70 - .disable = disable_mappi_irq, 71 - .ack = mask_and_ack_mappi, 72 - .end = end_mappi_irq 73 }; 74 75 /* ··· 98 outw(data, port); 99 } 100 101 - static void mask_and_ack_m32700ut_pld(unsigned int irq) 102 { 103 - disable_m32700ut_pld_irq(irq); 104 } 105 106 - static void end_m32700ut_pld_irq(unsigned int irq) 107 { 108 - enable_m32700ut_pld_irq(irq); 109 - end_mappi_irq(M32R_IRQ_INT1); 110 } 111 112 - static unsigned int startup_m32700ut_pld_irq(unsigned int irq) 113 - { 114 - enable_m32700ut_pld_irq(irq); 115 - return 0; 116 - } 117 - 118 - static void shutdown_m32700ut_pld_irq(unsigned int irq) 119 { 120 unsigned long port; 121 unsigned int pldirq; 122 123 - pldirq = irq2pldirq(irq); 124 port = pldirq2port(pldirq); 125 outw(PLD_ICUCR_ILEVEL7, port); 126 } 127 128 static struct irq_chip m32700ut_pld_irq_type = 129 { 130 - .name = "USRV-PLD-IRQ", 131 - .startup = startup_m32700ut_pld_irq, 132 - .shutdown = shutdown_m32700ut_pld_irq, 133 - .enable = enable_m32700ut_pld_irq, 134 - .disable = disable_m32700ut_pld_irq, 135 - .ack = mask_and_ack_m32700ut_pld, 136 - .end = end_m32700ut_pld_irq 137 }; 138 139 void __init init_IRQ(void) ··· 138 once++; 139 140 /* MFT2 : system timer */ 141 - irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 142 - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 143 - irq_desc[M32R_IRQ_MFT2].action = 0; 144 - irq_desc[M32R_IRQ_MFT2].depth = 1; 145 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 146 disable_mappi_irq(M32R_IRQ_MFT2); 147 148 #if defined(CONFIG_SERIAL_M32R_SIO) 149 /* SIO0_R : uart receive data */ 150 - irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 151 - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 152 - irq_desc[M32R_IRQ_SIO0_R].action = 0; 153 - irq_desc[M32R_IRQ_SIO0_R].depth = 1; 154 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 155 disable_mappi_irq(M32R_IRQ_SIO0_R); 156 157 /* SIO0_S : uart send data */ 158 - irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 159 - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 160 - irq_desc[M32R_IRQ_SIO0_S].action = 0; 161 - irq_desc[M32R_IRQ_SIO0_S].depth = 1; 162 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 163 disable_mappi_irq(M32R_IRQ_SIO0_S); 164 165 /* SIO1_R : uart receive data */ 166 - irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 167 - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 168 - irq_desc[M32R_IRQ_SIO1_R].action = 0; 169 - irq_desc[M32R_IRQ_SIO1_R].depth = 1; 170 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 171 disable_mappi_irq(M32R_IRQ_SIO1_R); 172 173 /* SIO1_S : uart send data */ 174 - irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 175 - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 176 - irq_desc[M32R_IRQ_SIO1_S].action = 0; 177 - irq_desc[M32R_IRQ_SIO1_S].depth = 1; 178 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 179 disable_mappi_irq(M32R_IRQ_SIO1_S); 180 #endif /* CONFIG_SERIAL_M32R_SIO */ 181 182 /* INT#67-#71: CFC#0 IREQ on PLD */ 183 for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { 184 - irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED; 185 - irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type; 186 - irq_desc[PLD_IRQ_CF0 + i].action = 0; 187 - irq_desc[PLD_IRQ_CF0 + i].depth = 1; /* disable nested irq */ 188 pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr 189 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 190 disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i); ··· 181 182 #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 183 /* INT#76: 16552D#0 IREQ on PLD */ 184 - irq_desc[PLD_IRQ_UART0].status = IRQ_DISABLED; 185 - irq_desc[PLD_IRQ_UART0].chip = &m32700ut_pld_irq_type; 186 - irq_desc[PLD_IRQ_UART0].action = 0; 187 - irq_desc[PLD_IRQ_UART0].depth = 1; /* disable nested irq */ 188 pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr 189 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 190 disable_m32700ut_pld_irq(PLD_IRQ_UART0); 191 192 /* INT#77: 16552D#1 IREQ on PLD */ 193 - irq_desc[PLD_IRQ_UART1].status = IRQ_DISABLED; 194 - irq_desc[PLD_IRQ_UART1].chip = &m32700ut_pld_irq_type; 195 - irq_desc[PLD_IRQ_UART1].action = 0; 196 - irq_desc[PLD_IRQ_UART1].depth = 1; /* disable nested irq */ 197 pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr 198 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 199 disable_m32700ut_pld_irq(PLD_IRQ_UART1); ··· 197 198 #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) 199 /* INT#80: AK4524 IREQ on PLD */ 200 - irq_desc[PLD_IRQ_SNDINT].status = IRQ_DISABLED; 201 - irq_desc[PLD_IRQ_SNDINT].chip = &m32700ut_pld_irq_type; 202 - irq_desc[PLD_IRQ_SNDINT].action = 0; 203 - irq_desc[PLD_IRQ_SNDINT].depth = 1; /* disable nested irq */ 204 pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr 205 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 206 disable_m32700ut_pld_irq(PLD_IRQ_SNDINT);
··· 37 outl(data, port); 38 } 39 40 + static void mask_mappi(struct irq_data *data) 41 { 42 + disable_mappi_irq(data->irq); 43 } 44 45 + static void unmask_mappi(struct irq_data *data) 46 { 47 + enable_mappi_irq(data->irq); 48 } 49 50 + static void shutdown_mappi(struct irq_data *data) 51 { 52 unsigned long port; 53 54 + port = irq2port(data->irq); 55 outl(M32R_ICUCR_ILEVEL7, port); 56 } 57 58 static struct irq_chip mappi_irq_type = 59 { 60 + .name = "M32700-IRQ", 61 + .irq_shutdown = shutdown_mappi, 62 + .irq_mask = mask_mappi, 63 + .irq_unmask = unmask_mappi, 64 }; 65 66 /* ··· 107 outw(data, port); 108 } 109 110 + static void mask_m32700ut_pld(struct irq_data *data) 111 { 112 + disable_m32700ut_pld_irq(data->irq); 113 } 114 115 + static void unmask_m32700ut_pld(struct irq_data *data) 116 { 117 + enable_m32700ut_pld_irq(data->irq); 118 + enable_mappi_irq(M32R_IRQ_INT1); 119 } 120 121 + static void shutdown_m32700ut_pld(struct irq_data *data) 122 { 123 unsigned long port; 124 unsigned int pldirq; 125 126 + pldirq = irq2pldirq(data->irq); 127 port = pldirq2port(pldirq); 128 outw(PLD_ICUCR_ILEVEL7, port); 129 } 130 131 static struct irq_chip m32700ut_pld_irq_type = 132 { 133 + .name = "USRV-PLD-IRQ", 134 + .irq_shutdown = shutdown_m32700ut_pld, 135 + .irq_mask = mask_m32700ut_pld, 136 + .irq_unmask = unmask_m32700ut_pld, 137 }; 138 139 void __init init_IRQ(void) ··· 156 once++; 157 158 /* MFT2 : system timer */ 159 + set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, 160 + handle_level_irq); 161 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 162 disable_mappi_irq(M32R_IRQ_MFT2); 163 164 #if defined(CONFIG_SERIAL_M32R_SIO) 165 /* SIO0_R : uart receive data */ 166 + set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, 167 + handle_level_irq); 168 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 169 disable_mappi_irq(M32R_IRQ_SIO0_R); 170 171 /* SIO0_S : uart send data */ 172 + set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, 173 + handle_level_irq); 174 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 175 disable_mappi_irq(M32R_IRQ_SIO0_S); 176 177 /* SIO1_R : uart receive data */ 178 + set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, 179 + handle_level_irq); 180 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 181 disable_mappi_irq(M32R_IRQ_SIO1_R); 182 183 /* SIO1_S : uart send data */ 184 + set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, 185 + handle_level_irq); 186 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 187 disable_mappi_irq(M32R_IRQ_SIO1_S); 188 #endif /* CONFIG_SERIAL_M32R_SIO */ 189 190 /* INT#67-#71: CFC#0 IREQ on PLD */ 191 for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { 192 + set_irq_chip_and_handler(PLD_IRQ_CF0 + i, 193 + &m32700ut_pld_irq_type, 194 + handle_level_irq); 195 pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr 196 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 197 disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i); ··· 210 211 #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 212 /* INT#76: 16552D#0 IREQ on PLD */ 213 + set_irq_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type, 214 + handle_level_irq); 215 pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr 216 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 217 disable_m32700ut_pld_irq(PLD_IRQ_UART0); 218 219 /* INT#77: 16552D#1 IREQ on PLD */ 220 + set_irq_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type, 221 + handle_level_irq); 222 pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr 223 = PLD_ICUCR_ISMOD03; /* 'H' level sense */ 224 disable_m32700ut_pld_irq(PLD_IRQ_UART1); ··· 230 231 #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) 232 /* INT#80: AK4524 IREQ on PLD */ 233 + set_irq_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type, 234 + handle_level_irq); 235 pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr 236 = PLD_ICUCR_ISMOD01; /* 'L' level sense */ 237 disable_m32700ut_pld_irq(PLD_IRQ_SNDINT);
+1 -8
arch/m68knommu/Kconfig
··· 2 bool 3 default y 4 select HAVE_IDE 5 6 config MMU 7 bool ··· 46 default n 47 48 config GENERIC_HWEIGHT 49 - bool 50 - default y 51 - 52 - config GENERIC_HARDIRQS 53 - bool 54 - default y 55 - 56 - config GENERIC_HARDIRQS_NO__DO_IRQ 57 bool 58 default y 59
··· 2 bool 3 default y 4 select HAVE_IDE 5 + select HAVE_GENERIC_HARDIRQS 6 7 config MMU 8 bool ··· 45 default n 46 47 config GENERIC_HWEIGHT 48 bool 49 default y 50
+2 -9
arch/microblaze/Kconfig
··· 15 select TRACING_SUPPORT 16 select OF 17 select OF_EARLY_FLATTREE 18 19 config SWAP 20 def_bool n ··· 39 config GENERIC_HWEIGHT 40 def_bool y 41 42 - config GENERIC_HARDIRQS 43 - def_bool y 44 - 45 - config GENERIC_IRQ_PROBE 46 - def_bool y 47 - 48 config GENERIC_CALIBRATE_DELAY 49 def_bool y 50 ··· 46 def_bool n 47 48 config GENERIC_CLOCKEVENTS 49 - def_bool y 50 - 51 - config GENERIC_HARDIRQS_NO__DO_IRQ 52 def_bool y 53 54 config GENERIC_GPIO
··· 15 select TRACING_SUPPORT 16 select OF 17 select OF_EARLY_FLATTREE 18 + select HAVE_GENERIC_HARDIRQS 19 + select GENERIC_IRQ_PROBE 20 21 config SWAP 22 def_bool n ··· 37 config GENERIC_HWEIGHT 38 def_bool y 39 40 config GENERIC_CALIBRATE_DELAY 41 def_bool y 42 ··· 50 def_bool n 51 52 config GENERIC_CLOCKEVENTS 53 def_bool y 54 55 config GENERIC_GPIO
-3
arch/mips/Kconfig
··· 793 bool 794 default y 795 796 - config GENERIC_HARDIRQS_NO__DO_IRQ 797 - def_bool y 798 - 799 # 800 # Select some configuration options automatically based on user selections. 801 #
··· 793 bool 794 default y 795 796 # 797 # Select some configuration options automatically based on user selections. 798 #
+1 -7
arch/mn10300/Kconfig
··· 1 config MN10300 2 def_bool y 3 select HAVE_OPROFILE 4 5 config AM33_2 6 def_bool n ··· 34 35 config RWSEM_XCHGADD_ALGORITHM 36 bool 37 - 38 - config GENERIC_HARDIRQS_NO__DO_IRQ 39 - def_bool y 40 41 config GENERIC_CALIBRATE_DELAY 42 def_bool y ··· 75 def_bool y 76 77 config ARCH_HAS_ILOG2_U32 78 - def_bool y 79 - 80 - # Use the generic interrupt handling code in kernel/irq/ 81 - config GENERIC_HARDIRQS 82 def_bool y 83 84 config HOTPLUG_CPU
··· 1 config MN10300 2 def_bool y 3 select HAVE_OPROFILE 4 + select GENERIC_HARDIRQS 5 6 config AM33_2 7 def_bool n ··· 33 34 config RWSEM_XCHGADD_ALGORITHM 35 bool 36 37 config GENERIC_CALIBRATE_DELAY 38 def_bool y ··· 77 def_bool y 78 79 config ARCH_HAS_ILOG2_U32 80 def_bool y 81 82 config HOTPLUG_CPU
+4 -14
arch/parisc/Kconfig
··· 12 select HAVE_IRQ_WORK 13 select HAVE_PERF_EVENTS 14 select GENERIC_ATOMIC64 if !64BIT 15 - select GENERIC_HARDIRQS_NO__DO_IRQ 16 help 17 The PA-RISC microprocessor is designed by Hewlett-Packard and used 18 in many of their workstations & servers (HP9000 700 and 800 series, ··· 69 depends on SMP 70 default y 71 72 - config GENERIC_HARDIRQS 73 - def_bool y 74 - 75 - config GENERIC_IRQ_PROBE 76 - def_bool y 77 - 78 config HAVE_LATENCYTOP_SUPPORT 79 def_bool y 80 - 81 - config IRQ_PER_CPU 82 - bool 83 - default y 84 - 85 - config GENERIC_HARDIRQS_NO__DO_IRQ 86 - def_bool y 87 88 # unless you want to implement ACPI on PA-RISC ... ;-) 89 config PM
··· 12 select HAVE_IRQ_WORK 13 select HAVE_PERF_EVENTS 14 select GENERIC_ATOMIC64 if !64BIT 15 + select HAVE_GENERIC_HARDIRQS 16 + select GENERIC_IRQ_PROBE 17 + select IRQ_PER_CPU 18 + 19 help 20 The PA-RISC microprocessor is designed by Hewlett-Packard and used 21 in many of their workstations & servers (HP9000 700 and 800 series, ··· 66 depends on SMP 67 default y 68 69 config HAVE_LATENCYTOP_SUPPORT 70 def_bool y 71 72 # unless you want to implement ACPI on PA-RISC ... ;-) 73 config PM
+3 -25
arch/powerpc/Kconfig
··· 36 config GENERIC_CLOCKEVENTS 37 def_bool y 38 39 - config GENERIC_HARDIRQS 40 - bool 41 - default y 42 - 43 - config GENERIC_HARDIRQS_NO__DO_IRQ 44 - bool 45 - default y 46 - 47 config HAVE_SETUP_PER_CPU_AREA 48 def_bool PPC64 49 50 config NEED_PER_CPU_EMBED_FIRST_CHUNK 51 def_bool PPC64 52 - 53 - config IRQ_PER_CPU 54 - bool 55 - default y 56 57 config NR_IRQS 58 int "Number of virtual interrupt numbers" ··· 131 select HAVE_PERF_EVENTS 132 select HAVE_REGS_AND_STACK_ACCESS_API 133 select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 134 135 config EARLY_PRINTK 136 bool ··· 382 multiple CPUs. Saying N here will route all IRQs to the first 383 CPU. Generally saying Y is safe, although some problems have been 384 reported with SMP Power Macintoshes with this option enabled. 385 - 386 - config SPARSE_IRQ 387 - bool "Support sparse irq numbering" 388 - default n 389 - help 390 - This enables support for sparse irqs. This is useful for distro 391 - kernels that want to define a high CONFIG_NR_CPUS value but still 392 - want to have low kernel memory footprint on smaller machines. 393 - 394 - ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread 395 - out the irq_desc[] array in a more NUMA-friendly way. ) 396 - 397 - If you don't know what to do here, say N. 398 399 config NUMA 400 bool "NUMA support"
··· 36 config GENERIC_CLOCKEVENTS 37 def_bool y 38 39 config HAVE_SETUP_PER_CPU_AREA 40 def_bool PPC64 41 42 config NEED_PER_CPU_EMBED_FIRST_CHUNK 43 def_bool PPC64 44 45 config NR_IRQS 46 int "Number of virtual interrupt numbers" ··· 143 select HAVE_PERF_EVENTS 144 select HAVE_REGS_AND_STACK_ACCESS_API 145 select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 146 + select HAVE_GENERIC_HARDIRQS 147 + select HAVE_SPARSE_IRQ 148 + select IRQ_PER_CPU 149 150 config EARLY_PRINTK 151 bool ··· 391 multiple CPUs. Saying N here will route all IRQs to the first 392 CPU. Generally saying Y is safe, although some problems have been 393 reported with SMP Power Macintoshes with this option enabled. 394 395 config NUMA 396 bool "NUMA support"
+4 -6
arch/score/Kconfig
··· 1 menu "Machine selection" 2 3 choice 4 prompt "System type" 5 default MACH_SPCT6600 ··· 57 config SCHED_NO_NO_OMIT_FRAME_POINTER 58 def_bool y 59 60 - config GENERIC_HARDIRQS_NO__DO_IRQ 61 - def_bool y 62 - 63 config GENERIC_SYSCALL_TABLE 64 def_bool y 65 ··· 67 menu "Kernel type" 68 69 config 32BIT 70 - def_bool y 71 - 72 - config GENERIC_HARDIRQS 73 def_bool y 74 75 config ARCH_FLATMEM_ENABLE
··· 1 menu "Machine selection" 2 3 + config SCORE 4 + def_bool y 5 + select HAVE_GENERIC_HARDIRQS 6 + 7 choice 8 prompt "System type" 9 default MACH_SPCT6600 ··· 53 config SCHED_NO_NO_OMIT_FRAME_POINTER 54 def_bool y 55 56 config GENERIC_SYSCALL_TABLE 57 def_bool y 58 ··· 66 menu "Kernel type" 67 68 config 32BIT 69 def_bool y 70 71 config ARCH_FLATMEM_ENABLE
+1 -8
arch/sparc/Kconfig
··· 50 select RTC_DRV_STARFIRE 51 select HAVE_PERF_EVENTS 52 select PERF_USE_VMALLOC 53 54 config ARCH_DEFCONFIG 55 string ··· 106 def_bool y if SPARC64 107 108 config NEED_PER_CPU_PAGE_FIRST_CHUNK 109 - def_bool y if SPARC64 110 - 111 - config GENERIC_HARDIRQS_NO__DO_IRQ 112 - bool 113 def_bool y if SPARC64 114 115 config MMU ··· 272 Say Y here to experiment with turning CPUs off and on. CPUs 273 can be controlled through /sys/devices/system/cpu/cpu#. 274 Say N if you want to disable CPU hotplug. 275 - 276 - config GENERIC_HARDIRQS 277 - bool 278 - default y if SPARC64 279 280 source "kernel/time/Kconfig" 281
··· 50 select RTC_DRV_STARFIRE 51 select HAVE_PERF_EVENTS 52 select PERF_USE_VMALLOC 53 + select HAVE_GENERIC_HARDIRQS 54 55 config ARCH_DEFCONFIG 56 string ··· 105 def_bool y if SPARC64 106 107 config NEED_PER_CPU_PAGE_FIRST_CHUNK 108 def_bool y if SPARC64 109 110 config MMU ··· 275 Say Y here to experiment with turning CPUs off and on. CPUs 276 can be controlled through /sys/devices/system/cpu/cpu#. 277 Say N if you want to disable CPU hotplug. 278 279 source "kernel/time/Kconfig" 280
+22 -33
arch/tile/Kconfig
··· 1 # For a description of the syntax of this configuration file, 2 # see Documentation/kbuild/config-language.txt. 3 4 config MMU 5 def_bool y 6 7 config GENERIC_CSUM 8 def_bool y 9 - 10 - config GENERIC_HARDIRQS 11 - def_bool y 12 - 13 - config GENERIC_HARDIRQS_NO__DO_IRQ 14 - def_bool y 15 - 16 - config GENERIC_IRQ_PROBE 17 - def_bool y 18 - 19 - config GENERIC_PENDING_IRQ 20 - def_bool y 21 - depends on GENERIC_HARDIRQS && SMP 22 23 config SEMAPHORE_SLEEPERS 24 def_bool y ··· 105 config HVC_TILE 106 select HVC_DRIVER 107 def_bool y 108 - 109 - config TILE 110 - def_bool y 111 - select HAVE_KVM if !TILEGX 112 - select GENERIC_FIND_FIRST_BIT 113 - select GENERIC_FIND_NEXT_BIT 114 - select USE_GENERIC_SMP_HELPERS 115 - select CC_OPTIMIZE_FOR_SIZE 116 - 117 - # FIXME: investigate whether we need/want these options. 118 - # select HAVE_IOREMAP_PROT 119 - # select HAVE_OPTPROBES 120 - # select HAVE_REGS_AND_STACK_ACCESS_API 121 - # select HAVE_HW_BREAKPOINT 122 - # select PERF_EVENTS 123 - # select HAVE_USER_RETURN_NOTIFIER 124 - # config NO_BOOTMEM 125 - # config ARCH_SUPPORTS_DEBUG_PAGEALLOC 126 - # config HUGETLB_PAGE_SIZE_VARIABLE 127 - 128 129 # Please note: TILE-Gx support is not yet finalized; this is 130 # the preliminary support. TILE-Gx drivers are only provided
··· 1 # For a description of the syntax of this configuration file, 2 # see Documentation/kbuild/config-language.txt. 3 4 + config TILE 5 + def_bool y 6 + select HAVE_KVM if !TILEGX 7 + select GENERIC_FIND_FIRST_BIT 8 + select GENERIC_FIND_NEXT_BIT 9 + select USE_GENERIC_SMP_HELPERS 10 + select CC_OPTIMIZE_FOR_SIZE 11 + select HAVE_GENERIC_HARDIRQS 12 + select GENERIC_IRQ_PROBE 13 + select GENERIC_PENDING_IRQ if SMP 14 + 15 + # FIXME: investigate whether we need/want these options. 16 + # select HAVE_IOREMAP_PROT 17 + # select HAVE_OPTPROBES 18 + # select HAVE_REGS_AND_STACK_ACCESS_API 19 + # select HAVE_HW_BREAKPOINT 20 + # select PERF_EVENTS 21 + # select HAVE_USER_RETURN_NOTIFIER 22 + # config NO_BOOTMEM 23 + # config ARCH_SUPPORTS_DEBUG_PAGEALLOC 24 + # config HUGETLB_PAGE_SIZE_VARIABLE 25 + 26 config MMU 27 def_bool y 28 29 config GENERIC_CSUM 30 def_bool y 31 32 config SEMAPHORE_SLEEPERS 33 def_bool y ··· 96 config HVC_TILE 97 select HVC_DRIVER 98 def_bool y 99 100 # Please note: TILE-Gx support is not yet finalized; this is 101 # the preliminary support. TILE-Gx drivers are only provided
+1 -5
arch/um/Kconfig.common
··· 3 option defconfig_list 4 default "arch/$ARCH/defconfig" 5 6 - # UML uses the generic IRQ subsystem 7 - config GENERIC_HARDIRQS 8 - bool 9 - default y 10 - 11 config UML 12 bool 13 default y 14 15 config MMU 16 bool
··· 3 option defconfig_list 4 default "arch/$ARCH/defconfig" 5 6 config UML 7 bool 8 default y 9 + select HAVE_GENERIC_HARDIRQS 10 11 config MMU 12 bool
-3
arch/um/Kconfig.um
··· 120 121 If you don't know what to do, say N. 122 123 - config GENERIC_HARDIRQS_NO__DO_IRQ 124 - def_bool y 125 - 126 config NR_CPUS 127 int "Maximum number of CPUs (2-32)" 128 range 2 32
··· 120 121 If you don't know what to do, say N. 122 123 config NR_CPUS 124 int "Maximum number of CPUs (2-32)" 125 range 2 32
-14
include/linux/irqdesc.h
··· 101 #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) 102 103 /* 104 - * Monolithic do_IRQ implementation. 105 - */ 106 - #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 107 - extern unsigned int __do_IRQ(unsigned int irq); 108 - #endif 109 - 110 - /* 111 * Architectures call this to let the generic IRQ layer 112 * handle an interrupt. If the descriptor is attached to an 113 * irqchip-style controller then we call the ->handle_irq() handler, ··· 108 */ 109 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) 110 { 111 - #ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 112 desc->handle_irq(irq, desc); 113 - #else 114 - if (likely(desc->handle_irq)) 115 - desc->handle_irq(irq, desc); 116 - else 117 - __do_IRQ(irq); 118 - #endif 119 } 120 121 static inline void generic_handle_irq(unsigned int irq)
··· 101 #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) 102 103 /* 104 * Architectures call this to let the generic IRQ layer 105 * handle an interrupt. If the descriptor is attached to an 106 * irqchip-style controller then we call the ->handle_irq() handler, ··· 115 */ 116 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) 117 { 118 desc->handle_irq(irq, desc); 119 } 120 121 static inline void generic_handle_irq(unsigned int irq)
-3
kernel/irq/Kconfig
··· 9 config GENERIC_HARDIRQS 10 def_bool y 11 12 - config GENERIC_HARDIRQS_NO__DO_IRQ 13 - def_bool y 14 - 15 # Select this to disable the deprecated stuff 16 config GENERIC_HARDIRQS_NO_DEPRECATED 17 def_bool n
··· 9 config GENERIC_HARDIRQS 10 def_bool y 11 12 # Select this to disable the deprecated stuff 13 config GENERIC_HARDIRQS_NO_DEPRECATED 14 def_bool n
-111
kernel/irq/handle.c
··· 118 119 return retval; 120 } 121 - 122 - #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 123 - 124 - #ifdef CONFIG_ENABLE_WARN_DEPRECATED 125 - # warning __do_IRQ is deprecated. Please convert to proper flow handlers 126 - #endif 127 - 128 - /** 129 - * __do_IRQ - original all in one highlevel IRQ handler 130 - * @irq: the interrupt number 131 - * 132 - * __do_IRQ handles all normal device IRQ's (the special 133 - * SMP cross-CPU interrupts have their own specific 134 - * handlers). 135 - * 136 - * This is the original x86 implementation which is used for every 137 - * interrupt type. 138 - */ 139 - unsigned int __do_IRQ(unsigned int irq) 140 - { 141 - struct irq_desc *desc = irq_to_desc(irq); 142 - struct irqaction *action; 143 - unsigned int status; 144 - 145 - kstat_incr_irqs_this_cpu(irq, desc); 146 - 147 - if (CHECK_IRQ_PER_CPU(desc->status)) { 148 - irqreturn_t action_ret; 149 - 150 - /* 151 - * No locking required for CPU-local interrupts: 152 - */ 153 - if (desc->irq_data.chip->ack) 154 - desc->irq_data.chip->ack(irq); 155 - if (likely(!(desc->status & IRQ_DISABLED))) { 156 - action_ret = handle_IRQ_event(irq, desc->action); 157 - if (!noirqdebug) 158 - note_interrupt(irq, desc, action_ret); 159 - } 160 - desc->irq_data.chip->end(irq); 161 - return 1; 162 - } 163 - 164 - raw_spin_lock(&desc->lock); 165 - if (desc->irq_data.chip->ack) 166 - desc->irq_data.chip->ack(irq); 167 - /* 168 - * REPLAY is when Linux resends an IRQ that was dropped earlier 169 - * WAITING is used by probe to mark irqs that are being tested 170 - */ 171 - status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING); 172 - status |= IRQ_PENDING; /* we _want_ to handle it */ 173 - 174 - /* 175 - * If the IRQ is disabled for whatever reason, we cannot 176 - * use the action we have. 177 - */ 178 - action = NULL; 179 - if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) { 180 - action = desc->action; 181 - status &= ~IRQ_PENDING; /* we commit to handling */ 182 - status |= IRQ_INPROGRESS; /* we are handling it */ 183 - } 184 - desc->status = status; 185 - 186 - /* 187 - * If there is no IRQ handler or it was disabled, exit early. 188 - * Since we set PENDING, if another processor is handling 189 - * a different instance of this same irq, the other processor 190 - * will take care of it. 191 - */ 192 - if (unlikely(!action)) 193 - goto out; 194 - 195 - /* 196 - * Edge triggered interrupts need to remember 197 - * pending events. 198 - * This applies to any hw interrupts that allow a second 199 - * instance of the same irq to arrive while we are in do_IRQ 200 - * or in the handler. But the code here only handles the _second_ 201 - * instance of the irq, not the third or fourth. So it is mostly 202 - * useful for irq hardware that does not mask cleanly in an 203 - * SMP environment. 204 - */ 205 - for (;;) { 206 - irqreturn_t action_ret; 207 - 208 - raw_spin_unlock(&desc->lock); 209 - 210 - action_ret = handle_IRQ_event(irq, action); 211 - if (!noirqdebug) 212 - note_interrupt(irq, desc, action_ret); 213 - 214 - raw_spin_lock(&desc->lock); 215 - if (likely(!(desc->status & IRQ_PENDING))) 216 - break; 217 - desc->status &= ~IRQ_PENDING; 218 - } 219 - desc->status &= ~IRQ_INPROGRESS; 220 - 221 - out: 222 - /* 223 - * The ->end() handler has to deal with interrupts which got 224 - * disabled while the handler was running. 225 - */ 226 - desc->irq_data.chip->end(irq); 227 - raw_spin_unlock(&desc->lock); 228 - 229 - return 1; 230 - } 231 - #endif
··· 118 119 return retval; 120 }