linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] sh: Convert Microdev boards from hw_interrupt_type to irq_chip
@ 2008-12-14 12:02 Matt Fleming
  2008-12-16  0:21 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Fleming @ 2008-12-14 12:02 UTC (permalink / raw)
  To: linux-sh

This is part of the SH move to irq_chip.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
---
 arch/sh/boards/mach-microdev/irq.c |   36 +++++++-----------------------------
 1 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/arch/sh/boards/mach-microdev/irq.c b/arch/sh/boards/mach-microdev/irq.c
index 702753c..b551963 100644
--- a/arch/sh/boards/mach-microdev/irq.c
+++ b/arch/sh/boards/mach-microdev/irq.c
@@ -67,27 +67,13 @@ static const struct {
 
 static void enable_microdev_irq(unsigned int irq);
 static void disable_microdev_irq(unsigned int irq);
-
-	/* shutdown is same as "disable" */
-#define shutdown_microdev_irq disable_microdev_irq
-
 static void mask_and_ack_microdev(unsigned int);
-static void end_microdev_irq(unsigned int irq);
-
-static unsigned int startup_microdev_irq(unsigned int irq)
-{
-	enable_microdev_irq(irq);
-	return 0;		/* never anything pending */
-}
 
-static struct hw_interrupt_type microdev_irq_type = {
-	.typename = "MicroDev-IRQ",
-	.startup = startup_microdev_irq,
-	.shutdown = shutdown_microdev_irq,
-	.enable = enable_microdev_irq,
-	.disable = disable_microdev_irq,
+static struct irq_chip microdev_irq_type = {
+	.name = "MicroDev-IRQ",
+	.unmask = enable_microdev_irq,
+	.mask = disable_microdev_irq,
 	.ack = mask_and_ack_microdev,
-	.end = end_microdev_irq
 };
 
 static void disable_microdev_irq(unsigned int irq)
@@ -130,11 +116,11 @@ static void enable_microdev_irq(unsigned int irq)
 	ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
 }
 
-	/* This functions sets the desired irq handler to be a MicroDev type */
+/* This function sets the desired irq handler to be a MicroDev type */
 static void __init make_microdev_irq(unsigned int irq)
 {
 	disable_irq_nosync(irq);
-	irq_desc[irq].chip = &microdev_irq_type;
+	set_irq_chip_and_handler(irq, &microdev_irq_type, handle_level_irq);
 	disable_microdev_irq(irq);
 }
 
@@ -143,17 +129,11 @@ static void mask_and_ack_microdev(unsigned int irq)
 	disable_microdev_irq(irq);
 }
 
-static void end_microdev_irq(unsigned int irq)
-{
-	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
-		enable_microdev_irq(irq);
-}
-
 extern void __init init_microdev_irq(void)
 {
 	int i;
 
-		/* disable interrupts on the FPGA INTC register */
+	/* disable interrupts on the FPGA INTC register */
 	ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);
 
 	for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
@@ -179,5 +159,3 @@ extern void microdev_print_fpga_intc_status(void)
 	printk("FPGA_INTPRI[3..0] = %08x:%08x:%08x:%08x\n", *intprid, *intpric, *intprib, *intpria);
 	printk("-------------------------------------------------------------------------------\n");
 }
-
-
-- 
1.5.6.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/5] sh: Convert Microdev boards from hw_interrupt_type to irq_chip
  2008-12-14 12:02 [PATCH 1/5] sh: Convert Microdev boards from hw_interrupt_type to irq_chip Matt Fleming
@ 2008-12-16  0:21 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-12-16  0:21 UTC (permalink / raw)
  To: linux-sh

On Sun, Dec 14, 2008 at 12:02:24PM +0000, Matt Fleming wrote:
> This is part of the SH move to irq_chip.
> 
> Signed-off-by: Matt Fleming <mjf@gentoo.org>

On Sun, Dec 14, 2008 at 12:02:25PM +0000, Matt Fleming wrote:
> ... as part of the hw_interrupt_type to irq_chip crusade.
> 
> Signed-off-by: Matt Fleming <mjf@gentoo.org>

On Sun, Dec 14, 2008 at 12:02:26PM +0000, Matt Fleming wrote:
> Switch the dreamcast IRQ code over to the irq_chip way of doing things,
> so that we can set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH boards.
> 
> Also, whilst I'm here change some things to make checkpatch.pl happy:
> 	- Indent with tabs, not with spaces
> 	- Include <linux/io.h>, not <asm/io.h>
> 	- Fix the multi-line comment style
> 	- Fix some typos in the comments
> 
> Tested-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>
> Signed-off-by: Matt Fleming <mjf@gentoo.org>

On Sun, Dec 14, 2008 at 12:02:27PM +0000, Matt Fleming wrote:
> I've been unable to even compile-test this change because I don't have
> an sh5 toolchain. All uses of hw_interrupt_type for SuperH boards have
> now been converted to use irq_chip.
> 
> Signed-off-by: Matt Fleming <mjf@gentoo.org>

On Sun, Dec 14, 2008 at 12:02:28PM +0000, Matt Fleming wrote:
> After the recent changes to switch SuperH board support over to irq_chip
> it is now possible to set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH
> boards.
> 
> Signed-off-by: Matt Fleming <mjf@gentoo.org>

These are all applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-16  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-14 12:02 [PATCH 1/5] sh: Convert Microdev boards from hw_interrupt_type to irq_chip Matt Fleming
2008-12-16  0:21 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).