From: Tomasz Figa <tomasz.figa@gmail.com>
To: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
Kukjin Kim <kgene.kim@samsung.com>,
linux-gpio@vger.kernel.org,
Ian Campbell <ian.campbell@citrix.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
Rob Herring <rob.herring@calxeda.com>,
Russell King <linux@arm.linux.org.uk>,
Stephen Warren <swarren@wwwdotorg.org>,
Thomas Gleixner <tglx@linutronix.de>,
Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
Marc Zyngier <marc.zyngier@arm.com>,
Mark Brown <broonie@kernel.org>,
Tomasz Figa <tomasz.figa@gmail.com>
Subject: [PATCH v7 1/7] ARM: common: vic: Parse interrupt and resume masks from device tree
Date: Wed, 21 Aug 2013 23:21:45 +0200 [thread overview]
Message-ID: <1377120111-25601-2-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1377120111-25601-1-git-send-email-tomasz.figa@gmail.com>
This patch extends vic_of_init to parse valid interrupt sources
and resume sources masks from device tree.
If mask values are not specified in device tree, all sources
are assumed to be valid, as before this patch.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
Documentation/devicetree/bindings/arm/vic.txt | 6 ++++++
drivers/irqchip/irq-vic.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt
index 266716b..bb7137c 100644
--- a/Documentation/devicetree/bindings/arm/vic.txt
+++ b/Documentation/devicetree/bindings/arm/vic.txt
@@ -18,6 +18,9 @@ Required properties:
Optional properties:
- interrupts : Interrupt source for parent controllers if the VIC is nested.
+- interrupt-mask : Bit mask of valid interrupt sources (defaults to all valid)
+- wakeup-mask : Bit mask of interrupt sources that can wake up the system
+ (defaults to all allowed)
Example:
@@ -26,4 +29,7 @@ Example:
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x60000 0x1000>;
+
+ interrupt-mask = <0xffffff7f>;
+ wakeup-mask = <0x0000ff7f>;
};
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 2bbb004..d56750eb 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -469,6 +469,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
int __init vic_of_init(struct device_node *node, struct device_node *parent)
{
void __iomem *regs;
+ u32 interrupt_mask = ~0;
+ u32 wakeup_mask = ~0;
if (WARN(parent, "non-root VICs are not supported"))
return -EINVAL;
@@ -477,10 +479,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
if (WARN_ON(!regs))
return -EIO;
+ of_property_read_u32(node, "interrupt-mask", &interrupt_mask);
+ of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
+
/*
* Passing 0 as first IRQ makes the simple domain allocate descriptors
*/
- __vic_init(regs, 0, ~0, ~0, node);
+ __vic_init(regs, 0, interrupt_mask, wakeup_mask, node);
return 0;
}
--
1.8.3.2
next prev parent reply other threads:[~2013-08-21 21:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 21:21 [PATCH v7 0/7] Initial Device Tree support for S3C64xx Tomasz Figa
2013-08-21 21:21 ` Tomasz Figa [this message]
2013-08-21 23:19 ` [PATCH v7 1/7] ARM: common: vic: Parse interrupt and resume masks from device tree Linus Walleij
2013-08-22 7:57 ` Tomasz Figa
2013-08-22 23:22 ` [PATCH v8 1/7] irqchip: " Tomasz Figa
2013-08-23 18:12 ` Linus Walleij
2013-08-23 22:11 ` Stephen Warren
2013-08-23 23:04 ` Tomasz Figa
2013-08-23 23:19 ` Stephen Warren
2013-08-23 23:33 ` Tomasz Figa
2013-08-24 15:25 ` Rob Herring
2013-08-24 15:31 ` Tomasz Figa
2013-08-24 16:35 ` Rob Herring
2013-08-24 16:57 ` Tomasz Figa
2013-08-23 23:54 ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 2/7] ARM: s3c64xx: Bypass legacy initialization when booting with DT Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 3/7] gpio: samsung: Skip initialization if device tree is present Tomasz Figa
2013-08-21 23:21 ` Linus Walleij
2013-08-22 8:06 ` Tomasz Figa
2013-08-22 9:48 ` Mark Brown
2013-08-22 9:59 ` Kukjin Kim
2013-08-22 23:19 ` Tomasz Figa
2013-08-23 18:11 ` Linus Walleij
2013-08-25 17:21 ` Kukjin Kim
2013-08-22 9:45 ` Kukjin Kim
2013-08-21 21:21 ` [PATCH v7 4/7] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 5/7] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-08-22 23:24 ` [PATCH v8 " Tomasz Figa
2013-08-23 23:56 ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 6/7] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 7/7] ARM: dts: Add dts file for S3C6410-based SMDK6410 board Tomasz Figa
2013-08-25 17:31 ` [PATCH v7 0/7] Initial Device Tree support for S3C64xx Kukjin Kim
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=1377120111-25601-2-git-send-email-tomasz.figa@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ian.campbell@citrix.com \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.de \
/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).