linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Hirokazu Takata <takata@linux-m32r.org>,
	Paul Mundt <lethal@linux-sh.org>
Subject: [patch 15/37] m32r: Convert mappi2 irq chip
Date: Wed, 19 Jan 2011 21:48:57 -0000	[thread overview]
Message-ID: <20110119210839.580848521@linutronix.de> (raw)
In-Reply-To: 20110119205258.462759212@linutronix.de

[-- Attachment #1: m32r-convert-mappi2.patch --]
[-- Type: text/plain, Size: 4656 bytes --]

Convert the irq chips to the new functions and use proper flow
handlers. handle_level_irq is appropriate.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
---
---
 arch/m32r/platforms/mappi2/setup.c |   59 ++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 29 deletions(-)

Index: linux-2.6/arch/m32r/platforms/mappi2/setup.c
===================================================================
--- linux-2.6.orig/arch/m32r/platforms/mappi2/setup.c
+++ linux-2.6/arch/m32r/platforms/mappi2/setup.c
@@ -46,96 +46,97 @@ static void enable_mappi2_irq(unsigned i
 	outl(data, port);
 }
 
-static void mask_and_ack_mappi2(unsigned int irq)
+static void mask_mappi2(struct irq_data *data)
 {
-	disable_mappi2_irq(irq);
+	disable_mappi2_irq(data->irq);
 }
 
-static void end_mappi2_irq(unsigned int irq)
+static void unmask_mappi2(struct irq_data *data)
 {
-	enable_mappi2_irq(irq);
+	enable_mappi2_irq(data->irq);
 }
 
-static unsigned int startup_mappi2_irq(unsigned int irq)
-{
-	enable_mappi2_irq(irq);
-	return (0);
-}
-
-static void shutdown_mappi2_irq(unsigned int irq)
+static void shutdown_mappi2(struct irq_data *data)
 {
 	unsigned long port;
 
-	port = irq2port(irq);
+	port = irq2port(data->irq);
 	outl(M32R_ICUCR_ILEVEL7, port);
 }
 
 static struct irq_chip mappi2_irq_type =
 {
-	.name = "MAPPI2-IRQ",
-	.startup = startup_mappi2_irq,
-	.shutdown = shutdown_mappi2_irq,
-	.enable = enable_mappi2_irq,
-	.disable = disable_mappi2_irq,
-	.ack = mask_and_ack_mappi2,
-	.end = end_mappi2_irq
+	.name		= "MAPPI2-IRQ",
+	.irq_shutdown	= shutdown_mappi2,
+	.irq_mask	= mask_mappi2,
+	.irq_unmask	= unmask_mappi2,
 };
 
 void __init init_IRQ(void)
 {
 #if defined(CONFIG_SMC91X)
 	/* INT0 : LAN controller (SMC91111) */
-	set_irq_chip(M32R_IRQ_INT0, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
 	disable_mappi2_irq(M32R_IRQ_INT0);
 #endif  /* CONFIG_SMC91X */
 
 	/* MFT2 : system timer */
-	set_irq_chip(M32R_IRQ_MFT2, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
 	disable_mappi2_irq(M32R_IRQ_MFT2);
 
 #ifdef CONFIG_SERIAL_M32R_SIO
 	/* SIO0_R : uart receive data */
-	set_irq_chip(M32R_IRQ_SIO0_R, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_SIO0_R].icucr = 0;
 	disable_mappi2_irq(M32R_IRQ_SIO0_R);
 
 	/* SIO0_S : uart send data */
-	set_irq_chip(M32R_IRQ_SIO0_S, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_SIO0_S].icucr = 0;
 	disable_mappi2_irq(M32R_IRQ_SIO0_S);
 	/* SIO1_R : uart receive data */
-	set_irq_chip(M32R_IRQ_SIO1_R, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_SIO1_R].icucr = 0;
 	disable_mappi2_irq(M32R_IRQ_SIO1_R);
 
 	/* SIO1_S : uart send data */
-	set_irq_chip(M32R_IRQ_SIO1_S, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_SIO1_S].icucr = 0;
 	disable_mappi2_irq(M32R_IRQ_SIO1_S);
 #endif  /* CONFIG_M32R_USE_DBG_CONSOLE */
 
 #if defined(CONFIG_USB)
 	/* INT1 : USB Host controller interrupt */
-	set_irq_chip(M32R_IRQ_INT1, &mappi2_irq_type);
+	set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01;
 	disable_mappi2_irq(M32R_IRQ_INT1);
 #endif /* CONFIG_USB */
 
 	/* ICUCR40: CFC IREQ */
-	set_irq_chip(PLD_IRQ_CFIREQ, &mappi2_irq_type);
+	set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
 	disable_mappi2_irq(PLD_IRQ_CFIREQ);
 
 #if defined(CONFIG_M32R_CFC)
 	/* ICUCR41: CFC Insert */
-	set_irq_chip(PLD_IRQ_CFC_INSERT, &mappi2_irq_type);
+	set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
 	disable_mappi2_irq(PLD_IRQ_CFC_INSERT);
 
 	/* ICUCR42: CFC Eject */
-	set_irq_chip(PLD_IRQ_CFC_EJECT, &mappi2_irq_type);
+	set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type,
+				 handle_level_irq);
 	icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
 	disable_mappi2_irq(PLD_IRQ_CFC_EJECT);
 #endif /* CONFIG_MAPPI2_CFC */

  parent reply	other threads:[~2011-01-19 21:49 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 21:47 [patch 00/37] genirq: Remove __do_IRQ() and cleanup irq related Kconfigs Thomas Gleixner
2011-01-19 21:47 ` Thomas Gleixner
2011-01-19 21:48 ` [patch 01/37] h8300: Convert to new irq_chip functions Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 02/37] h8300: Convert interrupt handling to flow handler Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 03/37] h8300: Use generic irq Kconfig Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 04/37] cris: Use irq handling wrapper Thomas Gleixner
2011-01-19 21:48 ` [patch 05/37] cris: Convert V10 interrupt handling Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 06/37] cris: Convert V32 " Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 07/37] cris: Use generic irq Kconfig Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 08/37] m32r: Cleanup direct irq_desc access Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 09/37] m32r: Convert m32104ut irq handling Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 10/37] m32r: Convert m32104ut irq chip Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 11/37] m32r: Convert m32700ut pld " Thomas Gleixner
2011-01-19 21:48 ` [patch 12/37] m32r: Convert m32700ut lanpld " Thomas Gleixner
2011-01-19 21:48   ` Thomas Gleixner
2011-01-19 21:48 ` [patch 13/37] m32r: Convert m32700ut lcdpld " Thomas Gleixner
2011-01-19 21:48 ` [patch 14/37] m32r: Convert mappi irq chips Thomas Gleixner
2011-01-19 21:48 ` Thomas Gleixner [this message]
2011-01-19 21:49 ` [patch 16/37] m32r: Convert mappi3 irq chip Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 17/37] m32r: Convert oaks32r irq chips Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 18/37] m32r: Convert opsput irq chip Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 19/37] m32r: Convert opsput pld " Thomas Gleixner
2011-01-19 21:49 ` [patch 20/37] m32r: Convert opsput lanpld " Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 21/37] m32r: Convert opsput_lcdpld " Thomas Gleixner
2011-01-19 21:49 ` [patch 22/37] m32r: Convert usrv platform irq handling Thomas Gleixner
2011-01-19 21:49 ` [patch 23/37] m32r: Convert to generic irq Kconfig Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 24/37] genirq: Remove __do_IRQ Thomas Gleixner
2011-01-19 21:49 ` [patch 25/37] alpha: Use generic irq Kconfig Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 26/37] blackfin: " Thomas Gleixner
2011-01-19 21:49 ` [patch 27/37] frv: " Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 28/37] ia64: " Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 22:36   ` Luck, Tony
2011-01-19 21:49 ` [patch 29/37] m68knommu: " Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-19 21:49 ` [patch 30/37] microblaze: " Thomas Gleixner
2011-01-19 21:49   ` Thomas Gleixner
2011-01-20  7:15   ` Michal Simek
2011-01-20  7:15     ` Michal Simek
2011-01-19 21:49 ` [patch 31/37] mn10300: " Thomas Gleixner
2011-03-05 21:02   ` Geert Uytterhoeven
2011-03-05 22:01     ` Sam Ravnborg
2011-03-08 10:41       ` Thomas Gleixner
2011-01-19 21:49 ` [patch 32/37] parisc: " Thomas Gleixner
2011-01-19 22:05   ` James Bottomley
2011-01-19 22:16     ` Thomas Gleixner
2011-01-20  4:58       ` James Bottomley
2011-01-20  4:58         ` James Bottomley
2011-01-19 21:50 ` [patch 33/37] powerpc: " Thomas Gleixner
2011-01-19 21:50   ` Thomas Gleixner
2011-01-19 21:50 ` [patch 34/37] score: " Thomas Gleixner
2011-01-20  3:00   ` liqin.chen
2011-01-19 21:50 ` [patch 35/37] sparc: " Thomas Gleixner
2011-01-19 21:50   ` Thomas Gleixner
2011-01-19 21:52   ` David Miller
2011-01-19 21:50 ` [patch 36/37] tile: " Thomas Gleixner
2011-01-20 18:54   ` Chris Metcalf
2011-01-20 19:08     ` Sam Ravnborg
2011-01-20 19:11       ` Chris Metcalf
2011-01-21 10:27       ` Thomas Gleixner
2011-01-19 21:50 ` [patch 37/37] um: " Thomas Gleixner
2011-01-19 22:13 ` [patch 00/37] genirq: Remove __do_IRQ() and cleanup irq related Kconfigs Linus Torvalds
2011-01-19 22:13   ` Linus Torvalds
2011-01-19 22:17   ` Kyle McMartin
2011-01-19 22:18     ` Kyle McMartin
2011-01-19 22:22       ` Thomas Gleixner
2011-01-19 22:25   ` Thomas Gleixner
2011-01-19 23:18 ` [patch 31/37] mn10300: Use generic irq Kconfig David Howells
2011-01-19 23:18 ` [patch 27/37] frv: " David Howells
2011-01-19 23:19 ` [patch 24/37] genirq: Remove __do_IRQ David Howells
2011-01-21  7:37   ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110119210839.580848521@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=takata@linux-m32r.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).