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: (23 commits) genirq: Expand generic show_interrupts() gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler gpio: Cleanup genirq namespace arm: ep93xx: Add basic interrupt info arm/gpio: Remove three copies of broken and racy debug code xtensa: Use generic show_interrupts() xtensa: Convert genirq namespace xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED xtensa: Convert s6000 gpio irq_chip to new functions xtensa: Convert main irq_chip to new functions um: Use generic show_interrupts() um: Convert genirq namespace m32r: Use generic show_interrupts() m32r: Convert genirq namespace h8300: Use generic show_interrupts() h8300: Convert genirq namespace avr32: Cleanup eic_set_irq_type() avr32: Use generic show_interrupts() avr: Cleanup genirq namespace avr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATED ... Fix up trivial conflict in drivers/gpio/timbgpio.c
This commit is contained in:
		
				commit
				
					
						0dd61be7ec
					
				
			
		
					 40 changed files with 283 additions and 602 deletions
				
			
		|  | @ -360,52 +360,14 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | ||||||
| 	gpio = ep93xx_chip->chip.base; | 	gpio = ep93xx_chip->chip.base; | ||||||
| 	for (i = 0; i < chip->ngpio; i++, gpio++) { | 	for (i = 0; i < chip->ngpio; i++, gpio++) { | ||||||
| 		int is_out = data_dir_reg & (1 << i); | 		int is_out = data_dir_reg & (1 << i); | ||||||
|  | 		int irq = gpio_to_irq(gpio); | ||||||
| 
 | 
 | ||||||
| 		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s", | 		seq_printf(s, " %s%d gpio-%-3d (%-12s) %s %s %s\n", | ||||||
| 				chip->label, i, gpio, | 				chip->label, i, gpio, | ||||||
| 				gpiochip_is_requested(chip, i) ? : "", | 				gpiochip_is_requested(chip, i) ? : "", | ||||||
| 				is_out ? "out" : "in ", | 				is_out ? "out" : "in ", | ||||||
| 				(data_reg & (1 << i)) ? "hi" : "lo"); | 				(data_reg & (1<<  i)) ? "hi" : "lo", | ||||||
| 
 | 				(!is_out && irq>= 0) ? "(interrupt)" : ""); | ||||||
| 		if (!is_out) { |  | ||||||
| 			int irq = gpio_to_irq(gpio); |  | ||||||
| 			struct irq_desc *desc = irq_desc + irq; |  | ||||||
| 
 |  | ||||||
| 			if (irq >= 0 && desc->action) { |  | ||||||
| 				char *trigger; |  | ||||||
| 
 |  | ||||||
| 				switch (desc->status & IRQ_TYPE_SENSE_MASK) { |  | ||||||
| 				case IRQ_TYPE_NONE: |  | ||||||
| 					trigger = "(default)"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_FALLING: |  | ||||||
| 					trigger = "edge-falling"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_RISING: |  | ||||||
| 					trigger = "edge-rising"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_BOTH: |  | ||||||
| 					trigger = "edge-both"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_HIGH: |  | ||||||
| 					trigger = "level-high"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_LOW: |  | ||||||
| 					trigger = "level-low"; |  | ||||||
| 					break; |  | ||||||
| 				default: |  | ||||||
| 					trigger = "?trigger?"; |  | ||||||
| 					break; |  | ||||||
| 				} |  | ||||||
| 
 |  | ||||||
| 				seq_printf(s, " irq-%d %s%s", |  | ||||||
| 						irq, trigger, |  | ||||||
| 						(desc->status & IRQ_WAKEUP) |  | ||||||
| 							? " wakeup" : ""); |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		seq_printf(s, "\n"); |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -832,51 +832,6 @@ static void nmk_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | ||||||
| 				: "?  ", | 				: "?  ", | ||||||
| 			(mode < 0) ? "unknown" : modes[mode], | 			(mode < 0) ? "unknown" : modes[mode], | ||||||
| 			pull ? "pull" : "none"); | 			pull ? "pull" : "none"); | ||||||
| 
 |  | ||||||
| 		if (!is_out) { |  | ||||||
| 			int		irq = gpio_to_irq(gpio); |  | ||||||
| 			struct irq_desc	*desc = irq_to_desc(irq); |  | ||||||
| 
 |  | ||||||
| 			/* This races with request_irq(), set_irq_type(),
 |  | ||||||
| 			 * and set_irq_wake() ... but those are "rare". |  | ||||||
| 			 * |  | ||||||
| 			 * More significantly, trigger type flags aren't |  | ||||||
| 			 * currently maintained by genirq. |  | ||||||
| 			 */ |  | ||||||
| 			if (irq >= 0 && desc->action) { |  | ||||||
| 				char *trigger; |  | ||||||
| 
 |  | ||||||
| 				switch (desc->status & IRQ_TYPE_SENSE_MASK) { |  | ||||||
| 				case IRQ_TYPE_NONE: |  | ||||||
| 					trigger = "(default)"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_FALLING: |  | ||||||
| 					trigger = "edge-falling"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_RISING: |  | ||||||
| 					trigger = "edge-rising"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_BOTH: |  | ||||||
| 					trigger = "edge-both"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_HIGH: |  | ||||||
| 					trigger = "level-high"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_LOW: |  | ||||||
| 					trigger = "level-low"; |  | ||||||
| 					break; |  | ||||||
| 				default: |  | ||||||
| 					trigger = "?trigger?"; |  | ||||||
| 					break; |  | ||||||
| 				} |  | ||||||
| 
 |  | ||||||
| 				seq_printf(s, " irq-%d %s%s", |  | ||||||
| 					irq, trigger, |  | ||||||
| 					(desc->status & IRQ_WAKEUP) |  | ||||||
| 						? " wakeup" : ""); |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		seq_printf(s, "\n"); | 		seq_printf(s, "\n"); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -6,6 +6,11 @@ config AVR32 | ||||||
| 	select HAVE_CLK | 	select HAVE_CLK | ||||||
| 	select HAVE_OPROFILE | 	select HAVE_OPROFILE | ||||||
| 	select HAVE_KPROBES | 	select HAVE_KPROBES | ||||||
|  | 	select HAVE_GENERIC_HARDIRQS | ||||||
|  | 	select GENERIC_IRQ_PROBE | ||||||
|  | 	select HARDIRQS_SW_RESEND | ||||||
|  | 	select GENERIC_IRQ_SHOW | ||||||
|  | 	select GENERIC_HARDIRQS_NO_DEPRECATED | ||||||
| 	help | 	help | ||||||
| 	  AVR32 is a high-performance 32-bit RISC microprocessor core, | 	  AVR32 is a high-performance 32-bit RISC microprocessor core, | ||||||
| 	  designed for cost-sensitive embedded applications, with particular | 	  designed for cost-sensitive embedded applications, with particular | ||||||
|  | @ -17,9 +22,6 @@ config AVR32 | ||||||
| config GENERIC_GPIO | config GENERIC_GPIO | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
| config GENERIC_HARDIRQS |  | ||||||
| 	def_bool y |  | ||||||
| 
 |  | ||||||
| config STACKTRACE_SUPPORT | config STACKTRACE_SUPPORT | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
|  | @ -29,12 +31,6 @@ config LOCKDEP_SUPPORT | ||||||
| config TRACE_IRQFLAGS_SUPPORT | config TRACE_IRQFLAGS_SUPPORT | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
| config HARDIRQS_SW_RESEND |  | ||||||
| 	def_bool y |  | ||||||
| 
 |  | ||||||
| config GENERIC_IRQ_PROBE |  | ||||||
| 	def_bool y |  | ||||||
| 
 |  | ||||||
| config RWSEM_GENERIC_SPINLOCK | config RWSEM_GENERIC_SPINLOCK | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -301,7 +301,7 @@ static int __init mrmt1_init(void) | ||||||
| 	/* Select the Touchscreen interrupt pin mode */ | 	/* Select the Touchscreen interrupt pin mode */ | ||||||
| 	at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), | 	at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), | ||||||
| 			GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); | 			GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); | ||||||
| 	set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING ); | 	irq_set_irq_type(AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING); | ||||||
| 	at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info)); | 	at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info)); | ||||||
| 	spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); | 	spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -322,6 +322,6 @@ static int __init atngw100_arch_init(void) | ||||||
| 	/* set_irq_type() after the arch_initcall for EIC has run, and
 | 	/* set_irq_type() after the arch_initcall for EIC has run, and
 | ||||||
| 	 * before the I2C subsystem could try using this IRQ. | 	 * before the I2C subsystem could try using this IRQ. | ||||||
| 	 */ | 	 */ | ||||||
| 	return set_irq_type(AT32_EXTINT(3), IRQ_TYPE_EDGE_FALLING); | 	return irq_set_irq_type(AT32_EXTINT(3), IRQ_TYPE_EDGE_FALLING); | ||||||
| } | } | ||||||
| arch_initcall(atngw100_arch_init); | arch_initcall(atngw100_arch_init); | ||||||
|  |  | ||||||
|  | @ -26,40 +26,3 @@ void __weak nmi_disable(void) | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #ifdef CONFIG_PROC_FS |  | ||||||
| int show_interrupts(struct seq_file *p, void *v) |  | ||||||
| { |  | ||||||
| 	int i = *(loff_t *)v, cpu; |  | ||||||
| 	struct irqaction *action; |  | ||||||
| 	unsigned long flags; |  | ||||||
| 
 |  | ||||||
| 	if (i == 0) { |  | ||||||
| 		seq_puts(p, "           "); |  | ||||||
| 		for_each_online_cpu(cpu) |  | ||||||
| 			seq_printf(p, "CPU%d       ", cpu); |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	if (i < NR_IRQS) { |  | ||||||
| 		raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |  | ||||||
| 		action = irq_desc[i].action; |  | ||||||
| 		if (!action) |  | ||||||
| 			goto unlock; |  | ||||||
| 
 |  | ||||||
| 		seq_printf(p, "%3d: ", i); |  | ||||||
| 		for_each_online_cpu(cpu) |  | ||||||
| 			seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |  | ||||||
| 		seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-"); |  | ||||||
| 		seq_printf(p, "  %s", action->name); |  | ||||||
| 		for (action = action->next; action; action = action->next) |  | ||||||
| 			seq_printf(p, ", %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 	unlock: |  | ||||||
| 		raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	return 0; |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
|  | @ -61,45 +61,42 @@ struct eic { | ||||||
| static struct eic *nmi_eic; | static struct eic *nmi_eic; | ||||||
| static bool nmi_enabled; | static bool nmi_enabled; | ||||||
| 
 | 
 | ||||||
| static void eic_ack_irq(unsigned int irq) | static void eic_ack_irq(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	struct eic *eic = get_irq_chip_data(irq); | 	struct eic *eic = irq_data_get_irq_chip_data(data); | ||||||
| 	eic_writel(eic, ICR, 1 << (irq - eic->first_irq)); | 	eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void eic_mask_irq(unsigned int irq) | static void eic_mask_irq(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	struct eic *eic = get_irq_chip_data(irq); | 	struct eic *eic = irq_data_get_irq_chip_data(data); | ||||||
| 	eic_writel(eic, IDR, 1 << (irq - eic->first_irq)); | 	eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void eic_mask_ack_irq(unsigned int irq) | static void eic_mask_ack_irq(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	struct eic *eic = get_irq_chip_data(irq); | 	struct eic *eic = irq_data_get_irq_chip_data(data); | ||||||
| 	eic_writel(eic, ICR, 1 << (irq - eic->first_irq)); | 	eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | ||||||
| 	eic_writel(eic, IDR, 1 << (irq - eic->first_irq)); | 	eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void eic_unmask_irq(unsigned int irq) | static void eic_unmask_irq(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	struct eic *eic = get_irq_chip_data(irq); | 	struct eic *eic = irq_data_get_irq_chip_data(data); | ||||||
| 	eic_writel(eic, IER, 1 << (irq - eic->first_irq)); | 	eic_writel(eic, IER, 1 << (d->irq - eic->first_irq)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int eic_set_irq_type(unsigned int irq, unsigned int flow_type) | static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type) | ||||||
| { | { | ||||||
| 	struct eic *eic = get_irq_chip_data(irq); | 	struct eic *eic = irq_data_get_irq_chip_data(data); | ||||||
| 	struct irq_desc *desc; | 	unsigned int irq = d->irq; | ||||||
| 	unsigned int i = irq - eic->first_irq; | 	unsigned int i = irq - eic->first_irq; | ||||||
| 	u32 mode, edge, level; | 	u32 mode, edge, level; | ||||||
| 	int ret = 0; |  | ||||||
| 
 | 
 | ||||||
| 	flow_type &= IRQ_TYPE_SENSE_MASK; | 	flow_type &= IRQ_TYPE_SENSE_MASK; | ||||||
| 	if (flow_type == IRQ_TYPE_NONE) | 	if (flow_type == IRQ_TYPE_NONE) | ||||||
| 		flow_type = IRQ_TYPE_LEVEL_LOW; | 		flow_type = IRQ_TYPE_LEVEL_LOW; | ||||||
| 
 | 
 | ||||||
| 	desc = &irq_desc[irq]; |  | ||||||
| 
 |  | ||||||
| 	mode = eic_readl(eic, MODE); | 	mode = eic_readl(eic, MODE); | ||||||
| 	edge = eic_readl(eic, EDGE); | 	edge = eic_readl(eic, EDGE); | ||||||
| 	level = eic_readl(eic, LEVEL); | 	level = eic_readl(eic, LEVEL); | ||||||
|  | @ -122,39 +119,34 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type) | ||||||
| 		edge &= ~(1 << i); | 		edge &= ~(1 << i); | ||||||
| 		break; | 		break; | ||||||
| 	default: | 	default: | ||||||
| 		ret = -EINVAL; | 		return -EINVAL; | ||||||
| 		break; |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (ret == 0) { | 	eic_writel(eic, MODE, mode); | ||||||
| 		eic_writel(eic, MODE, mode); | 	eic_writel(eic, EDGE, edge); | ||||||
| 		eic_writel(eic, EDGE, edge); | 	eic_writel(eic, LEVEL, level); | ||||||
| 		eic_writel(eic, LEVEL, level); |  | ||||||
| 
 | 
 | ||||||
| 		if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) { | 	irqd_set_trigger_type(d, flow_type); | ||||||
| 			flow_type |= IRQ_LEVEL; | 	if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | ||||||
| 			__set_irq_handler_unlocked(irq, handle_level_irq); | 		__irq_set_handler_locked(irq, handle_level_irq); | ||||||
| 		} else | 	else | ||||||
| 			__set_irq_handler_unlocked(irq, handle_edge_irq); | 		__irq_set_handler_locked(irq, handle_edge_irq); | ||||||
| 		desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |  | ||||||
| 		desc->status |= flow_type; |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	return ret; | 	return IRQ_SET_MASK_OK_NOCOPY; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static struct irq_chip eic_chip = { | static struct irq_chip eic_chip = { | ||||||
| 	.name		= "eic", | 	.name		= "eic", | ||||||
| 	.ack		= eic_ack_irq, | 	.irq_ack	= eic_ack_irq, | ||||||
| 	.mask		= eic_mask_irq, | 	.irq_mask	= eic_mask_irq, | ||||||
| 	.mask_ack	= eic_mask_ack_irq, | 	.irq_mask_ack	= eic_mask_ack_irq, | ||||||
| 	.unmask		= eic_unmask_irq, | 	.irq_unmask	= eic_unmask_irq, | ||||||
| 	.set_type	= eic_set_irq_type, | 	.irq_set_type	= eic_set_irq_type, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) | static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) | ||||||
| { | { | ||||||
| 	struct eic *eic = desc->handler_data; | 	struct eic *eic = irq_desc_get_handler_data(desc); | ||||||
| 	unsigned long status, pending; | 	unsigned long status, pending; | ||||||
| 	unsigned int i; | 	unsigned int i; | ||||||
| 
 | 
 | ||||||
|  | @ -234,13 +226,13 @@ static int __init eic_probe(struct platform_device *pdev) | ||||||
| 	eic->chip = &eic_chip; | 	eic->chip = &eic_chip; | ||||||
| 
 | 
 | ||||||
| 	for (i = 0; i < nr_of_irqs; i++) { | 	for (i = 0; i < nr_of_irqs; i++) { | ||||||
| 		set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, | 		irq_set_chip_and_handler(eic->first_irq + i, &eic_chip, | ||||||
| 					 handle_level_irq); | 					 handle_level_irq); | ||||||
| 		set_irq_chip_data(eic->first_irq + i, eic); | 		irq_set_chip_data(eic->first_irq + i, eic); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	set_irq_chained_handler(int_irq, demux_eic_irq); | 	irq_set_chained_handler(int_irq, demux_eic_irq); | ||||||
| 	set_irq_data(int_irq, eic); | 	irq_set_handler_data(int_irq, eic); | ||||||
| 
 | 
 | ||||||
| 	if (pdev->id == 0) { | 	if (pdev->id == 0) { | ||||||
| 		nmi_eic = eic; | 		nmi_eic = eic; | ||||||
|  |  | ||||||
|  | @ -34,12 +34,12 @@ extern struct platform_device at32_intc0_device; | ||||||
|  * TODO: We may be able to implement mask/unmask by setting IxM flags |  * TODO: We may be able to implement mask/unmask by setting IxM flags | ||||||
|  * in the status register. |  * in the status register. | ||||||
|  */ |  */ | ||||||
| static void intc_mask_irq(unsigned int irq) | static void intc_mask_irq(struct irq_data *d) | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void intc_unmask_irq(unsigned int irq) | static void intc_unmask_irq(struct irq_data *d) | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | @ -47,8 +47,8 @@ static void intc_unmask_irq(unsigned int irq) | ||||||
| static struct intc intc0 = { | static struct intc intc0 = { | ||||||
| 	.chip = { | 	.chip = { | ||||||
| 		.name		= "intc", | 		.name		= "intc", | ||||||
| 		.mask		= intc_mask_irq, | 		.irq_mask	= intc_mask_irq, | ||||||
| 		.unmask		= intc_unmask_irq, | 		.irq_unmask	= intc_unmask_irq, | ||||||
| 	}, | 	}, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -57,7 +57,6 @@ static struct intc intc0 = { | ||||||
|  */ |  */ | ||||||
| asmlinkage void do_IRQ(int level, struct pt_regs *regs) | asmlinkage void do_IRQ(int level, struct pt_regs *regs) | ||||||
| { | { | ||||||
| 	struct irq_desc *desc; |  | ||||||
| 	struct pt_regs *old_regs; | 	struct pt_regs *old_regs; | ||||||
| 	unsigned int irq; | 	unsigned int irq; | ||||||
| 	unsigned long status_reg; | 	unsigned long status_reg; | ||||||
|  | @ -69,8 +68,7 @@ asmlinkage void do_IRQ(int level, struct pt_regs *regs) | ||||||
| 	irq_enter(); | 	irq_enter(); | ||||||
| 
 | 
 | ||||||
| 	irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); | 	irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); | ||||||
| 	desc = irq_desc + irq; | 	generic_handle_irq(irq); | ||||||
| 	desc->handle_irq(irq, desc); |  | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * Clear all interrupt level masks so that we may handle | 	 * Clear all interrupt level masks so that we may handle | ||||||
|  | @ -128,7 +126,7 @@ void __init init_IRQ(void) | ||||||
| 		intc_writel(&intc0, INTPR0 + 4 * i, offset); | 		intc_writel(&intc0, INTPR0 + 4 * i, offset); | ||||||
| 		readback = intc_readl(&intc0, INTPR0 + 4 * i); | 		readback = intc_readl(&intc0, INTPR0 + 4 * i); | ||||||
| 		if (readback == offset) | 		if (readback == offset) | ||||||
| 			set_irq_chip_and_handler(i, &intc0.chip, | 			irq_set_chip_and_handler(i, &intc0.chip, | ||||||
| 						 handle_simple_irq); | 						 handle_simple_irq); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -249,23 +249,23 @@ static void gpio_set(struct gpio_chip *chip, unsigned offset, int value) | ||||||
| 
 | 
 | ||||||
| /* GPIO IRQ support */ | /* GPIO IRQ support */ | ||||||
| 
 | 
 | ||||||
| static void gpio_irq_mask(unsigned irq) | static void gpio_irq_mask(struct irq_data *d) | ||||||
| { | { | ||||||
| 	unsigned		gpio = irq_to_gpio(irq); | 	unsigned		gpio = irq_to_gpio(d->irq); | ||||||
| 	struct pio_device	*pio = &pio_dev[gpio >> 5]; | 	struct pio_device	*pio = &pio_dev[gpio >> 5]; | ||||||
| 
 | 
 | ||||||
| 	pio_writel(pio, IDR, 1 << (gpio & 0x1f)); | 	pio_writel(pio, IDR, 1 << (gpio & 0x1f)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void gpio_irq_unmask(unsigned irq) | static void gpio_irq_unmask(struct irq_data *d)) | ||||||
| { | { | ||||||
| 	unsigned		gpio = irq_to_gpio(irq); | 	unsigned		gpio = irq_to_gpio(d->irq); | ||||||
| 	struct pio_device	*pio = &pio_dev[gpio >> 5]; | 	struct pio_device	*pio = &pio_dev[gpio >> 5]; | ||||||
| 
 | 
 | ||||||
| 	pio_writel(pio, IER, 1 << (gpio & 0x1f)); | 	pio_writel(pio, IER, 1 << (gpio & 0x1f)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int gpio_irq_type(unsigned irq, unsigned type) | static int gpio_irq_type(struct irq_data *d, unsigned type) | ||||||
| { | { | ||||||
| 	if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE) | 	if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE) | ||||||
| 		return -EINVAL; | 		return -EINVAL; | ||||||
|  | @ -275,20 +275,19 @@ static int gpio_irq_type(unsigned irq, unsigned type) | ||||||
| 
 | 
 | ||||||
| static struct irq_chip gpio_irqchip = { | static struct irq_chip gpio_irqchip = { | ||||||
| 	.name		= "gpio", | 	.name		= "gpio", | ||||||
| 	.mask		= gpio_irq_mask, | 	.irq_mask	= gpio_irq_mask, | ||||||
| 	.unmask		= gpio_irq_unmask, | 	.irq_unmask	= gpio_irq_unmask, | ||||||
| 	.set_type	= gpio_irq_type, | 	.irq_set_type	= gpio_irq_type, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | ||||||
| { | { | ||||||
| 	struct pio_device	*pio = get_irq_chip_data(irq); | 	struct pio_device	*pio = get_irq_desc_chip_data(desc); | ||||||
| 	unsigned		gpio_irq; | 	unsigned		gpio_irq; | ||||||
| 
 | 
 | ||||||
| 	gpio_irq = (unsigned) get_irq_data(irq); | 	gpio_irq = (unsigned) irq_get_handler_data(irq); | ||||||
| 	for (;;) { | 	for (;;) { | ||||||
| 		u32		isr; | 		u32		isr; | ||||||
| 		struct irq_desc	*d; |  | ||||||
| 
 | 
 | ||||||
| 		/* ack pending GPIO interrupts */ | 		/* ack pending GPIO interrupts */ | ||||||
| 		isr = pio_readl(pio, ISR) & pio_readl(pio, IMR); | 		isr = pio_readl(pio, ISR) & pio_readl(pio, IMR); | ||||||
|  | @ -301,9 +300,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | ||||||
| 			isr &= ~(1 << i); | 			isr &= ~(1 << i); | ||||||
| 
 | 
 | ||||||
| 			i += gpio_irq; | 			i += gpio_irq; | ||||||
| 			d = &irq_desc[i]; | 			generic_handle_irq(i); | ||||||
| 
 |  | ||||||
| 			d->handle_irq(i, d); |  | ||||||
| 		} while (isr); | 		} while (isr); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | @ -313,16 +310,16 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq) | ||||||
| { | { | ||||||
| 	unsigned	i; | 	unsigned	i; | ||||||
| 
 | 
 | ||||||
| 	set_irq_chip_data(irq, pio); | 	irq_set_chip_data(irq, pio); | ||||||
| 	set_irq_data(irq, (void *) gpio_irq); | 	irq_set_handler_data(irq, (void *)gpio_irq); | ||||||
| 
 | 
 | ||||||
| 	for (i = 0; i < 32; i++, gpio_irq++) { | 	for (i = 0; i < 32; i++, gpio_irq++) { | ||||||
| 		set_irq_chip_data(gpio_irq, pio); | 		irq_set_chip_data(gpio_irq, pio); | ||||||
| 		set_irq_chip_and_handler(gpio_irq, &gpio_irqchip, | 		irq_set_chip_and_handler(gpio_irq, &gpio_irqchip, | ||||||
| 				handle_simple_irq); | 					 handle_simple_irq); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	set_irq_chained_handler(irq, gpio_irq_handler); | 	irq_set_chained_handler(irq, gpio_irq_handler); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*--------------------------------------------------------------------------*/ | /*--------------------------------------------------------------------------*/ | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ config H8300 | ||||||
| 	select HAVE_IDE | 	select HAVE_IDE | ||||||
| 	select HAVE_GENERIC_HARDIRQS | 	select HAVE_GENERIC_HARDIRQS | ||||||
| 	select GENERIC_HARDIRQS_NO_DEPRECATED | 	select GENERIC_HARDIRQS_NO_DEPRECATED | ||||||
|  | 	select GENERIC_IRQ_SHOW | ||||||
| 
 | 
 | ||||||
| config SYMBOL_PREFIX | config SYMBOL_PREFIX | ||||||
| 	string | 	string | ||||||
|  |  | ||||||
|  | @ -155,7 +155,7 @@ void __init init_IRQ(void) | ||||||
| 	setup_vector(); | 	setup_vector(); | ||||||
| 
 | 
 | ||||||
| 	for (c = 0; c < NR_IRQS; c++) | 	for (c = 0; c < NR_IRQS; c++) | ||||||
| 		set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); | 		irq_set_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| asmlinkage void do_IRQ(int irq) | asmlinkage void do_IRQ(int irq) | ||||||
|  | @ -164,34 +164,3 @@ asmlinkage void do_IRQ(int irq) | ||||||
| 	generic_handle_irq(irq); | 	generic_handle_irq(irq); | ||||||
| 	irq_exit(); | 	irq_exit(); | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #if defined(CONFIG_PROC_FS) |  | ||||||
| int show_interrupts(struct seq_file *p, void *v) |  | ||||||
| { |  | ||||||
| 	int i = *(loff_t *) v; |  | ||||||
| 	struct irqaction * action; |  | ||||||
| 	unsigned long flags; |  | ||||||
| 
 |  | ||||||
| 	if (i == 0) |  | ||||||
| 		seq_puts(p, "           CPU0"); |  | ||||||
| 
 |  | ||||||
| 	if (i < NR_IRQS) { |  | ||||||
| 		raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |  | ||||||
| 		action = irq_desc[i].action; |  | ||||||
| 		if (!action) |  | ||||||
| 			goto unlock; |  | ||||||
| 		seq_printf(p, "%3d: ",i); |  | ||||||
| 		seq_printf(p, "%10u ", kstat_irqs(i)); |  | ||||||
| 		seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); |  | ||||||
| 		seq_printf(p, "-%-8s", irq_desc[i].name); |  | ||||||
| 		seq_printf(p, "  %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		for (action=action->next; action; action = action->next) |  | ||||||
| 			seq_printf(p, ", %s", action->name); |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| unlock: |  | ||||||
| 		raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |  | ||||||
| 	} |  | ||||||
| 	return 0; |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
|  | @ -10,6 +10,7 @@ config M32R | ||||||
| 	select HAVE_GENERIC_HARDIRQS | 	select HAVE_GENERIC_HARDIRQS | ||||||
| 	select GENERIC_HARDIRQS_NO_DEPRECATED | 	select GENERIC_HARDIRQS_NO_DEPRECATED | ||||||
| 	select GENERIC_IRQ_PROBE | 	select GENERIC_IRQ_PROBE | ||||||
|  | 	select GENERIC_IRQ_SHOW | ||||||
| 
 | 
 | ||||||
| config SBUS | config SBUS | ||||||
| 	bool | 	bool | ||||||
|  |  | ||||||
|  | @ -18,54 +18,9 @@ | ||||||
| 
 | 
 | ||||||
| #include <linux/kernel_stat.h> | #include <linux/kernel_stat.h> | ||||||
| #include <linux/interrupt.h> | #include <linux/interrupt.h> | ||||||
| #include <linux/seq_file.h> |  | ||||||
| #include <linux/module.h> | #include <linux/module.h> | ||||||
| #include <asm/uaccess.h> | #include <asm/uaccess.h> | ||||||
| 
 | 
 | ||||||
| /*
 |  | ||||||
|  * Generic, controller-independent functions: |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| int show_interrupts(struct seq_file *p, void *v) |  | ||||||
| { |  | ||||||
| 	int i = *(loff_t *) v, j; |  | ||||||
| 	struct irqaction * action; |  | ||||||
| 	unsigned long flags; |  | ||||||
| 
 |  | ||||||
| 	if (i == 0) { |  | ||||||
| 		seq_printf(p, "           "); |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "CPU%d       ",j); |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	if (i < NR_IRQS) { |  | ||||||
| 		struct irq_desc *desc = irq_to_desc(i); |  | ||||||
| 
 |  | ||||||
| 		raw_spin_lock_irqsave(&desc->lock, flags); |  | ||||||
| 		action = desc->action; |  | ||||||
| 		if (!action) |  | ||||||
| 			goto skip; |  | ||||||
| 		seq_printf(p, "%3d: ",i); |  | ||||||
| #ifndef CONFIG_SMP |  | ||||||
| 		seq_printf(p, "%10u ", kstat_irqs(i)); |  | ||||||
| #else |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |  | ||||||
| #endif |  | ||||||
| 		seq_printf(p, " %14s", desc->irq_data.chip->name); |  | ||||||
| 		seq_printf(p, "  %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		for (action=action->next; action; action = action->next) |  | ||||||
| 			seq_printf(p, ", %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| skip: |  | ||||||
| 		raw_spin_unlock_irqrestore(&desc->lock, flags); |  | ||||||
| 	} |  | ||||||
| 	return 0; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /*
 | /*
 | ||||||
|  * do_IRQ handles all normal device IRQs (the special |  * do_IRQ handles all normal device IRQs (the special | ||||||
|  * SMP cross-CPU interrupts have their own specific |  * SMP cross-CPU interrupts have their own specific | ||||||
|  |  | ||||||
|  | @ -76,7 +76,7 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_SMC91X) | #if defined(CONFIG_SMC91X) | ||||||
| 	/* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ | 	/* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	/* "H" level sense */ | 	/* "H" level sense */ | ||||||
| 	cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; | 	cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; | ||||||
|  | @ -84,20 +84,20 @@ void __init init_IRQ(void) | ||||||
| #endif  /* CONFIG_SMC91X */ | #endif  /* CONFIG_SMC91X */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_m32104ut_irq(M32R_IRQ_MFT2); | 	disable_m32104ut_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_SIO | #ifdef CONFIG_SERIAL_M32R_SIO | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_m32104ut_irq(M32R_IRQ_SIO0_R); | 	disable_m32104ut_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_m32104ut_irq(M32R_IRQ_SIO0_S); | 	disable_m32104ut_irq(M32R_IRQ_SIO0_S); | ||||||
|  |  | ||||||
|  | @ -259,76 +259,76 @@ void __init init_IRQ(void) | ||||||
| { | { | ||||||
| #if defined(CONFIG_SMC91X) | #if defined(CONFIG_SMC91X) | ||||||
| 	/* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ | 	/* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ | ||||||
| 	set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, | 	irq_set_chip_and_handler(M32700UT_LAN_IRQ_LAN, | ||||||
| 				 &m32700ut_lanpld_irq_type, handle_level_irq); | 				 &m32700ut_lanpld_irq_type, handle_level_irq); | ||||||
| 	lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* "H" edge sense */ | 	lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* "H" edge sense */ | ||||||
| 	disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); | 	disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); | ||||||
| #endif  /* CONFIG_SMC91X */ | #endif  /* CONFIG_SMC91X */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_MFT2); | 	disable_m32700ut_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0 : receive */ | 	/* SIO0 : receive */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_SIO0_R); | 	disable_m32700ut_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0 : send */ | 	/* SIO0 : send */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_SIO0_S); | 	disable_m32700ut_irq(M32R_IRQ_SIO0_S); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1 : receive */ | 	/* SIO1 : receive */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_SIO1_R); | 	disable_m32700ut_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1 : send */ | 	/* SIO1 : send */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_SIO1_S); | 	disable_m32700ut_irq(M32R_IRQ_SIO1_S); | ||||||
| 
 | 
 | ||||||
| 	/* DMA1 : */ | 	/* DMA1 : */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_DMA1].icucr = 0; | 	icu_data[M32R_IRQ_DMA1].icucr = 0; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_DMA1); | 	disable_m32700ut_irq(M32R_IRQ_DMA1); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_PLDSIO | #ifdef CONFIG_SERIAL_M32R_PLDSIO | ||||||
| 	/* INT#1: SIO0 Receive on PLD */ | 	/* INT#1: SIO0 Receive on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); | 	disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: SIO0 Send on PLD */ | 	/* INT#1: SIO0 Send on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); | 	disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); | ||||||
| #endif  /* CONFIG_SERIAL_M32R_PLDSIO */ | #endif  /* CONFIG_SERIAL_M32R_PLDSIO */ | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC IREQ on PLD */ | 	/* INT#1: CFC IREQ on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); | 	disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC Insert on PLD */ | 	/* INT#1: CFC Insert on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00;	/* 'L' edge sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00;	/* 'L' edge sense */ | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); | 	disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC Eject on PLD */ | 	/* INT#1: CFC Eject on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* 'H' edge sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* 'H' edge sense */ | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); | 	disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); | ||||||
|  | @ -349,7 +349,7 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_USB) | #if defined(CONFIG_USB) | ||||||
| 	outw(USBCR_OTGS, USBCR); 	/* USBCR: non-OTG */ | 	outw(USBCR_OTGS, USBCR); 	/* USBCR: non-OTG */ | ||||||
| 	set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, | 	irq_set_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, | ||||||
| 				 &m32700ut_lcdpld_irq_type, handle_level_irq); | 				 &m32700ut_lcdpld_irq_type, handle_level_irq); | ||||||
| 
 | 
 | ||||||
| 	lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */ | 	lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */ | ||||||
|  | @ -366,7 +366,7 @@ void __init init_IRQ(void) | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * INT3# is used for AR | 	 * INT3# is used for AR | ||||||
| 	 */ | 	 */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_m32700ut_irq(M32R_IRQ_INT3); | 	disable_m32700ut_irq(M32R_IRQ_INT3); | ||||||
|  |  | ||||||
|  | @ -75,39 +75,39 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NE2000 | #ifdef CONFIG_NE2000 | ||||||
| 	/* INT0 : LAN controller (RTL8019AS) */ | 	/* INT0 : LAN controller (RTL8019AS) */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; | 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; | ||||||
| 	disable_mappi_irq(M32R_IRQ_INT0); | 	disable_mappi_irq(M32R_IRQ_INT0); | ||||||
| #endif /* CONFIG_M32R_NE2000 */ | #endif /* CONFIG_M32R_NE2000 */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_mappi_irq(M32R_IRQ_MFT2); | 	disable_mappi_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_SIO | #ifdef CONFIG_SERIAL_M32R_SIO | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO0_R); | 	disable_mappi_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO0_S); | 	disable_mappi_irq(M32R_IRQ_SIO0_S); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_R : uart receive data */ | 	/* SIO1_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO1_R); | 	disable_mappi_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_S : uart send data */ | 	/* SIO1_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO1_S); | 	disable_mappi_irq(M32R_IRQ_SIO1_S); | ||||||
|  | @ -115,13 +115,13 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_M32R_PCC) | #if defined(CONFIG_M32R_PCC) | ||||||
| 	/* INT1 : pccard0 interrupt */ | 	/* INT1 : pccard0 interrupt */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | ||||||
| 	disable_mappi_irq(M32R_IRQ_INT1); | 	disable_mappi_irq(M32R_IRQ_INT1); | ||||||
| 
 | 
 | ||||||
| 	/* INT2 : pccard1 interrupt */ | 	/* INT2 : pccard1 interrupt */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 	icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | ||||||
| 	disable_mappi_irq(M32R_IRQ_INT2); | 	disable_mappi_irq(M32R_IRQ_INT2); | ||||||
|  |  | ||||||
|  | @ -76,38 +76,38 @@ void __init init_IRQ(void) | ||||||
| { | { | ||||||
| #if defined(CONFIG_SMC91X) | #if defined(CONFIG_SMC91X) | ||||||
| 	/* INT0 : LAN controller (SMC91111) */ | 	/* INT0 : LAN controller (SMC91111) */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_INT0); | 	disable_mappi2_irq(M32R_IRQ_INT0); | ||||||
| #endif  /* CONFIG_SMC91X */ | #endif  /* CONFIG_SMC91X */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_MFT2); | 	disable_mappi2_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_SIO | #ifdef CONFIG_SERIAL_M32R_SIO | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_SIO0_R); | 	disable_mappi2_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_SIO0_S); | 	disable_mappi2_irq(M32R_IRQ_SIO0_S); | ||||||
| 	/* SIO1_R : uart receive data */ | 	/* SIO1_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_SIO1_R); | 	disable_mappi2_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_S : uart send data */ | 	/* SIO1_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_SIO1_S); | 	disable_mappi2_irq(M32R_IRQ_SIO1_S); | ||||||
|  | @ -115,27 +115,27 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_USB) | #if defined(CONFIG_USB) | ||||||
| 	/* INT1 : USB Host controller interrupt */ | 	/* INT1 : USB Host controller interrupt */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | ||||||
| 	disable_mappi2_irq(M32R_IRQ_INT1); | 	disable_mappi2_irq(M32R_IRQ_INT1); | ||||||
| #endif /* CONFIG_USB */ | #endif /* CONFIG_USB */ | ||||||
| 
 | 
 | ||||||
| 	/* ICUCR40: CFC IREQ */ | 	/* ICUCR40: CFC IREQ */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 	icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | ||||||
| 	disable_mappi2_irq(PLD_IRQ_CFIREQ); | 	disable_mappi2_irq(PLD_IRQ_CFIREQ); | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_M32R_CFC) | #if defined(CONFIG_M32R_CFC) | ||||||
| 	/* ICUCR41: CFC Insert */ | 	/* ICUCR41: CFC Insert */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 	icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | ||||||
| 	disable_mappi2_irq(PLD_IRQ_CFC_INSERT); | 	disable_mappi2_irq(PLD_IRQ_CFC_INSERT); | ||||||
| 
 | 
 | ||||||
| 	/* ICUCR42: CFC Eject */ | 	/* ICUCR42: CFC Eject */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_mappi2_irq(PLD_IRQ_CFC_EJECT); | 	disable_mappi2_irq(PLD_IRQ_CFC_EJECT); | ||||||
|  |  | ||||||
|  | @ -75,38 +75,38 @@ void __init init_IRQ(void) | ||||||
| { | { | ||||||
| #if defined(CONFIG_SMC91X) | #if defined(CONFIG_SMC91X) | ||||||
| 	/* INT0 : LAN controller (SMC91111) */ | 	/* INT0 : LAN controller (SMC91111) */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_INT0); | 	disable_mappi3_irq(M32R_IRQ_INT0); | ||||||
| #endif  /* CONFIG_SMC91X */ | #endif  /* CONFIG_SMC91X */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_MFT2); | 	disable_mappi3_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_SIO | #ifdef CONFIG_SERIAL_M32R_SIO | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_SIO0_R); | 	disable_mappi3_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_SIO0_S); | 	disable_mappi3_irq(M32R_IRQ_SIO0_S); | ||||||
| 	/* SIO1_R : uart receive data */ | 	/* SIO1_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_SIO1_R); | 	disable_mappi3_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_S : uart send data */ | 	/* SIO1_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_SIO1_S); | 	disable_mappi3_irq(M32R_IRQ_SIO1_S); | ||||||
|  | @ -114,21 +114,21 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_USB) | #if defined(CONFIG_USB) | ||||||
| 	/* INT1 : USB Host controller interrupt */ | 	/* INT1 : USB Host controller interrupt */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | ||||||
| 	disable_mappi3_irq(M32R_IRQ_INT1); | 	disable_mappi3_irq(M32R_IRQ_INT1); | ||||||
| #endif /* CONFIG_USB */ | #endif /* CONFIG_USB */ | ||||||
| 
 | 
 | ||||||
| 	/* CFC IREQ */ | 	/* CFC IREQ */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 	icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | ||||||
| 	disable_mappi3_irq(PLD_IRQ_CFIREQ); | 	disable_mappi3_irq(PLD_IRQ_CFIREQ); | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_M32R_CFC) | #if defined(CONFIG_M32R_CFC) | ||||||
| 	/* ICUCR41: CFC Insert & eject */ | 	/* ICUCR41: CFC Insert & eject */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 	icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | ||||||
| 	disable_mappi3_irq(PLD_IRQ_CFC_INSERT); | 	disable_mappi3_irq(PLD_IRQ_CFC_INSERT); | ||||||
|  | @ -136,7 +136,7 @@ void __init init_IRQ(void) | ||||||
| #endif /* CONFIG_M32R_CFC */ | #endif /* CONFIG_M32R_CFC */ | ||||||
| 
 | 
 | ||||||
| 	/* IDE IREQ */ | 	/* IDE IREQ */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_mappi3_irq(PLD_IRQ_IDEIREQ); | 	disable_mappi3_irq(PLD_IRQ_IDEIREQ); | ||||||
|  |  | ||||||
|  | @ -74,39 +74,39 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_NE2000 | #ifdef CONFIG_NE2000 | ||||||
| 	/* INT3 : LAN controller (RTL8019AS) */ | 	/* INT3 : LAN controller (RTL8019AS) */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_INT3); | 	disable_oaks32r_irq(M32R_IRQ_INT3); | ||||||
| #endif /* CONFIG_M32R_NE2000 */ | #endif /* CONFIG_M32R_NE2000 */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_MFT2); | 	disable_oaks32r_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_SIO | #ifdef CONFIG_SERIAL_M32R_SIO | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_SIO0_R); | 	disable_oaks32r_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_SIO0_S); | 	disable_oaks32r_irq(M32R_IRQ_SIO0_S); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_R : uart receive data */ | 	/* SIO1_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_SIO1_R); | 	disable_oaks32r_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_S : uart send data */ | 	/* SIO1_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_oaks32r_irq(M32R_IRQ_SIO1_S); | 	disable_oaks32r_irq(M32R_IRQ_SIO1_S); | ||||||
|  |  | ||||||
|  | @ -259,76 +259,76 @@ void __init init_IRQ(void) | ||||||
| { | { | ||||||
| #if defined(CONFIG_SMC91X) | #if defined(CONFIG_SMC91X) | ||||||
| 	/* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | 	/* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | ||||||
| 	set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, | 	irq_set_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* "H" edge sense */ | 	lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* "H" edge sense */ | ||||||
| 	disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); | 	disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); | ||||||
| #endif  /* CONFIG_SMC91X */ | #endif  /* CONFIG_SMC91X */ | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_opsput_irq(M32R_IRQ_MFT2); | 	disable_opsput_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0 : receive */ | 	/* SIO0 : receive */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_opsput_irq(M32R_IRQ_SIO0_R); | 	disable_opsput_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0 : send */ | 	/* SIO0 : send */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_opsput_irq(M32R_IRQ_SIO0_S); | 	disable_opsput_irq(M32R_IRQ_SIO0_S); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1 : receive */ | 	/* SIO1 : receive */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_opsput_irq(M32R_IRQ_SIO1_R); | 	disable_opsput_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1 : send */ | 	/* SIO1 : send */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_opsput_irq(M32R_IRQ_SIO1_S); | 	disable_opsput_irq(M32R_IRQ_SIO1_S); | ||||||
| 
 | 
 | ||||||
| 	/* DMA1 : */ | 	/* DMA1 : */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_DMA1].icucr = 0; | 	icu_data[M32R_IRQ_DMA1].icucr = 0; | ||||||
| 	disable_opsput_irq(M32R_IRQ_DMA1); | 	disable_opsput_irq(M32R_IRQ_DMA1); | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_SERIAL_M32R_PLDSIO | #ifdef CONFIG_SERIAL_M32R_PLDSIO | ||||||
| 	/* INT#1: SIO0 Receive on PLD */ | 	/* INT#1: SIO0 Receive on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | ||||||
| 	disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); | 	disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: SIO0 Send on PLD */ | 	/* INT#1: SIO0 Send on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 	pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | ||||||
| 	disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 	disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | ||||||
| #endif  /* CONFIG_SERIAL_M32R_PLDSIO */ | #endif  /* CONFIG_SERIAL_M32R_PLDSIO */ | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC IREQ on PLD */ | 	/* INT#1: CFC IREQ on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | ||||||
| 	disable_opsput_pld_irq(PLD_IRQ_CFIREQ); | 	disable_opsput_pld_irq(PLD_IRQ_CFIREQ); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC Insert on PLD */ | 	/* INT#1: CFC Insert on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00;	/* 'L' edge sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00;	/* 'L' edge sense */ | ||||||
| 	disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); | 	disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); | ||||||
| 
 | 
 | ||||||
| 	/* INT#1: CFC Eject on PLD */ | 	/* INT#1: CFC Eject on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* 'H' edge sense */ | 	pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02;	/* 'H' edge sense */ | ||||||
| 	disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | 	disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | ||||||
|  | @ -349,7 +349,7 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_USB) | #if defined(CONFIG_USB) | ||||||
| 	outw(USBCR_OTGS, USBCR);	/* USBCR: non-OTG */ | 	outw(USBCR_OTGS, USBCR);	/* USBCR: non-OTG */ | ||||||
| 	set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, | 	irq_set_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, | ||||||
| 				 &opsput_lcdpld_irq_type, handle_level_irq); | 				 &opsput_lcdpld_irq_type, handle_level_irq); | ||||||
| 	lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */ | 	lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01;	/* "L" level sense */ | ||||||
| 	disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); | 	disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); | ||||||
|  | @ -365,7 +365,7 @@ void __init init_IRQ(void) | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * INT3# is used for AR | 	 * INT3# is used for AR | ||||||
| 	 */ | 	 */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 	icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | ||||||
| 	disable_opsput_irq(M32R_IRQ_INT3); | 	disable_opsput_irq(M32R_IRQ_INT3); | ||||||
|  |  | ||||||
|  | @ -138,32 +138,32 @@ void __init init_IRQ(void) | ||||||
| 		once++; | 		once++; | ||||||
| 
 | 
 | ||||||
| 	/* MFT2 : system timer */ | 	/* MFT2 : system timer */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||||||
| 	disable_mappi_irq(M32R_IRQ_MFT2); | 	disable_mappi_irq(M32R_IRQ_MFT2); | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_SERIAL_M32R_SIO) | #if defined(CONFIG_SERIAL_M32R_SIO) | ||||||
| 	/* SIO0_R : uart receive data */ | 	/* SIO0_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_R].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO0_R); | 	disable_mappi_irq(M32R_IRQ_SIO0_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO0_S : uart send data */ | 	/* SIO0_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO0_S].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO0_S); | 	disable_mappi_irq(M32R_IRQ_SIO0_S); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_R : uart receive data */ | 	/* SIO1_R : uart receive data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_R].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO1_R); | 	disable_mappi_irq(M32R_IRQ_SIO1_R); | ||||||
| 
 | 
 | ||||||
| 	/* SIO1_S : uart send data */ | 	/* SIO1_S : uart send data */ | ||||||
| 	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, | 	irq_set_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 	icu_data[M32R_IRQ_SIO1_S].icucr = 0; | ||||||
| 	disable_mappi_irq(M32R_IRQ_SIO1_S); | 	disable_mappi_irq(M32R_IRQ_SIO1_S); | ||||||
|  | @ -171,7 +171,7 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| 	/* INT#67-#71: CFC#0 IREQ on PLD */ | 	/* INT#67-#71: CFC#0 IREQ on PLD */ | ||||||
| 	for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { | 	for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { | ||||||
| 		set_irq_chip_and_handler(PLD_IRQ_CF0 + i, | 		irq_set_chip_and_handler(PLD_IRQ_CF0 + i, | ||||||
| 					 &m32700ut_pld_irq_type, | 					 &m32700ut_pld_irq_type, | ||||||
| 					 handle_level_irq); | 					 handle_level_irq); | ||||||
| 		pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr | 		pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr | ||||||
|  | @ -181,14 +181,14 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | ||||||
| 	/* INT#76: 16552D#0 IREQ on PLD */ | 	/* INT#76: 16552D#0 IREQ on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr | 	pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr | ||||||
| 		= PLD_ICUCR_ISMOD03;	/* 'H' level sense */ | 		= PLD_ICUCR_ISMOD03;	/* 'H' level sense */ | ||||||
| 	disable_m32700ut_pld_irq(PLD_IRQ_UART0); | 	disable_m32700ut_pld_irq(PLD_IRQ_UART0); | ||||||
| 
 | 
 | ||||||
| 	/* INT#77: 16552D#1 IREQ on PLD */ | 	/* INT#77: 16552D#1 IREQ on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr | 	pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr | ||||||
| 		= PLD_ICUCR_ISMOD03;	/* 'H' level sense */ | 		= PLD_ICUCR_ISMOD03;	/* 'H' level sense */ | ||||||
|  | @ -197,7 +197,7 @@ void __init init_IRQ(void) | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) | #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) | ||||||
| 	/* INT#80: AK4524 IREQ on PLD */ | 	/* INT#80: AK4524 IREQ on PLD */ | ||||||
| 	set_irq_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type, | 	irq_set_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type, | ||||||
| 				 handle_level_irq); | 				 handle_level_irq); | ||||||
| 	pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr | 	pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr | ||||||
| 		= PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | 		= PLD_ICUCR_ISMOD01;	/* 'L' level sense */ | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ config UML | ||||||
| 	default y | 	default y | ||||||
| 	select HAVE_GENERIC_HARDIRQS | 	select HAVE_GENERIC_HARDIRQS | ||||||
| 	select GENERIC_HARDIRQS_NO_DEPRECATED | 	select GENERIC_HARDIRQS_NO_DEPRECATED | ||||||
|  | 	select GENERIC_IRQ_SHOW | ||||||
| 
 | 
 | ||||||
| config MMU | config MMU | ||||||
| 	bool | 	bool | ||||||
|  |  | ||||||
|  | @ -17,52 +17,6 @@ | ||||||
| #include "kern_util.h" | #include "kern_util.h" | ||||||
| #include "os.h" | #include "os.h" | ||||||
| 
 | 
 | ||||||
| /*
 |  | ||||||
|  * Generic, controller-independent functions: |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| int show_interrupts(struct seq_file *p, void *v) |  | ||||||
| { |  | ||||||
| 	int i = *(loff_t *) v, j; |  | ||||||
| 	struct irqaction * action; |  | ||||||
| 	unsigned long flags; |  | ||||||
| 
 |  | ||||||
| 	if (i == 0) { |  | ||||||
| 		seq_printf(p, "           "); |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "CPU%d       ",j); |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	if (i < NR_IRQS) { |  | ||||||
| 		struct irq_desc *desc = irq_to_desc(i); |  | ||||||
| 
 |  | ||||||
| 		raw_spin_lock_irqsave(&desc->lock, flags); |  | ||||||
| 		action = desc->action; |  | ||||||
| 		if (!action) |  | ||||||
| 			goto skip; |  | ||||||
| 		seq_printf(p, "%3d: ",i); |  | ||||||
| #ifndef CONFIG_SMP |  | ||||||
| 		seq_printf(p, "%10u ", kstat_irqs(i)); |  | ||||||
| #else |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |  | ||||||
| #endif |  | ||||||
| 		seq_printf(p, " %14s", get_irq_desc_chip(desc)->name); |  | ||||||
| 		seq_printf(p, "  %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		for (action=action->next; action; action = action->next) |  | ||||||
| 			seq_printf(p, ", %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| skip: |  | ||||||
| 		raw_spin_unlock_irqrestore(&desc->lock, flags); |  | ||||||
| 	} else if (i == NR_IRQS) |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 
 |  | ||||||
| 	return 0; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /*
 | /*
 | ||||||
|  * This list is accessed under irq_lock, except in sigio_handler, |  * This list is accessed under irq_lock, except in sigio_handler, | ||||||
|  * where it is safe from being modified.  IRQ handlers won't change it - |  * where it is safe from being modified.  IRQ handlers won't change it - | ||||||
|  | @ -390,11 +344,10 @@ void __init init_IRQ(void) | ||||||
| { | { | ||||||
| 	int i; | 	int i; | ||||||
| 
 | 
 | ||||||
| 	set_irq_chip_and_handler(TIMER_IRQ, &SIGVTALRM_irq_type, handle_edge_irq); | 	irq_set_chip_and_handler(TIMER_IRQ, &SIGVTALRM_irq_type, handle_edge_irq); | ||||||
| 
 | 
 | ||||||
| 	for (i = 1; i < NR_IRQS; i++) { | 	for (i = 1; i < NR_IRQS; i++) | ||||||
| 		set_irq_chip_and_handler(i, &normal_irq_type, handle_edge_irq); | 		irq_set_chip_and_handler(i, &normal_irq_type, handle_edge_irq); | ||||||
| 	} |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,9 @@ config ZONE_DMA | ||||||
| config XTENSA | config XTENSA | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 	select HAVE_IDE | 	select HAVE_IDE | ||||||
|  | 	select HAVE_GENERIC_HARDIRQS | ||||||
|  | 	select GENERIC_IRQ_SHOW | ||||||
|  | 	select GENERIC_HARDIRQS_NO_DEPRECATED | ||||||
| 	help | 	help | ||||||
| 	  Xtensa processors are 32-bit RISC machines designed by Tensilica | 	  Xtensa processors are 32-bit RISC machines designed by Tensilica | ||||||
| 	  primarily for embedded systems.  These processors are both | 	  primarily for embedded systems.  These processors are both | ||||||
|  | @ -27,9 +30,6 @@ config GENERIC_FIND_BIT_LE | ||||||
| config GENERIC_HWEIGHT | config GENERIC_HWEIGHT | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
| config GENERIC_HARDIRQS |  | ||||||
| 	def_bool y |  | ||||||
| 
 |  | ||||||
| config GENERIC_GPIO | config GENERIC_GPIO | ||||||
| 	def_bool y | 	def_bool y | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -35,7 +35,6 @@ atomic_t irq_err_count; | ||||||
| asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | ||||||
| { | { | ||||||
| 	struct pt_regs *old_regs = set_irq_regs(regs); | 	struct pt_regs *old_regs = set_irq_regs(regs); | ||||||
| 	struct irq_desc *desc = irq_desc + irq; |  | ||||||
| 
 | 
 | ||||||
| 	if (irq >= NR_IRQS) { | 	if (irq >= NR_IRQS) { | ||||||
| 		printk(KERN_EMERG "%s: cannot handle IRQ %d\n", | 		printk(KERN_EMERG "%s: cannot handle IRQ %d\n", | ||||||
|  | @ -57,104 +56,69 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | ||||||
| 			       sp - sizeof(struct thread_info)); | 			       sp - sizeof(struct thread_info)); | ||||||
| 	} | 	} | ||||||
| #endif | #endif | ||||||
| 	desc->handle_irq(irq, desc); | 	generic_handle_irq(irq); | ||||||
| 
 | 
 | ||||||
| 	irq_exit(); | 	irq_exit(); | ||||||
| 	set_irq_regs(old_regs); | 	set_irq_regs(old_regs); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | int arch_show_interrupts(struct seq_file *p, int prec) | ||||||
|  * Generic, controller-independent functions: |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| int show_interrupts(struct seq_file *p, void *v) |  | ||||||
| { | { | ||||||
| 	int i = *(loff_t *) v, j; | 	int j; | ||||||
| 	struct irqaction * action; |  | ||||||
| 	unsigned long flags; |  | ||||||
| 
 | 
 | ||||||
| 	if (i == 0) { | 	seq_printf(p, "%*s: ", prec, "NMI"); | ||||||
| 		seq_printf(p, "           "); | 	for_each_online_cpu(j) | ||||||
| 		for_each_online_cpu(j) | 		seq_printf(p, "%10u ", nmi_count(j)); | ||||||
| 			seq_printf(p, "CPU%d       ",j); | 	seq_putc(p, '\n'); | ||||||
| 		seq_putc(p, '\n'); | 	seq_printf(p, "%*s: ", prec, "ERR"); | ||||||
| 	} | 	seq_printf(p, "%10u\n", atomic_read(&irq_err_count)); | ||||||
| 
 |  | ||||||
| 	if (i < NR_IRQS) { |  | ||||||
| 		raw_spin_lock_irqsave(&irq_desc[i].lock, flags); |  | ||||||
| 		action = irq_desc[i].action; |  | ||||||
| 		if (!action) |  | ||||||
| 			goto skip; |  | ||||||
| 		seq_printf(p, "%3d: ",i); |  | ||||||
| #ifndef CONFIG_SMP |  | ||||||
| 		seq_printf(p, "%10u ", kstat_irqs(i)); |  | ||||||
| #else |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |  | ||||||
| #endif |  | ||||||
| 		seq_printf(p, " %14s", irq_desc[i].chip->name); |  | ||||||
| 		seq_printf(p, "  %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		for (action=action->next; action; action = action->next) |  | ||||||
| 			seq_printf(p, ", %s", action->name); |  | ||||||
| 
 |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| skip: |  | ||||||
| 		raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); |  | ||||||
| 	} else if (i == NR_IRQS) { |  | ||||||
| 		seq_printf(p, "NMI: "); |  | ||||||
| 		for_each_online_cpu(j) |  | ||||||
| 			seq_printf(p, "%10u ", nmi_count(j)); |  | ||||||
| 		seq_putc(p, '\n'); |  | ||||||
| 		seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |  | ||||||
| 	} |  | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void xtensa_irq_mask(unsigned int irq) | static void xtensa_irq_mask(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	cached_irq_mask &= ~(1 << irq); | 	cached_irq_mask &= ~(1 << d->irq); | ||||||
| 	set_sr (cached_irq_mask, INTENABLE); | 	set_sr (cached_irq_mask, INTENABLE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void xtensa_irq_unmask(unsigned int irq) | static void xtensa_irq_unmask(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	cached_irq_mask |= 1 << irq; | 	cached_irq_mask |= 1 << d->irq; | ||||||
| 	set_sr (cached_irq_mask, INTENABLE); | 	set_sr (cached_irq_mask, INTENABLE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void xtensa_irq_enable(unsigned int irq) | static void xtensa_irq_enable(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	variant_irq_enable(irq); | 	variant_irq_enable(d->irq); | ||||||
| 	xtensa_irq_unmask(irq); | 	xtensa_irq_unmask(d->irq); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void xtensa_irq_disable(unsigned int irq) | static void xtensa_irq_disable(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	xtensa_irq_mask(irq); | 	xtensa_irq_mask(d->irq); | ||||||
| 	variant_irq_disable(irq); | 	variant_irq_disable(d->irq); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void xtensa_irq_ack(unsigned int irq) | static void xtensa_irq_ack(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	set_sr(1 << irq, INTCLEAR); | 	set_sr(1 << d->irq, INTCLEAR); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int xtensa_irq_retrigger(unsigned int irq) | static int xtensa_irq_retrigger(struct irq_chip *d) | ||||||
| { | { | ||||||
| 	set_sr (1 << irq, INTSET); | 	set_sr (1 << d->irq, INTSET); | ||||||
| 	return 1; | 	return 1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| static struct irq_chip xtensa_irq_chip = { | static struct irq_chip xtensa_irq_chip = { | ||||||
| 	.name		= "xtensa", | 	.name		= "xtensa", | ||||||
| 	.enable		= xtensa_irq_enable, | 	.irq_enable	= xtensa_irq_enable, | ||||||
| 	.disable	= xtensa_irq_disable, | 	.irq_disable	= xtensa_irq_disable, | ||||||
| 	.mask		= xtensa_irq_mask, | 	.irq_mask	= xtensa_irq_mask, | ||||||
| 	.unmask		= xtensa_irq_unmask, | 	.irq_unmask	= xtensa_irq_unmask, | ||||||
| 	.ack		= xtensa_irq_ack, | 	.irq_ack	= xtensa_irq_ack, | ||||||
| 	.retrigger	= xtensa_irq_retrigger, | 	.irq_retrigger	= xtensa_irq_retrigger, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| void __init init_IRQ(void) | void __init init_IRQ(void) | ||||||
|  | @ -165,25 +129,25 @@ void __init init_IRQ(void) | ||||||
| 		int mask = 1 << index; | 		int mask = 1 << index; | ||||||
| 
 | 
 | ||||||
| 		if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) | 		if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) | ||||||
| 			set_irq_chip_and_handler(index, &xtensa_irq_chip, | 			irq_set_chip_and_handler(index, &xtensa_irq_chip, | ||||||
| 						 handle_simple_irq); | 						 handle_simple_irq); | ||||||
| 
 | 
 | ||||||
| 		else if (mask & XCHAL_INTTYPE_MASK_EXTERN_EDGE) | 		else if (mask & XCHAL_INTTYPE_MASK_EXTERN_EDGE) | ||||||
| 			set_irq_chip_and_handler(index, &xtensa_irq_chip, | 			irq_set_chip_and_handler(index, &xtensa_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| 
 | 
 | ||||||
| 		else if (mask & XCHAL_INTTYPE_MASK_EXTERN_LEVEL) | 		else if (mask & XCHAL_INTTYPE_MASK_EXTERN_LEVEL) | ||||||
| 			set_irq_chip_and_handler(index, &xtensa_irq_chip, | 			irq_set_chip_and_handler(index, &xtensa_irq_chip, | ||||||
| 						 handle_level_irq); | 						 handle_level_irq); | ||||||
| 
 | 
 | ||||||
| 		else if (mask & XCHAL_INTTYPE_MASK_TIMER) | 		else if (mask & XCHAL_INTTYPE_MASK_TIMER) | ||||||
| 			set_irq_chip_and_handler(index, &xtensa_irq_chip, | 			irq_set_chip_and_handler(index, &xtensa_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| 
 | 
 | ||||||
| 		else	/* XCHAL_INTTYPE_MASK_WRITE_ERROR */ | 		else	/* XCHAL_INTTYPE_MASK_WRITE_ERROR */ | ||||||
| 			/* XCHAL_INTTYPE_MASK_NMI */ | 			/* XCHAL_INTTYPE_MASK_NMI */ | ||||||
| 
 | 
 | ||||||
| 			set_irq_chip_and_handler(index, &xtensa_irq_chip, | 			irq_set_chip_and_handler(index, &xtensa_irq_chip, | ||||||
| 						 handle_level_irq); | 						 handle_level_irq); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -120,7 +120,7 @@ static int __init prepare_phy_irq(int pin) | ||||||
| 	irq = gpio_to_irq(pin); | 	irq = gpio_to_irq(pin); | ||||||
| 	if (irq < 0) | 	if (irq < 0) | ||||||
| 		goto free; | 		goto free; | ||||||
| 	if (set_irq_type(irq, IRQ_TYPE_LEVEL_LOW) < 0) | 	if (irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW) < 0) | ||||||
| 		goto free; | 		goto free; | ||||||
| 	return irq; | 	return irq; | ||||||
| free: | free: | ||||||
|  |  | ||||||
|  | @ -85,30 +85,29 @@ int s6_gpio_init(u32 afsel) | ||||||
| 	return gpiochip_add(&gpiochip); | 	return gpiochip_add(&gpiochip); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void ack(unsigned int irq) | static void ack(struct irq_data *d) | ||||||
| { | { | ||||||
| 	writeb(1 << (irq - IRQ_BASE), S6_REG_GPIO + S6_GPIO_IC); | 	writeb(1 << (d->irq - IRQ_BASE), S6_REG_GPIO + S6_GPIO_IC); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void mask(unsigned int irq) | static void mask(struct irq_data *d) | ||||||
| { | { | ||||||
| 	u8 r = readb(S6_REG_GPIO + S6_GPIO_IE); | 	u8 r = readb(S6_REG_GPIO + S6_GPIO_IE); | ||||||
| 	r &= ~(1 << (irq - IRQ_BASE)); | 	r &= ~(1 << (d->irq - IRQ_BASE)); | ||||||
| 	writeb(r, S6_REG_GPIO + S6_GPIO_IE); | 	writeb(r, S6_REG_GPIO + S6_GPIO_IE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void unmask(unsigned int irq) | static void unmask(struct irq_data *d) | ||||||
| { | { | ||||||
| 	u8 m = readb(S6_REG_GPIO + S6_GPIO_IE); | 	u8 m = readb(S6_REG_GPIO + S6_GPIO_IE); | ||||||
| 	m |= 1 << (irq - IRQ_BASE); | 	m |= 1 << (d->irq - IRQ_BASE); | ||||||
| 	writeb(m, S6_REG_GPIO + S6_GPIO_IE); | 	writeb(m, S6_REG_GPIO + S6_GPIO_IE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int set_type(unsigned int irq, unsigned int type) | static int set_type(struct irq_data *d, unsigned int type) | ||||||
| { | { | ||||||
| 	const u8 m = 1 << (irq - IRQ_BASE); | 	const u8 m = 1 << (d->irq - IRQ_BASE); | ||||||
| 	irq_flow_handler_t handler; | 	irq_flow_handler_t handler; | ||||||
| 	struct irq_desc *desc; |  | ||||||
| 	u8 reg; | 	u8 reg; | ||||||
| 
 | 
 | ||||||
| 	if (type == IRQ_TYPE_PROBE) { | 	if (type == IRQ_TYPE_PROBE) { | ||||||
|  | @ -129,8 +128,7 @@ static int set_type(unsigned int irq, unsigned int type) | ||||||
| 		handler = handle_edge_irq; | 		handler = handle_edge_irq; | ||||||
| 	} | 	} | ||||||
| 	writeb(reg, S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IS); | 	writeb(reg, S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IS); | ||||||
| 	desc = irq_to_desc(irq); | 	__irq_set_handler_locked(irq, handler); | ||||||
| 	desc->handle_irq = handler; |  | ||||||
| 
 | 
 | ||||||
| 	reg = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IEV); | 	reg = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IEV); | ||||||
| 	if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)) | 	if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)) | ||||||
|  | @ -150,22 +148,23 @@ static int set_type(unsigned int irq, unsigned int type) | ||||||
| 
 | 
 | ||||||
| static struct irq_chip gpioirqs = { | static struct irq_chip gpioirqs = { | ||||||
| 	.name = "GPIO", | 	.name = "GPIO", | ||||||
| 	.ack = ack, | 	.irq_ack = ack, | ||||||
| 	.mask = mask, | 	.irq_mask = mask, | ||||||
| 	.unmask = unmask, | 	.irq_unmask = unmask, | ||||||
| 	.set_type = set_type, | 	.irq_set_type = set_type, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| static u8 demux_masks[4]; | static u8 demux_masks[4]; | ||||||
| 
 | 
 | ||||||
| static void demux_irqs(unsigned int irq, struct irq_desc *desc) | static void demux_irqs(unsigned int irq, struct irq_desc *desc) | ||||||
| { | { | ||||||
| 	u8 *mask = get_irq_desc_data(desc); | 	struct irq_chip *chip = irq_desc_get_chip(desc); | ||||||
|  | 	u8 *mask = irq_desc_get_handler_data(desc); | ||||||
| 	u8 pending; | 	u8 pending; | ||||||
| 	int cirq; | 	int cirq; | ||||||
| 
 | 
 | ||||||
| 	desc->chip->mask(irq); | 	chip->irq_mask(&desc->irq_data); | ||||||
| 	desc->chip->ack(irq); | 	chip->irq_ack(&desc->irq_data)); | ||||||
| 	pending = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_MIS) & *mask; | 	pending = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_MIS) & *mask; | ||||||
| 	cirq = IRQ_BASE - 1; | 	cirq = IRQ_BASE - 1; | ||||||
| 	while (pending) { | 	while (pending) { | ||||||
|  | @ -174,7 +173,7 @@ static void demux_irqs(unsigned int irq, struct irq_desc *desc) | ||||||
| 		pending >>= n; | 		pending >>= n; | ||||||
| 		generic_handle_irq(cirq); | 		generic_handle_irq(cirq); | ||||||
| 	} | 	} | ||||||
| 	desc->chip->unmask(irq); | 	chip->irq_unmask(&desc->irq_data)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| extern const signed char *platform_irq_mappings[XTENSA_NR_IRQS]; | extern const signed char *platform_irq_mappings[XTENSA_NR_IRQS]; | ||||||
|  | @ -219,11 +218,11 @@ void __init variant_init_irq(void) | ||||||
| 				i = ffs(mask); | 				i = ffs(mask); | ||||||
| 				cirq += i; | 				cirq += i; | ||||||
| 				mask >>= i; | 				mask >>= i; | ||||||
| 				set_irq_chip(cirq, &gpioirqs); | 				irq_set_chip(cirq, &gpioirqs); | ||||||
| 				set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); | 				irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); | ||||||
| 			} while (mask); | 			} while (mask); | ||||||
| 			set_irq_data(irq, demux_masks + n); | 			irq_set_handler_data(irq, demux_masks + n); | ||||||
| 			set_irq_chained_handler(irq, demux_irqs); | 			irq_set_chained_handler(irq, demux_irqs); | ||||||
| 			if (++n == ARRAY_SIZE(demux_masks)) | 			if (++n == ARRAY_SIZE(demux_masks)) | ||||||
| 				break; | 				break; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -289,10 +289,10 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev) | ||||||
| 
 | 
 | ||||||
| 	for (gpio = 0; gpio < dev->gpio_chip.ngpio; gpio++) { | 	for (gpio = 0; gpio < dev->gpio_chip.ngpio; gpio++) { | ||||||
| 		int irq = gpio + dev->irq_base; | 		int irq = gpio + dev->irq_base; | ||||||
| 		set_irq_chip_data(irq, dev); | 		irq_set_chip_data(irq, dev); | ||||||
| 		set_irq_chip_and_handler(irq, &adp5588_irq_chip, | 		irq_set_chip_and_handler(irq, &adp5588_irq_chip, | ||||||
| 					 handle_level_irq); | 					 handle_level_irq); | ||||||
| 		set_irq_nested_thread(irq, 1); | 		irq_set_nested_thread(irq, 1); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		/*
 | 		/*
 | ||||||
| 		 * ARM needs us to explicitly flag the IRQ as VALID, | 		 * ARM needs us to explicitly flag the IRQ as VALID, | ||||||
|  | @ -300,7 +300,7 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev) | ||||||
| 		 */ | 		 */ | ||||||
| 		set_irq_flags(irq, IRQF_VALID); | 		set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 		set_irq_noprobe(irq); | 		irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1656,51 +1656,6 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip) | ||||||
| 			chip->get | 			chip->get | ||||||
| 				? (chip->get(chip, i) ? "hi" : "lo") | 				? (chip->get(chip, i) ? "hi" : "lo") | ||||||
| 				: "?  "); | 				: "?  "); | ||||||
| 
 |  | ||||||
| 		if (!is_out) { |  | ||||||
| 			int		irq = gpio_to_irq(gpio); |  | ||||||
| 			struct irq_desc	*desc = irq_to_desc(irq); |  | ||||||
| 
 |  | ||||||
| 			/* This races with request_irq(), set_irq_type(),
 |  | ||||||
| 			 * and set_irq_wake() ... but those are "rare". |  | ||||||
| 			 * |  | ||||||
| 			 * More significantly, trigger type flags aren't |  | ||||||
| 			 * currently maintained by genirq. |  | ||||||
| 			 */ |  | ||||||
| 			if (irq >= 0 && desc->action) { |  | ||||||
| 				char *trigger; |  | ||||||
| 
 |  | ||||||
| 				switch (desc->status & IRQ_TYPE_SENSE_MASK) { |  | ||||||
| 				case IRQ_TYPE_NONE: |  | ||||||
| 					trigger = "(default)"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_FALLING: |  | ||||||
| 					trigger = "edge-falling"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_RISING: |  | ||||||
| 					trigger = "edge-rising"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_EDGE_BOTH: |  | ||||||
| 					trigger = "edge-both"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_HIGH: |  | ||||||
| 					trigger = "level-high"; |  | ||||||
| 					break; |  | ||||||
| 				case IRQ_TYPE_LEVEL_LOW: |  | ||||||
| 					trigger = "level-low"; |  | ||||||
| 					break; |  | ||||||
| 				default: |  | ||||||
| 					trigger = "?trigger?"; |  | ||||||
| 					break; |  | ||||||
| 				} |  | ||||||
| 
 |  | ||||||
| 				seq_printf(s, " irq-%d %s%s", |  | ||||||
| 					irq, trigger, |  | ||||||
| 					(desc->status & IRQ_WAKEUP) |  | ||||||
| 						? " wakeup" : ""); |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		seq_printf(s, "\n"); | 		seq_printf(s, "\n"); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -470,14 +470,14 @@ static int max732x_irq_setup(struct max732x_chip *chip, | ||||||
| 			if (!(chip->dir_input & (1 << lvl))) | 			if (!(chip->dir_input & (1 << lvl))) | ||||||
| 				continue; | 				continue; | ||||||
| 
 | 
 | ||||||
| 			set_irq_chip_data(irq, chip); | 			irq_set_chip_data(irq, chip); | ||||||
| 			set_irq_chip_and_handler(irq, &max732x_irq_chip, | 			irq_set_chip_and_handler(irq, &max732x_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| 			set_irq_nested_thread(irq, 1); | 			irq_set_nested_thread(irq, 1); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 			set_irq_flags(irq, IRQF_VALID); | 			set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 			set_irq_noprobe(irq); | 			irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -395,13 +395,13 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, | ||||||
| 		for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) { | 		for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) { | ||||||
| 			int irq = lvl + chip->irq_base; | 			int irq = lvl + chip->irq_base; | ||||||
| 
 | 
 | ||||||
| 			set_irq_chip_data(irq, chip); | 			irq_set_chip_data(irq, chip); | ||||||
| 			set_irq_chip_and_handler(irq, &pca953x_irq_chip, | 			irq_set_chip_and_handler(irq, &pca953x_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 			set_irq_flags(irq, IRQF_VALID); | 			set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 			set_irq_noprobe(irq); | 			irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -210,7 +210,7 @@ static struct irq_chip pl061_irqchip = { | ||||||
| 
 | 
 | ||||||
| static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) | static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) | ||||||
| { | { | ||||||
| 	struct list_head *chip_list = get_irq_data(irq); | 	struct list_head *chip_list = irq_get_handler_data(irq); | ||||||
| 	struct list_head *ptr; | 	struct list_head *ptr; | ||||||
| 	struct pl061_gpio *chip; | 	struct pl061_gpio *chip; | ||||||
| 
 | 
 | ||||||
|  | @ -294,7 +294,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) | ||||||
| 		ret = -ENODEV; | 		ret = -ENODEV; | ||||||
| 		goto iounmap; | 		goto iounmap; | ||||||
| 	} | 	} | ||||||
| 	set_irq_chained_handler(irq, pl061_irq_handler); | 	irq_set_chained_handler(irq, pl061_irq_handler); | ||||||
| 	if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */ | 	if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */ | ||||||
| 		chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL); | 		chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL); | ||||||
| 		if (chip_list == NULL) { | 		if (chip_list == NULL) { | ||||||
|  | @ -303,9 +303,9 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) | ||||||
| 			goto iounmap; | 			goto iounmap; | ||||||
| 		} | 		} | ||||||
| 		INIT_LIST_HEAD(chip_list); | 		INIT_LIST_HEAD(chip_list); | ||||||
| 		set_irq_data(irq, chip_list); | 		irq_set_handler_data(irq, chip_list); | ||||||
| 	} else | 	} else | ||||||
| 		chip_list = get_irq_data(irq); | 		chip_list = irq_get_handler_data(irq); | ||||||
| 	list_add(&chip->list, chip_list); | 	list_add(&chip->list, chip_list); | ||||||
| 
 | 
 | ||||||
| 	for (i = 0; i < PL061_GPIO_NR; i++) { | 	for (i = 0; i < PL061_GPIO_NR; i++) { | ||||||
|  | @ -315,10 +315,10 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) | ||||||
| 		else | 		else | ||||||
| 			pl061_direction_input(&chip->gc, i); | 			pl061_direction_input(&chip->gc, i); | ||||||
| 
 | 
 | ||||||
| 		set_irq_chip(i+chip->irq_base, &pl061_irqchip); | 		irq_set_chip_and_handler(i + chip->irq_base, &pl061_irqchip, | ||||||
| 		set_irq_handler(i+chip->irq_base, handle_simple_irq); | 					 handle_simple_irq); | ||||||
| 		set_irq_flags(i+chip->irq_base, IRQF_VALID); | 		set_irq_flags(i+chip->irq_base, IRQF_VALID); | ||||||
| 		set_irq_chip_data(i+chip->irq_base, chip); | 		irq_set_chip_data(i + chip->irq_base, chip); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
|  | @ -254,14 +254,14 @@ static int __devinit stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio) | ||||||
| 	int irq; | 	int irq; | ||||||
| 
 | 
 | ||||||
| 	for (irq = base; irq < base + stmpe_gpio->chip.ngpio; irq++) { | 	for (irq = base; irq < base + stmpe_gpio->chip.ngpio; irq++) { | ||||||
| 		set_irq_chip_data(irq, stmpe_gpio); | 		irq_set_chip_data(irq, stmpe_gpio); | ||||||
| 		set_irq_chip_and_handler(irq, &stmpe_gpio_irq_chip, | 		irq_set_chip_and_handler(irq, &stmpe_gpio_irq_chip, | ||||||
| 					 handle_simple_irq); | 					 handle_simple_irq); | ||||||
| 		set_irq_nested_thread(irq, 1); | 		irq_set_nested_thread(irq, 1); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(irq, IRQF_VALID); | 		set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 		set_irq_noprobe(irq); | 		irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -277,8 +277,8 @@ static void stmpe_gpio_irq_remove(struct stmpe_gpio *stmpe_gpio) | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(irq, 0); | 		set_irq_flags(irq, 0); | ||||||
| #endif | #endif | ||||||
| 		set_irq_chip_and_handler(irq, NULL, NULL); | 		irq_set_chip_and_handler(irq, NULL, NULL); | ||||||
| 		set_irq_chip_data(irq, NULL); | 		irq_set_chip_data(irq, NULL); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -551,12 +551,12 @@ static int sx150x_install_irq_chip(struct sx150x_chip *chip, | ||||||
| 
 | 
 | ||||||
| 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) { | 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) { | ||||||
| 		irq = irq_base + n; | 		irq = irq_base + n; | ||||||
| 		set_irq_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq); | 		irq_set_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq); | ||||||
| 		set_irq_nested_thread(irq, 1); | 		irq_set_nested_thread(irq, 1); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(irq, IRQF_VALID); | 		set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 		set_irq_noprobe(irq); | 		irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -583,8 +583,7 @@ static void sx150x_remove_irq_chip(struct sx150x_chip *chip) | ||||||
| 
 | 
 | ||||||
| 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) { | 	for (n = 0; n < chip->dev_cfg->ngpios; ++n) { | ||||||
| 		irq = chip->irq_base + n; | 		irq = chip->irq_base + n; | ||||||
| 		set_irq_handler(irq, NULL); | 		irq_set_chip_and_handler(irq, NULL, NULL); | ||||||
| 		set_irq_chip(irq, NULL); |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -239,14 +239,14 @@ static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio) | ||||||
| 	int irq; | 	int irq; | ||||||
| 
 | 
 | ||||||
| 	for (irq = base; irq < base + tc3589x_gpio->chip.ngpio; irq++) { | 	for (irq = base; irq < base + tc3589x_gpio->chip.ngpio; irq++) { | ||||||
| 		set_irq_chip_data(irq, tc3589x_gpio); | 		irq_set_chip_data(irq, tc3589x_gpio); | ||||||
| 		set_irq_chip_and_handler(irq, &tc3589x_gpio_irq_chip, | 		irq_set_chip_and_handler(irq, &tc3589x_gpio_irq_chip, | ||||||
| 					 handle_simple_irq); | 					 handle_simple_irq); | ||||||
| 		set_irq_nested_thread(irq, 1); | 		irq_set_nested_thread(irq, 1); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(irq, IRQF_VALID); | 		set_irq_flags(irq, IRQF_VALID); | ||||||
| #else | #else | ||||||
| 		set_irq_noprobe(irq); | 		irq_set_noprobe(irq); | ||||||
| #endif | #endif | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -262,8 +262,8 @@ static void tc3589x_gpio_irq_remove(struct tc3589x_gpio *tc3589x_gpio) | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(irq, 0); | 		set_irq_flags(irq, 0); | ||||||
| #endif | #endif | ||||||
| 		set_irq_chip_and_handler(irq, NULL, NULL); | 		irq_set_chip_and_handler(irq, NULL, NULL); | ||||||
| 		set_irq_chip_data(irq, NULL); | 		irq_set_chip_data(irq, NULL); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -196,7 +196,7 @@ out: | ||||||
| 
 | 
 | ||||||
| static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) | static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) | ||||||
| { | { | ||||||
| 	struct timbgpio *tgpio = get_irq_data(irq); | 	struct timbgpio *tgpio = irq_get_handler_data(irq); | ||||||
| 	unsigned long ipr; | 	unsigned long ipr; | ||||||
| 	int offset; | 	int offset; | ||||||
| 
 | 
 | ||||||
|  | @ -292,16 +292,16 @@ static int __devinit timbgpio_probe(struct platform_device *pdev) | ||||||
| 		return 0; | 		return 0; | ||||||
| 
 | 
 | ||||||
| 	for (i = 0; i < pdata->nr_pins; i++) { | 	for (i = 0; i < pdata->nr_pins; i++) { | ||||||
| 		set_irq_chip_and_handler_name(tgpio->irq_base + i, | 		irq_set_chip_and_handler_name(tgpio->irq_base + i, | ||||||
| 			&timbgpio_irqchip, handle_simple_irq, "mux"); | 			&timbgpio_irqchip, handle_simple_irq, "mux"); | ||||||
| 		set_irq_chip_data(tgpio->irq_base + i, tgpio); | 		irq_set_chip_data(tgpio->irq_base + i, tgpio); | ||||||
| #ifdef CONFIG_ARM | #ifdef CONFIG_ARM | ||||||
| 		set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE); | 		set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE); | ||||||
| #endif | #endif | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	set_irq_data(irq, tgpio); | 	irq_set_handler_data(irq, tgpio); | ||||||
| 	set_irq_chained_handler(irq, timbgpio_irq); | 	irq_set_chained_handler(irq, timbgpio_irq); | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| 
 | 
 | ||||||
|  | @ -327,12 +327,12 @@ static int __devexit timbgpio_remove(struct platform_device *pdev) | ||||||
| 	if (irq >= 0 && tgpio->irq_base > 0) { | 	if (irq >= 0 && tgpio->irq_base > 0) { | ||||||
| 		int i; | 		int i; | ||||||
| 		for (i = 0; i < tgpio->gpio.ngpio; i++) { | 		for (i = 0; i < tgpio->gpio.ngpio; i++) { | ||||||
| 			set_irq_chip(tgpio->irq_base + i, NULL); | 			irq_set_chip(tgpio->irq_base + i, NULL); | ||||||
| 			set_irq_chip_data(tgpio->irq_base + i, NULL); | 			irq_set_chip_data(tgpio->irq_base + i, NULL); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		set_irq_handler(irq, NULL); | 		irq_set_handler(irq, NULL); | ||||||
| 		set_irq_data(irq, NULL); | 		irq_set_handler_data(irq, NULL); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	err = gpiochip_remove(&tgpio->gpio); | 	err = gpiochip_remove(&tgpio->gpio); | ||||||
|  |  | ||||||
|  | @ -238,13 +238,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, | ||||||
| 					break; | 					break; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			set_irq_chip_and_handler(GIU_IRQ(pin), | 			irq_set_chip_and_handler(GIU_IRQ(pin), | ||||||
| 						 &giuint_low_irq_chip, | 						 &giuint_low_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| 		} else { | 		} else { | ||||||
| 			giu_clear(GIUINTTYPL, mask); | 			giu_clear(GIUINTTYPL, mask); | ||||||
| 			giu_clear(GIUINTHTSELL, mask); | 			giu_clear(GIUINTHTSELL, mask); | ||||||
| 			set_irq_chip_and_handler(GIU_IRQ(pin), | 			irq_set_chip_and_handler(GIU_IRQ(pin), | ||||||
| 						 &giuint_low_irq_chip, | 						 &giuint_low_irq_chip, | ||||||
| 						 handle_level_irq); | 						 handle_level_irq); | ||||||
| 		} | 		} | ||||||
|  | @ -273,13 +273,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, | ||||||
| 					break; | 					break; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			set_irq_chip_and_handler(GIU_IRQ(pin), | 			irq_set_chip_and_handler(GIU_IRQ(pin), | ||||||
| 						 &giuint_high_irq_chip, | 						 &giuint_high_irq_chip, | ||||||
| 						 handle_edge_irq); | 						 handle_edge_irq); | ||||||
| 		} else { | 		} else { | ||||||
| 			giu_clear(GIUINTTYPH, mask); | 			giu_clear(GIUINTTYPH, mask); | ||||||
| 			giu_clear(GIUINTHTSELH, mask); | 			giu_clear(GIUINTHTSELH, mask); | ||||||
| 			set_irq_chip_and_handler(GIU_IRQ(pin), | 			irq_set_chip_and_handler(GIU_IRQ(pin), | ||||||
| 						 &giuint_high_irq_chip, | 						 &giuint_high_irq_chip, | ||||||
| 						 handle_level_irq); | 						 handle_level_irq); | ||||||
| 		} | 		} | ||||||
|  | @ -539,9 +539,9 @@ static int __devinit giu_probe(struct platform_device *pdev) | ||||||
| 			chip = &giuint_high_irq_chip; | 			chip = &giuint_high_irq_chip; | ||||||
| 
 | 
 | ||||||
| 		if (trigger & (1 << pin)) | 		if (trigger & (1 << pin)) | ||||||
| 			set_irq_chip_and_handler(i, chip, handle_edge_irq); | 			irq_set_chip_and_handler(i, chip, handle_edge_irq); | ||||||
| 		else | 		else | ||||||
| 			set_irq_chip_and_handler(i, chip, handle_level_irq); | 			irq_set_chip_and_handler(i, chip, handle_level_irq); | ||||||
| 
 | 
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -28,6 +28,7 @@ | ||||||
| #include <asm/ptrace.h> | #include <asm/ptrace.h> | ||||||
| #include <asm/irq_regs.h> | #include <asm/irq_regs.h> | ||||||
| 
 | 
 | ||||||
|  | struct seq_file; | ||||||
| struct irq_desc; | struct irq_desc; | ||||||
| struct irq_data; | struct irq_data; | ||||||
| typedef	void (*irq_flow_handler_t)(unsigned int irq, | typedef	void (*irq_flow_handler_t)(unsigned int irq, | ||||||
|  | @ -270,6 +271,7 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | ||||||
|  * @irq_set_wake:	enable/disable power-management wake-on of an IRQ |  * @irq_set_wake:	enable/disable power-management wake-on of an IRQ | ||||||
|  * @irq_bus_lock:	function to lock access to slow bus (i2c) chips |  * @irq_bus_lock:	function to lock access to slow bus (i2c) chips | ||||||
|  * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |  * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | ||||||
|  |  * @irq_print_chip:	optional to print special chip info in show_interrupts | ||||||
|  * @flags:		chip specific flags |  * @flags:		chip specific flags | ||||||
|  * |  * | ||||||
|  * @release:		release function solely used by UML |  * @release:		release function solely used by UML | ||||||
|  | @ -317,6 +319,8 @@ struct irq_chip { | ||||||
| 	void		(*irq_bus_lock)(struct irq_data *data); | 	void		(*irq_bus_lock)(struct irq_data *data); | ||||||
| 	void		(*irq_bus_sync_unlock)(struct irq_data *data); | 	void		(*irq_bus_sync_unlock)(struct irq_data *data); | ||||||
| 
 | 
 | ||||||
|  | 	void		(*irq_print_chip)(struct irq_data *data, struct seq_file *p); | ||||||
|  | 
 | ||||||
| 	unsigned long	flags; | 	unsigned long	flags; | ||||||
| 
 | 
 | ||||||
| 	/* Currently used only by UML, might disappear one day.*/ | 	/* Currently used only by UML, might disappear one day.*/ | ||||||
|  |  | ||||||
|  | @ -31,6 +31,10 @@ config GENERIC_IRQ_PROBE | ||||||
| config GENERIC_IRQ_SHOW | config GENERIC_IRQ_SHOW | ||||||
|        bool |        bool | ||||||
| 
 | 
 | ||||||
|  | # Print level/edge extra information | ||||||
|  | config GENERIC_IRQ_SHOW_LEVEL | ||||||
|  |        bool | ||||||
|  | 
 | ||||||
| # Support for delayed migration from interrupt context | # Support for delayed migration from interrupt context | ||||||
| config GENERIC_PENDING_IRQ | config GENERIC_PENDING_IRQ | ||||||
| 	bool | 	bool | ||||||
|  |  | ||||||
|  | @ -404,7 +404,20 @@ int show_interrupts(struct seq_file *p, void *v) | ||||||
| 	seq_printf(p, "%*d: ", prec, i); | 	seq_printf(p, "%*d: ", prec, i); | ||||||
| 	for_each_online_cpu(j) | 	for_each_online_cpu(j) | ||||||
| 		seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 		seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | ||||||
| 	seq_printf(p, " %8s", desc->irq_data.chip->name); | 
 | ||||||
|  | 	if (desc->irq_data.chip) { | ||||||
|  | 		if (desc->irq_data.chip->irq_print_chip) | ||||||
|  | 			desc->irq_data.chip->irq_print_chip(&desc->irq_data, p); | ||||||
|  | 		else if (desc->irq_data.chip->name) | ||||||
|  | 			seq_printf(p, " %8s", desc->irq_data.chip->name); | ||||||
|  | 		else | ||||||
|  | 			seq_printf(p, " %8s", "-"); | ||||||
|  | 	} else { | ||||||
|  | 		seq_printf(p, " %8s", "None"); | ||||||
|  | 	} | ||||||
|  | #ifdef CONFIG_GENIRC_IRQ_SHOW_LEVEL | ||||||
|  | 	seq_printf(p, " %-8s", irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge"); | ||||||
|  | #endif | ||||||
| 	if (desc->name) | 	if (desc->name) | ||||||
| 		seq_printf(p, "-%-8s", desc->name); | 		seq_printf(p, "-%-8s", desc->name); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Torvalds
				Linus Torvalds