linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Greg Ungerer <gerg@uclinux.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Peter De Schrijver <p2@debian.org>
Subject: [PATCH 21/27] m68k/apollo: Convert Apollo to genirq
Date: Sun, 30 Oct 2011 13:48:29 +0100	[thread overview]
Message-ID: <1319978915-10933-22-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1319978915-10933-1-git-send-email-geert@linux-m68k.org>

Replace the custom user vector interrupt handler that calls do_IRQ() and
does an EOI by handle_fasteoi_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter De Schrijver <p2@debian.org>
---
 arch/m68k/Kconfig          |    1 -
 arch/m68k/apollo/dn_ints.c |   25 +++++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 8ae37a8..f2dc708 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -87,7 +87,6 @@ config MMU_SUN3
 config USE_GENERIC_HARDIRQS
 	bool "Use genirq"
 	depends on MMU
-	depends on !APOLLO
 	depends on !SUN3X
 	depends on !Q40
 	depends on !SUN3
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 4b76431..fc190b3 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -1,9 +1,14 @@
 #include <linux/interrupt.h>
-
+#ifdef CONFIG_GENERIC_HARDIRQS
+#include <linux/irq.h>
+#else
 #include <asm/irq.h>
+#endif
+
 #include <asm/traps.h>
 #include <asm/apollohw.h>
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 void dn_process_int(unsigned int irq, struct pt_regs *fp)
 {
 	do_IRQ(irq, fp);
@@ -11,6 +16,7 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp)
 	*(volatile unsigned char *)(pica)=0x20;
 	*(volatile unsigned char *)(picb)=0x20;
 }
+#endif
 
 unsigned int apollo_irq_startup(struct irq_data *data)
 {
@@ -33,16 +39,31 @@ void apollo_irq_shutdown(struct irq_data *data)
 		*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
 }
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+void apollo_irq_eoi(struct irq_data *data)
+{
+	*(volatile unsigned char *)(pica) = 0x20;
+	*(volatile unsigned char *)(picb) = 0x20;
+}
+#endif
+
 static struct irq_chip apollo_irq_chip = {
 	.name           = "apollo",
 	.irq_startup    = apollo_irq_startup,
 	.irq_shutdown   = apollo_irq_shutdown,
+#ifdef CONFIG_GENERIC_HARDIRQS
+	.irq_eoi	= apollo_irq_eoi,
+#endif
 };
 
 
 void __init dn_init_IRQ(void)
 {
+#ifdef CONFIG_GENERIC_HARDIRQS
+	m68k_setup_user_interrupt(VEC_USER + 96, 16, NULL);
+#else
 	m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
-	m68k_setup_irq_controller(&apollo_irq_chip, handle_simple_irq,
+#endif
+	m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
 				  IRQ_APOLLO, 16);
 }
-- 
1.7.0.4


  parent reply	other threads:[~2011-10-30 12:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30 12:48 [PATCH 00/27 v7] m68k: Convert to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 01/27] ide-{cd,floppy,tape}: Do not include <linux/irq.h> Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 02/27] m68k/irq: Rename irq_controller to irq_chip Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 03/27] m68k/irq: Kill irq_node_t typedef, always use struct irq_node Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 04/27] m68k/irq: Rename irq_node to irq_data Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 05/27] m68k/irq: Switch irq_chip methods to "struct irq_data *data" Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 06/27] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 07/27] m68k/irq: Extract irq_set_chip() Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 08/27] m68k/irq: Add m68k_setup_irq_controller() Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 09/27] m68k/irq: Rename {,__}m68k_handle_int() Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 10/27] m68k/irq: Remove obsolete IRQ_FLG_* users Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 11/27] m68k/irq: Add genirq support Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 12/27] m68k/atari: Convert Atari to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 13/27] m68k/atari: Remove code and comments about different irq types Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 14/27] m68k/amiga: Refactor amiints.c Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 15/27] m68k/amiga: Convert Amiga to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 16/27] m68k/amiga: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 17/27] m68k/mac: Convert Mac to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 18/27] m68k/mac: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 19/27] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 20/27] m68k/vme: Convert VME " Geert Uytterhoeven
2011-10-30 12:48 ` Geert Uytterhoeven [this message]
2011-10-30 12:48 ` [PATCH 22/27] m68k/sun3: Use the kstat_irqs_cpu() wrapper Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 23/27] m68k/sun3: Convert Sun3/3x to genirq Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 24/27] m68k/q40: Convert Q40/Q60 " Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 25/27] m68k/irq: Remove obsolete m68k irq framework Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 26/27] m68k/irq: Remove obsolete support for user vector interrupt fixups Geert Uytterhoeven
2011-10-30 12:48 ` [PATCH 27/27] m68k/mac: Remove mac_irq_{en,dis}able() wrappers Geert Uytterhoeven
2011-10-31  1:29 ` [PATCH 00/27 v7] m68k: Convert to genirq Greg Ungerer

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=1319978915-10933-22-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=gerg@uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=p2@debian.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).