From patchwork Sat Jul 25 06:25:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Lavra X-Patchwork-Id: 6864491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D2E539F1D4 for ; Sat, 25 Jul 2015 06:29:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1B6720660 for ; Sat, 25 Jul 2015 06:29:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29BB02057F for ; Sat, 25 Jul 2015 06:29:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZIsuA-00017T-V8; Sat, 25 Jul 2015 06:25:54 +0000 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZIsu2-00014a-Tl for linux-arm-kernel@lists.infradead.org; Sat, 25 Jul 2015 06:25:50 +0000 Received: by wibud3 with SMTP id ud3so55978201wib.0 for ; Fri, 24 Jul 2015 23:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=0KzwQAcmsIw8jhmzcEPxbn8zceChZKVxIA0Sz/H41qE=; b=vIK9TY+CdurWJSMDirGM4EYeOfblr6CJGrOFN0AedKn7fsC7FMUA63nddcmbYooaqE Yvbg1ZCMOALS8fiNP1M2js/pQuEgn+j1ogGQxMEIUFmEQTzsK+lXQyudj+hwL+c0b0FX UlTOi97B+c9uanUnE7zsLYbV/5A0ZmusJa5R/HROkZsZKjUyLKPxyCTvREGBhkCtyNRm nIi4j8mv+h3lsAVd+nWVYJb26vPXUHlch4Al5/1PNDGPixy250lP1bKWy6PvgQBW52z6 OiImuSJAt55BhZ15eRz0nSYz0LF4bI01JD+/eCU7hqpMin0VBKwsLfebwYkbcOtW1zhI Fnzw== X-Received: by 10.194.57.232 with SMTP id l8mr36084029wjq.48.1437805525183; Fri, 24 Jul 2015 23:25:25 -0700 (PDT) Received: from [192.168.1.64] ([2.227.237.103]) by smtp.googlemail.com with ESMTPSA id gc4sm1771944wib.23.2015.07.24.23.25.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 23:25:24 -0700 (PDT) Message-ID: <55B32BCE.5050506@gmail.com> Date: Sat, 25 Jul 2015 08:25:18 +0200 From: Francesco Lavra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: wim@iguana.be, maxime.ripard@free-electrons.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] watchdog: sunxi: fix activation of system reset X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150724_232547_381274_93D12D4E X-CRM114-Status: GOOD ( 13.59 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Commit f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") introduced a regression in sunxi_wdt_start(), by which the system reset function of the watchdog is not enabled upon starting the watchdog. As a result, the system is not reset when the watchdog expires. Fix it. Signed-off-by: Francesco Lavra Reviewed-by: Guenter Roeck Fixes: f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") Cc: stable@vger.kernel.org Acked-by: Maxime Ripard --- Changes in v2: - Added Reviewed-by, Fixes, and Cc tags - Fixed commit message --- drivers/watchdog/sunxi_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c index a29afb3..47bd8a1 100644 --- a/drivers/watchdog/sunxi_wdt.c +++ b/drivers/watchdog/sunxi_wdt.c @@ -184,7 +184,7 @@ static int sunxi_wdt_start(struct watchdog_device *wdt_dev) /* Set system reset function */ reg = readl(wdt_base + regs->wdt_cfg); reg &= ~(regs->wdt_reset_mask); - reg |= ~(regs->wdt_reset_val); + reg |= regs->wdt_reset_val; writel(reg, wdt_base + regs->wdt_cfg); /* Enable watchdog */