From patchwork Wed Jan 9 23:41:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1957761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D54123FC5A for ; Wed, 9 Jan 2013 23:45:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tt5ID-0003Y3-9k; Wed, 09 Jan 2013 23:42:45 +0000 Received: from mail-ee0-f46.google.com ([74.125.83.46]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tt5Hb-0003Rw-6j for linux-arm-kernel@lists.infradead.org; Wed, 09 Jan 2013 23:42:09 +0000 Received: by mail-ee0-f46.google.com with SMTP id e53so1088492eek.5 for ; Wed, 09 Jan 2013 15:42:05 -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=pC39j8dtS6x4vv+ryKU0X0Zh8x0ytnbtwck/Sdbq8Ps=; b=OFYLC/XFnl/q7QBUBCJuhGPaVGZaNf34Y+NMuaikjGPI3IcweWaaQ7oSfCJoetZmxQ lmKhEGdQbMgxi1FdU/ZTjSkhM+1XWD9t3AsWqCvYi8t5A5oGGJdayBD3d589C4QbR6C7 DVO5tyxLCDqkWyQHx7zi+I3hzvzcddRTsSH6I4DbV0gOl0zLZ6zjKR9P37ZmxMqFymnH x90kFEHfA65uvlYz8+Y7wEB4LqNlvRJA9vafwFKV8wQL/vnmGZBiGhX1jB9JdOv2eyN/ 3hyFA7dyfISSRsTlsHAphsMDfux+hESpD0sCHfuxblo4wgcPwnMriqfOyWrjVoeLtA6B 4SPg== X-Received: by 10.14.219.72 with SMTP id l48mr187139888eep.37.1357774925087; Wed, 09 Jan 2013 15:42:05 -0800 (PST) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPS id e2sm144296239eeo.8.2013.01.09.15.42.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Jan 2013 15:42:04 -0800 (PST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [RFC PATCH 3/7] ARM: s3c64xx: Add support for OF-based VIC initialization Date: Thu, 10 Jan 2013 00:41:45 +0100 Message-Id: <1357774909-29938-4-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1357774909-29938-1-git-send-email-tomasz.figa@gmail.com> References: <1357774909-29938-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130109_184208_645948_69985DC8 X-CRM114-Status: GOOD ( 11.81 ) 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 [74.125.83.46 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 Reviewed-by: Mark Brown --- 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 #include #include +#include #include #include #include @@ -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);