From patchwork Mon Apr 2 18:33:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stigge@antcom.de X-Patchwork-Id: 150215 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 285BEB6EE7 for ; Tue, 3 Apr 2012 04:37:37 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754056Ab2DBSej (ORCPT ); Mon, 2 Apr 2012 14:34:39 -0400 Received: from mail.work-microwave.de ([62.245.205.51]:41945 "EHLO work-microwave.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753925Ab2DBSeh (ORCPT ); Mon, 2 Apr 2012 14:34:37 -0400 Received: from rst-pc1.lan.work-microwave.de ([192.168.11.78]) (authenticated bits=0) by mail.work-microwave.de with ESMTP id q32IXK4s008159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Apr 2012 19:33:20 +0100 Received: by rst-pc1.lan.work-microwave.de (Postfix, from userid 1000) id E988AAE065; Mon, 2 Apr 2012 20:33:19 +0200 (CEST) From: Roland Stigge To: arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, w.sang@pengutronix.de, srinivas.bakki@nxp.com, kevin.wells@nxp.com, gregkh@linuxfoundation.org, netdev@vger.kernel.org, rtc-linux@googlegroups.com, a.zummo@towertech.it, linux-watchdog@vger.kernel.org, wim@iguana.be, jonsmirl@gmail.com Cc: Roland Stigge Subject: [PATCH v2 4/8] wdt: Device tree support for pnx4008-wdt Date: Mon, 2 Apr 2012 20:33:03 +0200 Message-Id: <1333391587-26290-5-git-send-email-stigge@antcom.de> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1333391587-26290-1-git-send-email-stigge@antcom.de> References: <1333391587-26290-1-git-send-email-stigge@antcom.de> X-FEAS-SYSTEM-WL: rst@work-microwave.de, 192.168.11.78 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch adds watchdog support to pnx4008-wdt.c Signed-off-by: Roland Stigge --- Applies to v3.4-rc1 Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt | 13 +++++++++++++ drivers/watchdog/pnx4008_wdt.c | 10 ++++++++++ 2 files changed, 23 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- /dev/null +++ linux-2.6/Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt @@ -0,0 +1,13 @@ +* NXP PNX watchdog timer + +Required properties: +- compatible: must be "nxp,pnx4008-wdt" +- reg: physical base address of the controller and length of memory mapped + region. + +Example: + + watchdog@4003C000 { + compatible = "nxp,pnx4008-wdt"; + reg = <0x4003C000 0x1000>; + }; --- linux-2.6.orig/drivers/watchdog/pnx4008_wdt.c +++ linux-2.6/drivers/watchdog/pnx4008_wdt.c @@ -32,6 +32,7 @@ #include #include #include +#include #include /* WatchDog Timer - Chapter 23 Page 207 */ @@ -201,10 +202,19 @@ static int __devexit pnx4008_wdt_remove( return 0; } +#ifdef CONFIG_OF +static const struct of_device_id pnx4008_wdt_match[] = { + { .compatible = "nxp,pnx4008-wdt" }, + { } +}; +MODULE_DEVICE_TABLE(of, pnx4008_wdt_match); +#endif + static struct platform_driver platform_wdt_driver = { .driver = { .name = "pnx4008-watchdog", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(pnx4008_wdt_match), }, .probe = pnx4008_wdt_probe, .remove = __devexit_p(pnx4008_wdt_remove),