linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 15/16] ARM: fiq: save FIQ_START by passing absolute fiq number
Date: Thu, 14 Jun 2012 13:59:46 +0800	[thread overview]
Message-ID: <1339653587-4832-16-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1339653587-4832-1-git-send-email-shawn.guo@linaro.org>

The commit a2be01b (ARM: only include mach/irqs.h for !SPARSE_IRQ)
makes mach/irqs.h only be included for !SPARSE_IRQ build.  There are
a nubmer of platforms have FIQ_START defined in mach/irqs.h.

  arch/arm/mach-at91/include/mach/irqs.h:#define FIQ_START AT91_ID_FIQ
  arch/arm/mach-rpc/include/mach/irqs.h:#define FIQ_START         64
  arch/arm/mach-s3c24xx/include/mach/irqs.h:#define FIQ_START             IRQ_EINT0
  arch/arm/plat-mxc/include/mach/irqs.h:#define FIQ_START 0
  arch/arm/plat-omap/include/plat/irqs.h:#define FIQ_START                1024

If SPARSE_IRQ is enabled for any of these platforms, the following
compile error will be seen.

  arch/arm/kernel/fiq.c: In function ?enable_fiq?:
  arch/arm/kernel/fiq.c:127:19: error: ?FIQ_START? undeclared (first use in this function)
  arch/arm/kernel/fiq.c:127:19: note: each undeclared identifier is reported only once for each function it appears in
  arch/arm/kernel/fiq.c: In function ?disable_fiq?:
  arch/arm/kernel/fiq.c:132:20: error: ?FIQ_START? undeclared (first use in this function)

Though FIQ_START is defined in above 5 platforms, a grep on the whole
tree only reports the following users of enable_fiq/disable_fiq.

  arch/arm/mach-rpc/dma.c
  drivers/media/video/mx1_camera.c
  sound/soc/fsl/imx-pcm-fiq.c

That said, only rpc and imx are actually using enable_fiq/disable_fiq.

The patch changes enable_fiq/disable_fiq a little bit to have the
absolute fiq number than offset passed into by parameter "fiq".  While
fiq on imx starts from 0, only rpc needs a fix-up to adapt the change.

With this change, all those FIQ_START definitions in platform irqs.h
can be removed now, but we chose to leave the decision to platform
maintainers, it should be removed or just left there as a document
on where fiq starts on the platform.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/kernel/fiq.c                 |    4 ++--
 arch/arm/mach-rpc/include/mach/irqs.h |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index c32f845..5953bea 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -124,12 +124,12 @@ void release_fiq(struct fiq_handler *f)
 
 void enable_fiq(int fiq)
 {
-	enable_irq(fiq + FIQ_START);
+	enable_irq(fiq);
 }
 
 void disable_fiq(int fiq)
 {
-	disable_irq(fiq + FIQ_START);
+	disable_irq(fiq);
 }
 
 EXPORT_SYMBOL(set_fiq_handler);
diff --git a/arch/arm/mach-rpc/include/mach/irqs.h b/arch/arm/mach-rpc/include/mach/irqs.h
index 6868e17..4962bdd 100644
--- a/arch/arm/mach-rpc/include/mach/irqs.h
+++ b/arch/arm/mach-rpc/include/mach/irqs.h
@@ -31,15 +31,15 @@
 #define IRQ_DMAS0		20
 #define IRQ_DMAS1		21
 
-#define FIQ_FLOPPYDATA		0
-#define FIQ_ECONET		2
-#define FIQ_SERIALPORT		4
-#define FIQ_EXPANSIONCARD	6
-#define FIQ_FORCE		7
-
 /*
  * This is the offset of the FIQ "IRQ" numbers
  */
 #define FIQ_START		64
 
+#define FIQ_FLOPPYDATA		(FIQ_START + 0)
+#define FIQ_ECONET		(FIQ_START + 2)
+#define FIQ_SERIALPORT		(FIQ_START + 4)
+#define FIQ_EXPANSIONCARD	(FIQ_START + 6)
+#define FIQ_FORCE		(FIQ_START + 7)
+
 #define NR_IRQS			128
-- 
1.7.5.4

  parent reply	other threads:[~2012-06-14  5:59 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14  5:59 [PATCH 00/16] Enable SPARSE_IRQ support for imx Shawn Guo
2012-06-14  5:59 ` [PATCH 01/16] ARM: imx: eliminate macro IMX_GPIO_TO_IRQ() Shawn Guo
2012-06-14  7:31   ` Dong Aisheng
2012-06-14  7:39     ` Shawn Guo
2012-06-14  8:04       ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 02/16] ARM: imx: eliminate macro IOMUX_TO_IRQ() Shawn Guo
2012-06-14  7:59   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 03/16] ARM: imx: eliminate macro IRQ_GPIOx() Shawn Guo
2012-06-15  9:23   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 04/16] gpio/mxc: move irq_domain_add_legacy call into gpio driver Shawn Guo
2012-06-15  9:26   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 05/16] ARM: imx: move irq_domain_add_legacy call into tzic driver Shawn Guo
2012-06-15  9:29   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 06/16] ARM: imx: move irq_domain_add_legacy call into avic driver Shawn Guo
2012-06-14  7:13   ` Shawn Guo
2012-06-15  9:30     ` Dong Aisheng
2012-07-06  6:26     ` [PATCH] ARM: imx: select IRQ_DOMAIN Uwe Kleine-König
2012-07-06  7:05       ` Shawn Guo
2012-07-06  7:07         ` Uwe Kleine-König
2012-07-06  7:12         ` Sascha Hauer
2012-07-06  7:18           ` [PATCH] ARM: imx: select USE_OF Uwe Kleine-König
2012-07-06  7:31             ` Shawn Guo
2012-07-06  7:47           ` [PATCH v2] " Uwe Kleine-König
2012-07-06  8:04             ` Shawn Guo
2012-07-06 19:15               ` Arnd Bergmann
2012-06-14  5:59 ` [PATCH 07/16] dma: ipu: remove the use of ipu_platform_data Shawn Guo
2012-06-14 10:26   ` Vinod Koul
2012-06-15  9:37   ` Dong Aisheng
2012-06-16  3:01     ` Shawn Guo
2012-06-18  8:19       ` Dong Aisheng
2012-06-18 14:02         ` Shawn Guo
2012-06-19  5:51           ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 08/16] ARM: imx: leave irq_base of wm8350_platform_data uninitialized Shawn Guo
2012-06-15 12:20   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 09/16] ARM: imx: pass gpio than irq number into mxc_expio_init Shawn Guo
2012-06-15 12:21   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 10/16] ARM: imx: add a legacy irqdomain for 3ds_debugboard Shawn Guo
2012-06-15 12:22   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 11/16] ARM: imx: add a legacy irqdomain for mx31ads Shawn Guo
2012-06-18  8:20   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 12/16] i2c: imx: remove unneeded mach/irqs.h inclusion Shawn Guo
2012-06-14  7:30   ` Wolfram Sang
2012-06-18  8:20   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 13/16] ARM: imx: remove unneeded mach/irq.h inclusion Shawn Guo
2012-06-18  8:21   ` Dong Aisheng
2012-06-14  5:59 ` [PATCH 14/16] tty: serial: imx: remove the use of MXC_INTERNAL_IRQS Shawn Guo
2012-06-14 15:37   ` Greg Kroah-Hartman
2012-06-18  8:22   ` Dong Aisheng
2012-06-14  5:59 ` Shawn Guo [this message]
2012-06-18  8:39   ` [PATCH 15/16] ARM: fiq: save FIQ_START by passing absolute fiq number Dong Aisheng
2012-06-18 14:31   ` Shawn Guo
2012-06-18 16:44     ` Russell King - ARM Linux
2012-06-19  5:26       ` Shawn Guo
2012-06-20 22:55         ` Russell King - ARM Linux
2012-06-20 23:40           ` Shawn Guo
2012-06-20 23:53           ` Shawn Guo
2012-06-21  7:37             ` Russell King - ARM Linux
2012-06-21  8:50           ` Shawn Guo
2012-06-25 16:10           ` Shawn Guo
2012-06-14  5:59 ` [PATCH 16/16] ARM: imx: enable SPARSE_IRQ for imx platform Shawn Guo
2012-06-14  7:40   ` Haojian Zhuang
2012-06-14  7:55     ` Shawn Guo
2012-06-18  8:48   ` Dong Aisheng
2012-06-18 15:04     ` Shawn Guo
2012-06-19  6:16       ` Dong Aisheng
2012-06-19  6:47         ` Shawn Guo
2012-06-19  7:21           ` Dong Aisheng
2012-06-19  7:43             ` Shawn Guo
2012-06-19 13:01               ` Dong Aisheng
2012-06-19 13:19                 ` [RFC PATCH 1/1] ARM: imx: enable SPARSE_IRQ for imx Dong Aisheng
2012-06-19 14:06                   ` Shawn Guo
2012-06-20  2:23                     ` Dong Aisheng
2012-06-20  5:40                       ` Shawn Guo
2012-06-20  6:40                         ` Dong Aisheng
2012-06-20 12:57                           ` Shawn Guo
2012-06-20 14:45                             ` Dong Aisheng
2012-06-14  8:00 ` [PATCH 00/16] Enable SPARSE_IRQ support " Sascha Hauer

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=1339653587-4832-16-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@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).