From patchwork Thu Oct 18 16:06:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Stigge X-Patchwork-Id: 1611851 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 DA489DFB34 for ; Thu, 18 Oct 2012 16:08:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TOsc9-0001Eq-Dj; Thu, 18 Oct 2012 16:06:29 +0000 Received: from mail.work-microwave.de ([62.245.205.51] helo=work-microwave.de) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TOsc5-0001Dr-Fi for linux-arm-kernel@lists.infradead.org; Thu, 18 Oct 2012 16:06:26 +0000 Received: from rst-pc1.lan.work-microwave.de ([192.168.11.78]) (authenticated bits=0) by mail.work-microwave.de with ESMTP id q9IG6GMP029588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Oct 2012 17:06:17 +0100 Received: by rst-pc1.lan.work-microwave.de (Postfix, from userid 1000) id 96B91AE06D; Thu, 18 Oct 2012 18:06:16 +0200 (CEST) From: Roland Stigge To: a.zummo@towertech.it, grant.likely@secretlab.ca, rob.herring@calxeda.com, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] rtc-imxdi: Add devicetree support Date: Thu, 18 Oct 2012 18:06:09 +0200 Message-Id: <1350576370-29098-2-git-send-email-stigge@antcom.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350576370-29098-1-git-send-email-stigge@antcom.de> References: <1350576370-29098-1-git-send-email-stigge@antcom.de> X-FEAS-SYSTEM-WL: rst@work-microwave.de, 192.168.11.78 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Roland Stigge 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 adds device tree support to the rtc-imxdi driver. Signed-off-by: Roland Stigge Acked-by: Sascha Hauer --- Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 17 +++++++++++++++++ drivers/rtc/rtc-imxdi.c | 11 +++++++++++ 2 files changed, 28 insertions(+) --- /dev/null +++ linux-2.6/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt @@ -0,0 +1,17 @@ +* i.MX25 Real Time Clock controller + +This binding supports the following chips: i.MX25, i.MX53 + +Required properties: +- compatible: should be: "fsl,imx25-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: rtc alarm interrupt + +Example: + +rtc@80056000 { + compatible = "fsl,imx53-rtc", "fsl,imx25-rtc"; + reg = <0x80056000 2000>; + interrupts = <29>; +}; --- linux-2.6.orig/drivers/rtc/rtc-imxdi.c +++ linux-2.6/drivers/rtc/rtc-imxdi.c @@ -37,6 +37,7 @@ #include #include #include +#include /* DryIce Register Definitions */ @@ -493,10 +494,20 @@ static int __devexit dryice_rtc_remove(s return 0; } +#ifdef CONFIG_OF +static const struct of_device_id dryice_dt_ids[] = { + { .compatible = "fsl,imx25-rtc" }, + { /* sentinel */ } +}; + +MODULE_DEVICE_TABLE(of, dryice_dt_ids); +#endif + static struct platform_driver dryice_rtc_driver = { .driver = { .name = "imxdi_rtc", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(dryice_dt_ids), }, .remove = __devexit_p(dryice_rtc_remove), };