From patchwork Wed Sep 20 05:30:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 816014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xxpJf6fJXz9s82 for ; Wed, 20 Sep 2017 15:31:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="q94IezjA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="o4XFkDsh"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xxpJd40StzDqYR for ; Wed, 20 Sep 2017 15:31:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="q94IezjA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="o4XFkDsh"; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="q94IezjA"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="o4XFkDsh"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xxpHm2njvzDqBd; Wed, 20 Sep 2017 15:31:00 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4E9BE20E37; Wed, 20 Sep 2017 01:30:58 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 20 Sep 2017 01:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=d2sif+ trFNrk8EaEqbpPgDd9xOzrgIN5Xv3evoe1a/k=; b=q94IezjAjwE3njmPLO0FrV EsLthd1Q5zlWYmJ1pQohwvRkvvDKiGBv8W1UojYnIlx9hiYEk37FAUkzxGFLNM4w 2cqAg1AL3gZgWQK61AIkCYbG94D/KUyjL1fAJPc7TWEqtyjKtW/GGbU2gQnwckgr a0g1hOcGkglgWHgl/Oxh7m4jSJFriOwRqOh1xiZfw+NlF/q09F96d2wHuDLPhrp0 rW0VLE7rr9//LtixJcO0KxfNmbrp3vhGruHMQroYarQ6r2UzYTu9jqWSerrfjb8r wUOdQq8BlTj/+dy6MSsjWubnBVl4l5jgKjizOAfloQGzYD+aeGl5mqnFDecFp8MA == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=d2sif+trFNrk8EaEqbpPgDd9xOzrgIN5Xv3evoe1a /k=; b=o4XFkDshzKouFLv4gcFNc88XNNFc6lbSzqXGKwQ+UTbGGd0cUH/qEcbr/ lhTtZjqQlZpBfR9bKm3Q7EIx9bBiM0qJwGJkMIaPb5aKM1zUQbEe+ExtnAx5f95d 7lsAeCEg80a/3uAaCec/dL+ppxvihSjxYO/XZ5c+MiettHbW9+85Is7ltJnvlJ1S Q+p/kB7ALQU7fWnHp1O+uGYRMBYdiovozpeAU7htHIvt/hyo7MY1T9GfkOe43VQ2 HSRg+605rwqEADwcIttJnDPoK0QFn1L0FEXRcgxJqHO+GeroYfVDumzGfsFkzX7a t7JfaERTzrIVwZDNBJ1IUdu9P/9Eg== X-ME-Sender: X-Sasl-enc: NodKJXea2snAQpmkMaO7EJsmdCAuUhy/D70hj61KMedz 1505885457 Received: from keelia.au.ibm.com (unknown [203.0.153.9]) by mail.messagingengine.com (Postfix) with ESMTPA id A36E37F9CF; Wed, 20 Sep 2017 01:30:54 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH v2 1/4] watchdog: aspeed: Retain watchdog enabled state Date: Wed, 20 Sep 2017 15:00:17 +0930 Message-Id: <20170920053020.6860-2-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920053020.6860-1-andrew@aj.id.au> References: <20170920053020.6860-1-andrew@aj.id.au> X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" An unintended post-condition of probe() is that the watchdog is disabled. This behaviour was introduced by an unnecessary write to the control register to configure the hardware based on the devicetree. The write is unnecessary because the cached control value that is manipulated by the code parsing the devicetree is eventually written by aspeed_wdt_enable(), which is when we care how the control register should be configured. Remove the write to restore expected behaviour. Fixes: b7f0b8ad25f3 ("drivers/watchdog: ASPEED reference dev tree properties for config") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Reviewed-by: Guenter Roeck --- drivers/watchdog/aspeed_wdt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 79cc766cd30f..6c6dd3f4c48d 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -243,9 +243,13 @@ static int aspeed_wdt_probe(struct platform_device *pdev) if (of_property_read_bool(np, "aspeed,external-signal")) wdt->ctrl |= WDT_CTRL_WDT_EXT; - writel(wdt->ctrl, wdt->base + WDT_CTRL); - if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { + /* + * The watchdog is running, but invoke aspeed_wdt_start() to + * write wdt->ctrl to WDT_CTRL to ensure the watchdog's + * configuration conforms to the driver's expectations. + * Primarily, ensure we're using the 1MHz clock source. + */ aspeed_wdt_start(&wdt->wdd); set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); } From patchwork Wed Sep 20 05:30:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 816016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xxpK64HHMz9s82 for ; Wed, 20 Sep 2017 15:32:10 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="hwQKoC6g"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Vp21QdEB"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xxpK62zjKzDqXw for ; Wed, 20 Sep 2017 15:32:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="hwQKoC6g"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Vp21QdEB"; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="hwQKoC6g"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Vp21QdEB"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xxpHr2KnkzDqR8; Wed, 20 Sep 2017 15:31:04 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3487420E58; Wed, 20 Sep 2017 01:31:02 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 20 Sep 2017 01:31:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=K98oC7 DWHC5jGygAgCN3aK6hh4NjNPoubgdTIxY6lx4=; b=hwQKoC6gX60KUPXZKMk/yy +8ySkeu3q/irBDumPlynBC+SZ6OVI/6AkaJgI2m8SBPSxjU/BFRW1b5HLkNjdNgM wmJeVIAsqTYjRRWxYRk4A7Ory5NYjEocFX0NFhS7s0qXS1IGjPVA8zYTgfsMzNAe mwCkgxZnlmur3KiwP+Q1ik5oZRxpGyDXHsVFqyvYCz1l4znuVDGX/aYKLefk6h7A NnHJKEzouo9TpnXF8Oht3om1fOdYvMOZ0Qk6HsCy+7pZEaIzSoewFbtwHFc3zYXL IJPNIWiQjHJMO9DYU8nITn5uO5gafVYH6UtV9k1abiJkBkmCy8FxG2Fol++yBUjg == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=K98oC7DWHC5jGygAgCN3aK6hh4NjNPoubgdTIxY6l x4=; b=Vp21QdEBMmcryH71QKcadNFxnKrVBryb1Pau3EWNyid1aV1gSURXQVfbB SlfXZ9upe3bY05TTKTCu+7gdbezRYrMDrZ2G1tEZuuvYR9W1hfIk9vvPTn+rEaCU jZJJeKGJwcqZto013BMDSwIFCL4CONYC2VdfPUAF2sVt0fqmsy+Uuvrv/5FdMWCS EK5AZBJaGs9qo+kothOHQBc89j5EeO9t6cePCvI86ByUji79ZpLRwJvSihcO36MT WkhZ1XWwsEtTkZosDia6WpLAwuUnGWq9cFc1N773vYd06QEUnpIZF/S/0dDcqlFN rwbpXmxzo8aSfy5SNzr8XSIuMAG8A== X-ME-Sender: X-Sasl-enc: E/Zf9WOZjEiRmXjUw/FbJzMVtrlv4Xb6jIcDWBfYCoka 1505885461 Received: from keelia.au.ibm.com (unknown [203.0.153.9]) by mail.messagingengine.com (Postfix) with ESMTPA id A1BD67E5EE; Wed, 20 Sep 2017 01:30:58 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH v2 2/4] watchdog: aspeed: Fix 'Apseed' typo in Kconfig Date: Wed, 20 Sep 2017 15:00:18 +0930 Message-Id: <20170920053020.6860-3-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920053020.6860-1-andrew@aj.id.au> References: <20170920053020.6860-1-andrew@aj.id.au> X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" Apseed sounds like a good name for a web/mobile start-up incubator, but isn't a reflection of Aspeed themselves. Signed-off-by: Andrew Jeffery Reviewed-by: Guenter Roeck Reviewed-by: Joel Stanley --- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index c722cbfdc7e6..b562d2e03eb9 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -746,7 +746,7 @@ config ASPEED_WATCHDOG select WATCHDOG_CORE help Say Y here to include support for the watchdog timer - in Apseed BMC SoCs. + in Aspeed BMC SoCs. This driver is required to reboot the SoC. From patchwork Wed Sep 20 05:30:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 816019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xxpL11Q9cz9s82 for ; Wed, 20 Sep 2017 15:32:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="cSq7xzff"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="XXGvdE9o"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xxpL06fVGzDqXs for ; Wed, 20 Sep 2017 15:32:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="cSq7xzff"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="XXGvdE9o"; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="cSq7xzff"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="XXGvdE9o"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xxpHw0sZMzDqSL; Wed, 20 Sep 2017 15:31:08 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EC74021358; Wed, 20 Sep 2017 01:31:05 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 20 Sep 2017 01:31:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=1yWqvD Wu5I7snQChfNQ5OVcDpn3v5oxRxzPuvRT1XR8=; b=cSq7xzffBT1aHU2VQN96bL IkaoVlqejfZ2FoPhHReTaYgZk0dx2B0S3Cj7iqW0wQOUukrRYxQh6frcveQoBMm6 kiQQxK0hBA5xbhCBiJcVIwzzI4RMChIHvxj+URTJhWQztwdr12QJ0PJIXUuwsMZI G6aEwoEl8CaHjJoJtZ/x2tamVhBK3qftooI6BveUS7fhu4lX8biFe9GVfmzwYUne s473RZeTYfFvpQQhnlWG0xTOuWeW+YTlZ0qfA4A6+oubaCPt+nj81vQLFmjIt+GW Ke/JGTJzxOZAbqO9asWVGUTTF2l0tSJJQ35Io3hTgjnlL/75Bp9A3ZHlDoh6DzZw == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=1yWqvDWu5I7snQChfNQ5OVcDpn3v5oxRxzPuvRT1X R8=; b=XXGvdE9ohXPSNKPnSBJCrmqBY4sGmi+XFOmuDB8I1gCQKC4rXnHwb4ggg vMKaeBxOQuFm7XvATa48A2sijPaaU9Hku2CLNHT28MIT9rV1C9txQPG4Dw9nsVNn poBZZr5G0zkZ9hdPsl3A+Oljrimr/staYnsBmTTTcvLEEVUGlpHTlJaSOKuw8Xpm jyS6bIeYcCKSpfiovmk4pLzZPnP5tDwEQAYwQCoevL65hKKaEAiRLVJBuxX8EeYy gBKkH0qjS8FffhKiLTqKtipXS6QPjPkhXbdn7HwPDtijXwet78p3UGrcCpoeh36B 6rPfA2bv70vWdZmKu7ypReu3QUYKA== X-ME-Sender: X-Sasl-enc: jmCtL8Mvp2nAtI+20KHYLKKvgt5omHvzEg0YebQv5GoL 1505885465 Received: from keelia.au.ibm.com (unknown [203.0.153.9]) by mail.messagingengine.com (Postfix) with ESMTPA id 94AB17F9D0; Wed, 20 Sep 2017 01:31:02 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH v2 3/4] watchdog: aspeed: Remove specific reference to AST2400 in Kconfig Date: Wed, 20 Sep 2017 15:00:19 +0930 Message-Id: <20170920053020.6860-4-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920053020.6860-1-andrew@aj.id.au> References: <20170920053020.6860-1-andrew@aj.id.au> X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" The driver also supports the watchdog in the AST25xx series, and may work on earlier SoCs as well. Signed-off-by: Andrew Jeffery Reviewed-by: Guenter Roeck Reviewed-by: Joel Stanley --- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b562d2e03eb9..a1b92ebe74b6 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -741,7 +741,7 @@ config RENESAS_RZAWDT Renesas RZ/A SoCs. These watchdogs can be used to reset a system. config ASPEED_WATCHDOG - tristate "Aspeed 2400 watchdog support" + tristate "Aspeed BMC watchdog support" depends on ARCH_ASPEED || COMPILE_TEST select WATCHDOG_CORE help From patchwork Wed Sep 20 05:30:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 816020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xxpL12Hq5z9s8J for ; Wed, 20 Sep 2017 15:32:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="sX/Kig6H"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="gz5lg6Xq"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xxpL115fhzDqYV for ; Wed, 20 Sep 2017 15:32:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="sX/Kig6H"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="gz5lg6Xq"; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="sX/Kig6H"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="gz5lg6Xq"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xxpHz5zJyzDqXw; Wed, 20 Sep 2017 15:31:11 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B373821180; Wed, 20 Sep 2017 01:31:09 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 20 Sep 2017 01:31:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=piamhm GWU1D+LC3R+hmkfdOs2K30OTFSsDxNvKPm1ts=; b=sX/Kig6HZ4PLcTHeIoq6Pn vp82zEUmrLo8tb2sMIr97OrXZxWJ1AfidoU4dXrVc0mFElBl36Bu3j0CoMqY1ZjK hlpSpM/C7EI3j5vLY/A7Nd5ie2kpU2B5ZUiApohcMl2Qyvb5/gWtHs2tH2D6wDO5 RJ3vR94T83ED8rOD8vY/hn/XeRGncmufsgc/Drb8y0cxCx4UhxIya725ObbSaNxR 8g2n/4QmPFETgBX6D1/aEXTstj/WDFBeRofsofx5xY/bfOKuN9MGvEoy7Iq2PaGF LpXd+66CaqcsDaRhKhW/dz69Lr3+F6OiWCdiRnEVkH58xvBdMl/aQSwC5eQmTENA == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=piamhmGWU1D+LC3R+hmkfdOs2K30OTFSsDxNvKPm1 ts=; b=gz5lg6XqtzS4lyd/UbDsKLTOvqc1bsOfz18T8uPw95I5FIvYkTavrWIgR wwJ5q4LnTW0qlsBQynkjMpjRX2tJ/lvsikaPlIvR+tvoacgs8V6teBE4WlV4wBGF BCbXdc7j1gVZRxflLO9DVU8iHqaBXgnAFC2vrxbHFJZNDv1N6Sb7STJiMBm8YIDo ra5v3qsoHbShD/NtMfJHuXQHVFu32jx5vXeupO8uVmvA6ohM1w+emLu4ZaAl1AQh Q3kTE8VYdUJ2tFMvs8LBUzcZCHWRESz0+8ht82jTH5HOtMDRpbU3Diuac75HVa6e cRi58GTFSEtN8hGSFdGWdqqw/8xFg== X-ME-Sender: X-Sasl-enc: C+n/PyTIbKm3hP+ZGTOtMesS1c7tXyi/aDZf0Wo9tio8 1505885468 Received: from keelia.au.ibm.com (unknown [203.0.153.9]) by mail.messagingengine.com (Postfix) with ESMTPA id 3BEDE7E5EE; Wed, 20 Sep 2017 01:31:05 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH v2 4/4] watchdog: aspeed: Move init to arch_initcall Date: Wed, 20 Sep 2017 15:00:20 +0930 Message-Id: <20170920053020.6860-5-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920053020.6860-1-andrew@aj.id.au> References: <20170920053020.6860-1-andrew@aj.id.au> X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" Probing at device_initcall time lead to perverse cases where the watchdog was probed after, say, I2C devices, which then leaves a potentially running watchdog at the mercy of I2C device behaviour and bus conditions. Load the watchdog driver early to ensure that the kernel is patting it well before initialising peripherals. Signed-off-by: Andrew Jeffery Reviewed-by: Guenter Roeck --- drivers/watchdog/aspeed_wdt.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 6c6dd3f4c48d..ca5b91e2eb92 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -316,7 +316,18 @@ static struct platform_driver aspeed_watchdog_driver = { .of_match_table = of_match_ptr(aspeed_wdt_of_table), }, }; -module_platform_driver(aspeed_watchdog_driver); + +static int __init aspeed_wdt_init(void) +{ + return platform_driver_register(&aspeed_watchdog_driver); +} +arch_initcall(aspeed_wdt_init); + +static void __exit aspeed_wdt_exit(void) +{ + platform_driver_unregister(&aspeed_watchdog_driver); +} +module_exit(aspeed_wdt_exit); MODULE_DESCRIPTION("Aspeed Watchdog Driver"); MODULE_LICENSE("GPL");