All of lore.kernel.org
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/10] irqchip: versatile-fpga: add pass-thru enable support
Date: Tue, 20 May 2014 16:09:29 -0500	[thread overview]
Message-ID: <1400620176-7239-4-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1400620176-7239-1-git-send-email-robherring2@gmail.com>

From: Rob Herring <robh@kernel.org>

Set the PIC_ENABLES register when the passthru-mask property is present.
This enables interrupts on the secondary controller to be passed thru
directly to the primary controller.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
---
 drivers/irqchip/irq-versatile-fpga.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 3ae2bb8..328440b 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -26,6 +26,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
@@ -185,6 +187,7 @@ int __init fpga_irq_of_init(struct device_node *node,
 	void __iomem *base;
 	u32 clear_mask;
 	u32 valid_mask;
+	u32 passthru_mask;
 	int parent_irq;
 
 	if (WARN_ON(!node))
@@ -209,6 +212,9 @@ int __init fpga_irq_of_init(struct device_node *node,
 	writel(clear_mask, base + IRQ_ENABLE_CLEAR);
 	writel(clear_mask, base + FIQ_ENABLE_CLEAR);
 
+	if (!of_property_read_u32(node, "passthru-mask", &passthru_mask))
+		writel(passthru_mask, base + PIC_ENABLES);
+
 	return 0;
 }
 #endif
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
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-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>
Subject: [PATCH 03/10] irqchip: versatile-fpga: add pass-thru enable support
Date: Tue, 20 May 2014 16:09:29 -0500	[thread overview]
Message-ID: <1400620176-7239-4-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1400620176-7239-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

Set the PIC_ENABLES register when the passthru-mask property is present.
This enables interrupts on the secondary controller to be passed thru
directly to the primary controller.

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>
---
 drivers/irqchip/irq-versatile-fpga.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 3ae2bb8..328440b 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -26,6 +26,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
@@ -185,6 +187,7 @@ int __init fpga_irq_of_init(struct device_node *node,
 	void __iomem *base;
 	u32 clear_mask;
 	u32 valid_mask;
+	u32 passthru_mask;
 	int parent_irq;
 
 	if (WARN_ON(!node))
@@ -209,6 +212,9 @@ int __init fpga_irq_of_init(struct device_node *node,
 	writel(clear_mask, base + IRQ_ENABLE_CLEAR);
 	writel(clear_mask, base + FIQ_ENABLE_CLEAR);
 
+	if (!of_property_read_u32(node, "passthru-mask", &passthru_mask))
+		writel(passthru_mask, base + PIC_ENABLES);
+
 	return 0;
 }
 #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-20 21:09 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 21:09 [PATCH 00/10] ARM: Versatile irq and clock DT support Rob Herring
2014-05-20 21:09 ` Rob Herring
2014-05-20 21:09 ` [PATCH 01/10] dt/bindings: add passthru-mask property to versatile-fpga-irq Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 12:46   ` Linus Walleij
2014-05-23 12:46     ` Linus Walleij
2014-05-23 13:00     ` Rob Herring
2014-05-23 13:00       ` Rob Herring
2014-05-29  1:30       ` Rob Herring
2014-05-29  1:30         ` Rob Herring
2014-05-20 21:09 ` [PATCH 02/10] dts: versatile: add missing irq controller properties Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-20 21:09 ` Rob Herring [this message]
2014-05-20 21:09   ` [PATCH 03/10] irqchip: versatile-fpga: add pass-thru enable support Rob Herring
2014-05-21  1:41   ` Jason Cooper
2014-05-21  1:41     ` Jason Cooper
2014-05-21 15:35     ` Rob Herring
2014-05-21 15:35       ` Rob Herring
2014-05-21 15:37       ` Jason Cooper
2014-05-21 15:37         ` Jason Cooper
2014-05-23 12:56   ` Linus Walleij
2014-05-23 12:56     ` Linus Walleij
2014-05-20 21:09 ` [PATCH 04/10] irqchip: versatile-fpga: add DT init Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 12:58   ` Linus Walleij
2014-05-23 12:58     ` Linus Walleij
2014-05-20 21:09 ` [PATCH 05/10] ARM: versatile: remove init_irq hook for DT boot Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-20 21:09 ` [PATCH 06/10] dts: versatile: add pl180 compatible strings Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 12:59   ` Linus Walleij
2014-05-23 12:59     ` Linus Walleij
2014-05-20 21:09 ` [PATCH 07/10] dt/bindings: arm-boards: add binding for Versatile core module Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-21  8:24   ` Arnd Bergmann
2014-05-21  8:24     ` Arnd Bergmann
2014-05-21 15:34     ` Rob Herring
2014-05-21 15:34       ` Rob Herring
2014-05-20 21:09 ` [PATCH 08/10] dt/bindings: add compatible string for versatile osc clock Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 13:01   ` Linus Walleij
2014-05-23 13:01     ` Linus Walleij
2014-05-20 21:09 ` [PATCH 09/10] dts: versatile: add clock tree Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 13:28   ` Linus Walleij
2014-05-23 13:28     ` Linus Walleij
2014-05-28 19:30     ` Rob Herring
2014-05-28 19:30       ` Rob Herring
2014-05-20 21:09 ` [PATCH 10/10] clk: versatile: add versatile OSC support Rob Herring
2014-05-20 21:09   ` Rob Herring
2014-05-23 13:31   ` Linus Walleij
2014-05-23 13:31     ` Linus Walleij
2014-05-23 19:13     ` Mike Turquette
2014-05-23 19:13       ` Mike Turquette
2014-05-21  8:26 ` [PATCH 00/10] ARM: Versatile irq and clock DT support Arnd Bergmann
2014-05-21  8:26   ` Arnd Bergmann
2014-05-21 15:29   ` Rob Herring
2014-05-21 15:29     ` Rob Herring

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=1400620176-7239-4-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.