From patchwork Mon Apr 2 12:56:04 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: 150146 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 02C40B6EF3 for ; Mon, 2 Apr 2012 22:58:51 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374Ab2DBM6T (ORCPT ); Mon, 2 Apr 2012 08:58:19 -0400 Received: from mail.work-microwave.de ([62.245.205.51]:37255 "EHLO work-microwave.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752261Ab2DBM6R (ORCPT ); Mon, 2 Apr 2012 08:58:17 -0400 Received: from rst-pc1.lan.work-microwave.de ([192.168.11.78]) (authenticated bits=0) by mail.work-microwave.de with ESMTP id q32Cucd9007343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Apr 2012 13:56:38 +0100 Received: by rst-pc1.lan.work-microwave.de (Postfix, from userid 1000) id 14E38AE065; Mon, 2 Apr 2012 14:56:37 +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 Cc: Roland Stigge Subject: [PATCH 7/7] wdt: Device tree support for pnx4008-wdt Date: Mon, 2 Apr 2012 14:56:04 +0200 Message-Id: <1333371364-21347-8-git-send-email-stigge@antcom.de> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1333371364-21347-1-git-send-email-stigge@antcom.de> References: <1333371364-21347-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),