From patchwork Sun Jan 13 01:10:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1969451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 19FB0DF215 for ; Sun, 13 Jan 2013 01:15:28 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TuC7J-0008PU-V5; Sun, 13 Jan 2013 01:12:06 +0000 Received: from mail-ea0-f180.google.com ([209.85.215.180]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TuC6V-00087X-Dx for linux-arm-kernel@lists.infradead.org; Sun, 13 Jan 2013 01:11:16 +0000 Received: by mail-ea0-f180.google.com with SMTP id c1so899606eaa.39 for ; Sat, 12 Jan 2013 17:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=AHEoxuiCYfSV5DqlVIK9MkXbkhc6dxDnRHw8lHAvtb4=; b=rVIObocpFeqVlFBnVWSPhd5APg38OxY9RWq2MD33GaCwuM0rXJnZK6edVhCzvbxfyr RjUTOsiFQGagEPfkBBd81g9Wj1gpmiAKrYeIz0ckUazJNrP5ijFQ8fE6x3/IetIJwWHP cz5wwOPhxFCIGthbGgEAkIHXOCJay70jluMqgKWVv/JVMzEw75M1dmRPJPj07sgYnA+6 dHibia4OAP712HNEImlxgC/XCP1x4shIfgf9kcGRaSy8mAM2g+R2efFo7/zWPPrVcrLS fJecohKBz44TmV6Od+xO8QwbOdc/pBVIAKqfoYBiCoex8ujtyeU5DSULspXeIBwVc3bJ 1Mdg== X-Received: by 10.14.218.69 with SMTP id j45mr215563824eep.35.1358039473692; Sat, 12 Jan 2013 17:11:13 -0800 (PST) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPS id r1sm15084072eeo.2.2013.01.12.17.11.12 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 17:11:13 -0800 (PST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization Date: Sun, 13 Jan 2013 02:10:55 +0100 Message-Id: <1358039458-31960-4-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com> References: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130112_201115_648339_61A5F4A2 X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.180 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomasz.figa[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, kwangwoo.lee@gmail.com, devicetree-discuss@lists.ozlabs.org, broonie@opensource.wolfsonmicro.com, mcuelenaere@gmail.com, Tomasz Figa , augulis.darius@gmail.com, jacmet@sunsite.dk, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch modifies IRQ initialization code of S3C64xx to support Device Tree-based initialization of VICs. Signed-off-by: Tomasz Figa --- arch/arm/mach-s3c64xx/common.c | 16 ++++++++++++++++ arch/arm/mach-s3c64xx/common.h | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index aef303b..b9c5bec 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -181,6 +182,21 @@ 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, }, + {}, +}; + +void __init s3c64xx_of_init_irq(void) +{ + of_irq_init(s3c64xx_dt_irq_match); + + /* FIXME: add the timer sub-irqs */ + s3c_init_vic_timer_irq(5, IRQ_TIMER0); +} +#endif + void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) { printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 6cfc99b..711f3e0 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h @@ -58,4 +58,8 @@ int __init s3c64xx_pm_late_initcall(void); static inline int s3c64xx_pm_late_initcall(void) { return 0; } #endif +#ifdef CONFIG_OF +extern void s3c64xx_of_init_irq(void); +#endif + #endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */