From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/7] ARM: s3c64xx: Add support for OF-based VIC initialization
Date: Thu, 10 Jan 2013 00:41:45 +0100 [thread overview]
Message-ID: <1357774909-29938-4-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1357774909-29938-1-git-send-email-tomasz.figa@gmail.com>
This patch modifies IRQ initialization code of S3C64xx to support
Device Tree-based initialization of VICs.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/mach-s3c64xx/common.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index aef303b..798c5d4 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
+#include <linux/of_irq.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/io.h>
@@ -181,13 +182,26 @@ core_initcall(s3c64xx_dev_init);
1 << (IRQ_HSMMC1 - IRQ_VIC1_BASE) | \
1 << (IRQ_HSMMC2 - IRQ_VIC1_BASE))
+#ifdef CONFIG_OF
+static const struct of_device_id s3c64xx_dt_irq_match[] = {
+ { .compatible = "arm,pl192-vic", .data = vic_of_init, },
+ {},
+};
+#endif
+
void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
{
printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
- /* initialise the pair of VICs */
- vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME);
- vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME);
+ if (!of_have_populated_dt()) {
+ /* initialise the pair of VICs */
+ vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME);
+ vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME);
+ }
+#ifdef CONFIG_OF
+ else
+ of_irq_init(s3c64xx_dt_irq_match);
+#endif
/* add the timer sub-irqs */
s3c_init_vic_timer_irq(5, IRQ_TIMER0);
--
1.8.1
next prev parent reply other threads:[~2013-01-09 23:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 23:41 [RFC PATCH 0/7] Initial Device Tree support for S3C64xx Tomasz Figa
2013-01-09 23:41 ` [RFC PATCH 1/7] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-01-10 11:03 ` Mark Brown
2013-01-10 11:10 ` Tomasz Figa
2013-01-10 11:24 ` Mark Brown
2013-01-09 23:41 ` [RFC PATCH 2/7] ARM: common: vic: Fix invalid first IRQ number in OF-based registration Tomasz Figa
2013-01-09 23:41 ` Tomasz Figa [this message]
2013-01-10 11:10 ` [RFC PATCH 3/7] ARM: s3c64xx: Add support for OF-based VIC initialization Mark Brown
2013-01-09 23:41 ` [RFC PATCH 4/7] ARM: s3c64xx: Fix build error with CONFIG_S3C_DEV_FB disabled Tomasz Figa
2013-01-10 0:15 ` Kukjin Kim
2013-01-10 0:32 ` Tomasz Figa
2013-01-09 23:41 ` [RFC PATCH 5/7] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-01-10 0:24 ` Kukjin Kim
2013-01-10 0:38 ` Tomasz Figa
2013-01-10 10:52 ` Mark Brown
2013-01-10 10:55 ` Tomasz Figa
2013-01-09 23:41 ` [RFC PATCH 6/7] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-01-09 23:41 ` [RFC PATCH 7/7] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
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=1357774909-29938-4-git-send-email-tomasz.figa@gmail.com \
--to=tomasz.figa@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 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).