linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: anton.vorontsov@linaro.org (Anton Vorontsov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/10] ARM: mach-rpc: Don't register FIQs with genirq
Date: Thu, 22 Nov 2012 16:49:54 -0800	[thread overview]
Message-ID: <1353631803-4853-1-git-send-email-anton.vorontsov@linaro.org> (raw)
In-Reply-To: <20121123003849.GA973@lizard.mcd25758.sjc.wayport.net>

mach-rps registers FIQ controller with genirq, which makes no sense:
these FIQs cannot be routed to IRQs, so there is no need to register
it with genirq.

This effectively makes FIQ_START irrelevant.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
---
 arch/arm/mach-rpc/dma.c               |  4 ++--
 arch/arm/mach-rpc/include/mach/irqs.h |  5 +++++
 arch/arm/mach-rpc/irq.c               | 19 ++++---------------
 3 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c
index 85883b2..4a525be 100644
--- a/arch/arm/mach-rpc/dma.c
+++ b/arch/arm/mach-rpc/dma.c
@@ -289,13 +289,13 @@ static void floppy_enable_dma(unsigned int chan, dma_t *dma)
 
 	set_fiq_handler(fiqhandler_start, fiqhandler_length);
 	set_fiq_regs(&regs);
-	enable_fiq(fdma->fiq);
+	iomd_unmask_fiq(fdma->fiq);
 }
 
 static void floppy_disable_dma(unsigned int chan, dma_t *dma)
 {
 	struct floppy_dma *fdma = container_of(dma, struct floppy_dma, dma);
-	disable_fiq(fdma->fiq);
+	iomd_mask_fiq(fdma->fiq);
 	release_fiq(&fh);
 }
 
diff --git a/arch/arm/mach-rpc/include/mach/irqs.h b/arch/arm/mach-rpc/include/mach/irqs.h
index 6868e17..f27ead1 100644
--- a/arch/arm/mach-rpc/include/mach/irqs.h
+++ b/arch/arm/mach-rpc/include/mach/irqs.h
@@ -37,6 +37,11 @@
 #define FIQ_EXPANSIONCARD	6
 #define FIQ_FORCE		7
 
+#ifndef __ASSEMBLY__
+extern void iomd_mask_fiq(int fiq);
+extern void iomd_unmask_fiq(int fiq);
+#endif
+
 /*
  * This is the offset of the FIQ "IRQ" numbers
  */
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c
index 3e4fa84..a4221b3 100644
--- a/arch/arm/mach-rpc/irq.c
+++ b/arch/arm/mach-rpc/irq.c
@@ -89,30 +89,24 @@ static struct irq_chip iomd_dma_chip = {
 	.irq_unmask	= iomd_unmask_irq_dma,
 };
 
-static void iomd_mask_irq_fiq(struct irq_data *d)
+void iomd_mask_fiq(int fiq)
 {
 	unsigned int val, mask;
 
-	mask = 1 << (d->irq & 7);
+	mask = 1 << (fiq & 7);
 	val = iomd_readb(IOMD_FIQMASK);
 	iomd_writeb(val & ~mask, IOMD_FIQMASK);
 }
 
-static void iomd_unmask_irq_fiq(struct irq_data *d)
+void iomd_unmask_fiq(int fiq)
 {
 	unsigned int val, mask;
 
-	mask = 1 << (d->irq & 7);
+	mask = 1 << (fiq & 7);
 	val = iomd_readb(IOMD_FIQMASK);
 	iomd_writeb(val | mask, IOMD_FIQMASK);
 }
 
-static struct irq_chip iomd_fiq_chip = {
-	.irq_ack	= iomd_mask_irq_fiq,
-	.irq_mask	= iomd_mask_irq_fiq,
-	.irq_unmask	= iomd_unmask_irq_fiq,
-};
-
 extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
 
 void __init rpc_init_irq(void)
@@ -155,11 +149,6 @@ void __init rpc_init_irq(void)
 						 handle_level_irq);
 			set_irq_flags(irq, flags);
 			break;
-
-		case 64 ... 71:
-			irq_set_chip(irq, &iomd_fiq_chip);
-			set_irq_flags(irq, IRQF_VALID);
-			break;
 		}
 	}
 
-- 
1.8.0

  reply	other threads:[~2012-11-23  0:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23  0:38 [PATCH resend 0/10] Get rid of FIQ_START/enable/disable_fiq() + some FIQ cleanups Anton Vorontsov
2012-11-23  0:49 ` Anton Vorontsov [this message]
2012-11-23  0:49 ` [PATCH 02/10] ARM: plat-s3c24xx: Don't use FIQ_START Anton Vorontsov
2012-11-23  0:49 ` [PATCH 03/10] [media] mx1_camera: Don't use {en,dis}able_fiq() calls Anton Vorontsov
2012-11-23  0:49 ` [PATCH 04/10] ASoC: imx: " Anton Vorontsov
2012-11-23  0:49 ` [PATCH 05/10] ARM: FIQ: Remove enable_fiq() and disable_fiq() calls Anton Vorontsov
2012-11-23  0:49 ` [PATCH 06/10] ARM: FIQ: Remove FIQ_START Anton Vorontsov
2012-11-23  0:50 ` [PATCH 07/10] ARM: FIQ: Should include asm/mach/irq.h Anton Vorontsov
2012-11-23  0:50 ` [PATCH 08/10] ARM: FIQ: Implement !CONFIG_FIQ stubs Anton Vorontsov
2012-11-23  0:50 ` [PATCH 09/10] ARM: FIQ: Make show_fiq_list() return void Anton Vorontsov
2012-11-23  0:50 ` [PATCH 10/10] ARM: FIQ: Get rid of init_FIQ() Anton Vorontsov
2012-11-23  3:40   ` Alexander Shiyan
2012-11-23  5:53     ` Anton Vorontsov
2012-11-23  6:27       ` Re[2]: " Alexander Shiyan
2012-11-23  6:50         ` Anton Vorontsov
2012-11-23  7:36           ` Re[2]: " Alexander Shiyan
2012-11-23  7:51             ` Anton Vorontsov
2012-11-27  9:05               ` Anton Vorontsov
  -- strict thread matches above, loose matches on Subject: below --
2012-10-15 21:49 [PATCH resend 0/10] Get rid of FIQ_START/enable/disable_fiq() + some FIQ cleanups Anton Vorontsov
2012-10-15 21:51 ` [PATCH 01/10] ARM: mach-rpc: Don't register FIQs with genirq Anton Vorontsov

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=1353631803-4853-1-git-send-email-anton.vorontsov@linaro.org \
    --to=anton.vorontsov@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).