devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Subject: [PATCH v2 03/11] irqchip: versatile-fpga: add support for arm,versatile-sic
Date: Thu, 29 May 2014 17:40:13 -0500	[thread overview]
Message-ID: <1401403221-27523-4-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1401403221-27523-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

The secondary controller on ARM Versatile AB and PB is similar to
other ARM platforms, but has a pass-thru register to connect some
interrupts directly to interrupt inputs on the primary interrupt
controller. The PIC_ENABLES register needs to be configured for
proper operation when the matching node is arm,versatile-sic. Add the
the necessary IRQCHIP_DECLARE as well.

Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
v2:
- Rework to use the compatible string for pass-thru register setup.

 drivers/irqchip/irq-versatile-fpga.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 8e0bb56..90bf131 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -28,6 +28,8 @@
 #define FIQ_ENABLE_SET		0x28
 #define FIQ_ENABLE_CLEAR	0x2C
 
+#define PIC_ENABLES             0x20	/* set interrupt pass through bits */
+
 /**
  * struct fpga_irq_data - irq data container for the FPGA IRQ controller
  * @base: memory offset in virtual memory
@@ -213,7 +215,15 @@ int __init fpga_irq_of_init(struct device_node *node,
 	writel(clear_mask, base + IRQ_ENABLE_CLEAR);
 	writel(clear_mask, base + FIQ_ENABLE_CLEAR);
 
+	/*
+	 * On Versatile AB/PB, some secondary interrupts have a direct
+	 * pass-thru to the primary controller which need to be enabled.
+	 */
+	if (of_device_is_compatible(node, "arm,versatile-sic"))
+		writel(0xffd00000, base + PIC_ENABLES);
+
 	return 0;
 }
 IRQCHIP_DECLARE(arm_fpga, "arm,versatile-fpga-irq", fpga_irq_of_init);
+IRQCHIP_DECLARE(arm_fpga_sic, "arm,versatile-sic", fpga_irq_of_init);
 #endif
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-05-29 22:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 22:40 [PATCH v2 00/11] ARM: Versatile irq and clock DT support Rob Herring
     [not found] ` <1401403221-27523-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-29 22:40   ` [PATCH v2 01/11] dts: versatile: add missing irq controller properties Rob Herring
2014-05-29 22:40   ` [PATCH v2 02/11] irqchip: versatile-fpga: Add IRQCHIP_DECLARE support Rob Herring
     [not found]     ` <1401403221-27523-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:43       ` Linus Walleij
2014-05-29 22:40   ` Rob Herring [this message]
     [not found]     ` <1401403221-27523-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:46       ` [PATCH v2 03/11] irqchip: versatile-fpga: add support for arm,versatile-sic Linus Walleij
2014-05-29 22:40   ` [PATCH v2 04/11] ARM: integrator: convert to use irqchip_init Rob Herring
     [not found]     ` <1401403221-27523-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:47       ` Linus Walleij
2014-05-29 22:40   ` [PATCH v2 05/11] ARM: versatile: remove init_irq hook for DT boot Rob Herring
     [not found]     ` <1401403221-27523-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:48       ` Linus Walleij
2014-05-29 22:40   ` [PATCH v2 06/11] dts: versatile: add pl180 compatible strings Rob Herring
2014-05-29 22:40   ` [PATCH v2 07/11] dt/bindings: arm-boards: add binding for Versatile core module Rob Herring
     [not found]     ` <1401403221-27523-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:49       ` Linus Walleij
2014-05-29 22:40   ` [PATCH v2 08/11] dt/bindings: add compatible string for versatile osc clock Rob Herring
2014-05-29 22:40   ` [PATCH v2 09/11] ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock Rob Herring
2014-05-29 22:40   ` [PATCH v2 10/11] dts: versatile: add clock tree Rob Herring
     [not found]     ` <1401403221-27523-11-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:52       ` Linus Walleij
2014-05-29 22:40   ` [PATCH v2 11/11] clk: versatile: add versatile OSC support Rob Herring
     [not found]     ` <1401403221-27523-12-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-30  9:55       ` Linus Walleij
2014-05-30 23:03       ` Mike Turquette
2014-05-31  2:38         ` Rob Herring
2014-06-02 21:08           ` Mike Turquette
2014-05-30  9:41   ` [PATCH v2 00/11] ARM: Versatile irq and clock DT support Linus Walleij
     [not found]     ` <CACRpkdZhtAG7ThDvzTi6UBrF=ALd3huHquWQ+t-aaSBZOAfy6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-30 12:17       ` Rob Herring
2014-06-21  2:10       ` Jason Cooper
     [not found]         ` <20140621021044.GC21711-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-06-23 11:08           ` Linus Walleij
     [not found]             ` <CACRpkdYncrY2Ne2UoayEmYD6cg52umEJ0SgU9ZHO4PretgjWrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-26 12:52               ` Linus Walleij

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=1401403221-27523-4-git-send-email-robherring2@gmail.com \
    --to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.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).