From patchwork Tue Jun 18 15:20:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2743121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 15794C0AB1 for ; Tue, 18 Jun 2013 15:54:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12472203FE for ; Tue, 18 Jun 2013 15:54:01 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC66E20358 for ; Tue, 18 Jun 2013 15:53:59 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoxrD-0006Wq-E4; Tue, 18 Jun 2013 15:30:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoxlQ-0003Q7-TZ; Tue, 18 Jun 2013 15:24:08 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoxkF-0003Iy-Jy for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2013 15:22:57 +0000 Received: by mail-pa0-f44.google.com with SMTP id lj1so4117726pab.17 for ; Tue, 18 Jun 2013 08:22:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=1/K+2PBu3u68sYPHFwVsXJq9Gj5WRDhEXqnK74lbBdM=; b=YTRs/Hn3fgXtiZOxNhpisMo+skbT0JLQyVOQVBN2208IeYlKM7VQqce/y6dOez00N2 a/mkKo0v5Ymm/uU0rGnBEz8W55BawtRQr+wGAKcQ+o83A4CkBdq9WTpNiXdcXj5oTXrf BCOoayBjP/Kz7obXTbXrX1kHjOdntE1LZrnXIkeZIRSxnK/FzcyKtrtaKFXR+D9w3kpv MOmNtoHUS7t8DtJkaJjW7pu+0uJzaALxgPdIiN3NX9Y+tkVxEhx+xUHIW3CCMHUKtrzB AxGlNwQ+cbRSfXJgOAXfC3IyfG9/CDY06ulpDsNfxaVIKmEHeBODK1w3J05YAOxtT+7m 4A9Q== X-Received: by 10.68.237.106 with SMTP id vb10mr17254686pbc.131.1371568953801; Tue, 18 Jun 2013 08:22:33 -0700 (PDT) Received: from localhost ([122.167.240.191]) by mx.google.com with ESMTPSA id xj9sm18715151pbc.16.2013.06.18.08.22.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Jun 2013 08:22:33 -0700 (PDT) From: Viresh Kumar To: wim@iguana.be Subject: [PATCH V3 14/14] watchdog/mpcore_wdt: Add DT probing support for ARM mpcore watchdog Date: Tue, 18 Jun 2013 20:50:38 +0530 Message-Id: <51fb528c67247ea5ef6c66650f6adf7a2a21bc81.1371535243.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkHArniz1bzYRP9lqVz52AZl4ljbKEKtb9wo8GR4pCuMf7QCZ29EwHnDBvKOSV2zaVYenTK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130618_112255_789893_E3AAE60F X-CRM114-Status: GOOD ( 12.02 ) X-Spam-Score: -1.9 (-) Cc: marc.zyngier@arm.com, Viresh Kumar , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds Device tree probing support for ARM Mpcore watchdog. Its binding were already documented in Documentation/devicetree/bindings/arm/twd.txt. Signed-off-by: Viresh Kumar --- drivers/watchdog/mpcore_wdt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index d7ee4eb..50f5a0b 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -403,6 +404,16 @@ static SIMPLE_DEV_PM_OPS(mpcore_wdt_dev_pm_ops, mpcore_wdt_suspend, /* work with hotplug and coldplug */ MODULE_ALIAS("platform:mpcore_wdt"); +#ifdef CONFIG_OF +static const struct of_device_id mpcore_wdt_id_table[] = { + { .compatible = "arm,cortex-a9-twd-wdt" }, + { .compatible = "arm,cortex-a5-twd-wdt" }, + { .compatible = "arm,arm11mp-twd-wdt" }, + {} +}; +MODULE_DEVICE_TABLE(of, mpcore_wdt_id_table); +#endif + static struct platform_driver mpcore_wdt_driver = { .probe = mpcore_wdt_probe, .remove = mpcore_wdt_remove, @@ -411,6 +422,7 @@ static struct platform_driver mpcore_wdt_driver = { .owner = THIS_MODULE, .name = "mpcore_wdt", .pm = &mpcore_wdt_dev_pm_ops, + .of_match_table = of_match_ptr(mpcore_wdt_id_table), }, };