From patchwork Mon Sep 18 05:49:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 814775 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 3xwZst14Cdz9s7F for ; Mon, 18 Sep 2017 15:52:50 +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="ilEDdyWa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OXQB1/kd"; 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 3xwZss4hXrzDrhL for ; Mon, 18 Sep 2017 15:52:49 +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="ilEDdyWa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OXQB1/kd"; dkim-atps=neutral X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@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="ilEDdyWa"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="OXQB1/kd"; 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 3xwZpn2TdHzDrbL; Mon, 18 Sep 2017 15:50:09 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 75DC820B00; Mon, 18 Sep 2017 01:50:06 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 18 Sep 2017 01:50:06 -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=T9AdEQ dqS2BwgFgh5MAUBA55GqXLjQqTwLlJFBDxfhA=; b=ilEDdyWaon9PGaCK/tYHSF 8bptId+L9y0qoYBbh0+aDGrMNh/c+IhbvebnqUTS0w819Jo0GgK0Rkaxbxf790Cm iX4vmRM2Yzyu9Zl3kQsIeg0lo9qSmAQTjYSIiMBK8E0SDt+rcDteaXh651r7/Fav ZTQAJrvm1AkbTh7lKV83e8wyQxYJZX1YNz7fQd2y5S2sdjPwEdXH7eNWfjBvM759 yzncuu9O/IqTNJMgeM7OX03sbbeW2LB/pl2JrVs2HC6qTokDq4VwrT+y/W4VHtqr nWNR/bM32nXeHFIbPVqGrHATrru1O58ilaqTo6VuHPcr1GJynWfQueVWKHJv9aQw == 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=T9AdEQdqS2BwgFgh5MAUBA55GqXLjQqTwLlJFBDxf hA=; b=OXQB1/kdTtGrrqspurmkJKi8jnMtcKWKUqUYXtgYCP6x/Qv/OwTVBI3YA 9JHXgLnZI6u69VxRz6a1W5IWglyVGP0jpi+LbBGfsNclxSHu9ZiLNMO0ywPJul7P 23ZxC7of+/uxLvYZn6WcfEjRmiZ1EikvsYivIlYTHxl40oxRAmTpDz60I/Ccclt2 EawSckgFPZ6xkiUL+c1zdQMOLR+ECNWf6AclA2RlGwvHuCG1Zg+3afftao2XlUtv gEbL1qJEejTsj1Xi5Y+rewaHzk0+GL2CYIIud0k4hgpz1c6HYynUxu4yDTpXVY6K DOWZ/B7hFcLV7hEFP77lyN6jUGbzA== X-ME-Sender: X-Sasl-enc: DAXxHrmqO6/G0OvwYDy1MNHqWa4iNr3OEQ4fyuHayikj 1505713805 Received: from keelia.au.ibm.com (ppp14-2-0-125.bras21.adl4.internode.on.net [14.2.0.125]) by mail.messagingengine.com (Postfix) with ESMTPA id DBB217FA1C; Mon, 18 Sep 2017 01:50:02 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH 1/4] watchdog: aspeed: Retain watchdog enabled state Date: Mon, 18 Sep 2017 15:19:02 +0930 Message-Id: <20170918054905.16470-2-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170918054905.16470-1-andrew@aj.id.au> References: <20170918054905.16470-1-andrew@aj.id.au> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, Andrew Jeffery , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" An unintended post-condition of probe() is that the watchdog is disabled. Rework probe() such that we retain the value of the "enabled" bit from the control register, and take the appropriate actions with respect to the watchdog core if so. Otherwise, just configure the watchdog as directed. Signed-off-by: Andrew Jeffery --- drivers/watchdog/aspeed_wdt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 79cc766cd30f..99bc6fbd8852 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -221,7 +221,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev) return -EINVAL; config = ofdid->data; - wdt->ctrl = WDT_CTRL_1MHZ_CLK; + wdt->ctrl |= readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE; + wdt->ctrl |= WDT_CTRL_1MHZ_CLK; /* * Control reset on a per-device basis to ensure the @@ -243,11 +244,11 @@ 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) { + if (wdt->ctrl & WDT_CTRL_ENABLE) { aspeed_wdt_start(&wdt->wdd); set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); + } else { + writel(wdt->ctrl, wdt->base + WDT_CTRL); } if (of_device_is_compatible(np, "aspeed,ast2500-wdt")) { From patchwork Mon Sep 18 05:49:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 814777 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 3xwZtG0g4Nz9s7F for ; Mon, 18 Sep 2017 15:53: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="filSgt2A"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="erf7i7ZQ"; 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 3xwZtF6XCQzDrW7 for ; Mon, 18 Sep 2017 15:53:09 +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="filSgt2A"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="erf7i7ZQ"; dkim-atps=neutral X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@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="filSgt2A"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="erf7i7ZQ"; 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 3xwZpr3VQJzDrZV; Mon, 18 Sep 2017 15:50:12 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5DC1D2088D; Mon, 18 Sep 2017 01:50:10 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 18 Sep 2017 01:50:10 -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=oEqgc/ n6xegAPXK++myBPN7liwQ3HCMzsBRadKzD2ro=; b=filSgt2A/UiLvpC4UXANXT TpUjZAD/leTrIEGNoJg5kJAUKeD205whOXTjGYOfPoq1JxAaSpVWhNs2qbRV/BVi 6/2Twp+G0J8VfKUtruM2LWR0KHNqlXy+7qRADdpSBMlp3IbZDJbChmrnGFL6IXZV A5ofd8DuiBR3gIetmuoj9vwCNDnBRQQki1AKpn4aot97LLPeh8Mduyt0GCR6D4Ou uB8NgXHUyk36r0cBTlrlQM5m9rYx5bJpS6divvDxMqincUytLLoHQWAli5xUCILq l1X+eaB9inElYVZp3Ax6pYIpm1Zx/F3shIzk7MjEFKL2H85zxl2y0j8twB/J+ozQ == 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=oEqgc/n6xegAPXK++myBPN7liwQ3HCMzsBRadKzD2 ro=; b=erf7i7ZQmdEzvqIiUd4v8UCHJ2lflO8+pEwGMp4fI3BGosShaTIbmT2eN zRPdKBm1Ur/fWTZKlJiL2cZXqCjoKOAQ1799c5TdgPwSi0R6Y4KTRex0EhGjpUNF OV2Un+mKgFq4WPhiCpOVCo+XHoFW7uii/Tr+3CfCqt6t6mLUcuZj3YLGTq36izNJ hQAqko890sWOmxn5I7Z2k9el1vQLA9wH5YnE1ir7IHj/kpqS9y2+2DBbZ5LfrPrt aYebbHYy+N6eNltOHkioZKbonRPjL/GEKMjlklbmxLeTfKPHNBvkivi4Bq+JU5lp N76k+ZD365dRvyH39SH/qvXhZBiuA== X-ME-Sender: X-Sasl-enc: Ze0AelNBTQ5cZba0qsldvN5o+HlX/8OsIcbZXqJeW/1q 1505713809 Received: from keelia.au.ibm.com (ppp14-2-0-125.bras21.adl4.internode.on.net [14.2.0.125]) by mail.messagingengine.com (Postfix) with ESMTPA id D9E7E7E183; Mon, 18 Sep 2017 01:50:06 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH 2/4] watchdog: aspeed: Fix 'Apseed' typo in Kconfig Date: Mon, 18 Sep 2017 15:19:03 +0930 Message-Id: <20170918054905.16470-3-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170918054905.16470-1-andrew@aj.id.au> References: <20170918054905.16470-1-andrew@aj.id.au> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, Andrew Jeffery , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" 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 Rocek --- 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 Mon Sep 18 05:49:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 814780 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 3xwZtd23tmz9s7F for ; Mon, 18 Sep 2017 15:53:29 +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="uPcYUutk"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="rU4b4Utb"; 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 3xwZtd0zDwzDrcJ for ; Mon, 18 Sep 2017 15:53:29 +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="uPcYUutk"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="rU4b4Utb"; dkim-atps=neutral X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@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="uPcYUutk"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="rU4b4Utb"; 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 3xwZpw06mbzDrbQ; Mon, 18 Sep 2017 15:50:16 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id DEEA420AF9; Mon, 18 Sep 2017 01:50:13 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 18 Sep 2017 01:50:13 -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=Elm061 2bhiyEzgkKbe+5MMPmOnMh2TPJTCw5xCQLFPc=; b=uPcYUutkR1Mjqon8vqVUyL ICOKJxHWFMsWtbQqtX/HzNqsY1XY9cNWP9xkHTkjpYfe5dc7fwiftwKwV94N38R5 A8LT+9QZMAj1znhapy4L9MrRfsyLcE1/TSYy9fJDDKv9sDJVbLvNjVXsM3fHWhqi /WG1mn2EEDrSM0yO2W2Y70ISnxS/KPO457j6nwtQMc+q2jwEaDcuzT9bc5sgOY62 ONq7FYJvQPw4moeRVmAwZJ8msFItVBaZUzNNGdSzv2GVnFuzon6v9CHdjD5+LEWc XGnOg6Xu1I7GsMibTwsdhuKZV19XYMr420+sKZwu9EWI4HBsSnDgtbDnd3c8riIg == 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=Elm0612bhiyEzgkKbe+5MMPmOnMh2TPJTCw5xCQLF Pc=; b=rU4b4Utbz7C4rd745zw1kTsdFW0dln8TbkLy3s59gSXD5SFKT4r363wCm Ml0RTGbXXNLSrvztrSjD8jjO6eg34DjgLdDSOH8s0H+Pj3Pvue7bCxmu9Kobkhvf a/W0vFqwMdpNWZelGY1tvWqxBcr2n2l18ePg4se03LospbX/5i5q98xb4uvQZ5TT sjQtZgfcgrnFx9fS3EQMazfD8A9y7Tu0PARyNomWGHt7idUEGxq47SlsdCYA+J/d OdnTn9Hq+RgIAWeB751ESh7CXHtpD63kPB7tNZsKIhpHzK690sI5Qw0VN0quosSe wbF7MSA/WfKZegOJjMnCqD3LLekPQ== X-ME-Sender: X-Sasl-enc: BzCAyW9ogY3Uw0uXQ+yfmQJi+fC2v9Sa9ZIudZ30cLjQ 1505713813 Received: from keelia.au.ibm.com (ppp14-2-0-125.bras21.adl4.internode.on.net [14.2.0.125]) by mail.messagingengine.com (Postfix) with ESMTPA id AAF107E183; Mon, 18 Sep 2017 01:50:10 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH 3/4] watchdog: aspeed: Remove specific reference to AST2400 in Kconfig Date: Mon, 18 Sep 2017 15:19:04 +0930 Message-Id: <20170918054905.16470-4-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170918054905.16470-1-andrew@aj.id.au> References: <20170918054905.16470-1-andrew@aj.id.au> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, Andrew Jeffery , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" 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 --- 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 Mon Sep 18 05:49:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 814782 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 3xwZv04h9vz9s7F for ; Mon, 18 Sep 2017 15:53:48 +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="uaJp86SA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="M441g2t1"; 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 3xwZv03VSqzDrcJ for ; Mon, 18 Sep 2017 15:53:48 +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="uaJp86SA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="M441g2t1"; dkim-atps=neutral X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@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="uaJp86SA"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="M441g2t1"; 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 3xwZq03kFRzDrZx; Mon, 18 Sep 2017 15:50:20 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D76B820A4D; Mon, 18 Sep 2017 01:50:17 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 18 Sep 2017 01:50:17 -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=BgM0nG RIWOykUxBASDdRHsLpvjv/DxPAGMjLrhip/08=; b=uaJp86SAZez2ASPo+Ia/LL StZb2sC78dF50s8ns7/OiiWoY7MbeBC/D8l3i8B21cm5cdVfZVQBtb3Kjz0Lpe2J V8Gow4GzzNUHYZMITt7DbhF5G2KrcYg6U4INIUjdRgjrq0Jjx84P60i2GUHqDkIn mCS5qVk3IKeAp+kbXu2dcSqWk1h9u6B38oPubhP7NuTgl1jXoUCZA790ijSO4yPD UGuRLkFlrew8OEFNlPMxryCU9RsmyN28lJFns7NyPkBY5I3b0DeHxLlAz2N7SvJB 7MfWYfyKSgK9nzo95la3lSD5LadTorBEmKozq8lxyPrGKnhnzfwNQSRzelqUS3sw == 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=BgM0nGRIWOykUxBASDdRHsLpvjv/DxPAGMjLrhip/ 08=; b=M441g2t1bZhJcTWxe78G5VTp37LmoG58qzuGZioEc6+MHoL2bKwp11wOH AionsRwS2tYj/jbACqMHsnNrtatPDvOICZXunWWVtPrZgu1hCMp4QhHWAQEDnbrO 0qtzg9Sv3JIrJIrbXZJO+Hh3ezYd2LpjiMbgq306eWfB2iVG/hBIVKN/NUsNMyky IXLcnOJi1BjmYIz6fivtOppXOdcqR6Ip2Oq26mEEuFI7gr4TAomC/K280YKODJhn DOsmXWDHIN/f4m8zZ+vK3UVZ+LllZllrJ+vY/BpAZlEleJwghrsr3BlkVSjY0kp+ 4IHl1JD3liSIvwDyHsnzOsuPDZbkQ== X-ME-Sender: X-Sasl-enc: LtH+odbAc08lmuOZoOK3teUwjtETKE0RdbBXLTadCQWR 1505713817 Received: from keelia.au.ibm.com (ppp14-2-0-125.bras21.adl4.internode.on.net [14.2.0.125]) by mail.messagingengine.com (Postfix) with ESMTPA id 5A1407E183; Mon, 18 Sep 2017 01:50:14 -0400 (EDT) From: Andrew Jeffery To: linux-watchdog@vger.kernel.org Subject: [PATCH 4/4] watchdog: aspeed: Move init to arch_initcall Date: Mon, 18 Sep 2017 15:19:05 +0930 Message-Id: <20170918054905.16470-5-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170918054905.16470-1-andrew@aj.id.au> References: <20170918054905.16470-1-andrew@aj.id.au> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org, Andrew Jeffery , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, wim@iguana.be, linux@roeck-us.net Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" Probing at device_initcall time lead to perverse cases where the watchdog was probed after, say, I2C, 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 --- drivers/watchdog/Kconfig | 6 ++---- drivers/watchdog/aspeed_wdt.c | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index a1b92ebe74b6..6103185983ed 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -741,8 +741,9 @@ config RENESAS_RZAWDT Renesas RZ/A SoCs. These watchdogs can be used to reset a system. config ASPEED_WATCHDOG - tristate "Aspeed BMC watchdog support" + bool "Aspeed BMC watchdog support" depends on ARCH_ASPEED || COMPILE_TEST + default y if ARCH_ASPEED select WATCHDOG_CORE help Say Y here to include support for the watchdog timer @@ -750,9 +751,6 @@ config ASPEED_WATCHDOG This driver is required to reboot the SoC. - To compile this driver as a module, choose M here: the - module will be called aspeed_wdt. - config ZX2967_WATCHDOG tristate "ZTE zx2967 SoCs watchdog support" depends on ARCH_ZX diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 99bc6fbd8852..679c35abadc4 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -313,7 +313,12 @@ 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); MODULE_DESCRIPTION("Aspeed Watchdog Driver"); MODULE_LICENSE("GPL");