From patchwork Wed Nov 18 02:45:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 7644381 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C72DABF90C for ; Wed, 18 Nov 2015 02:45:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C06A42053C for ; Wed, 18 Nov 2015 02:45:58 +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 0F8252024D for ; Wed, 18 Nov 2015 02:45:58 +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 1Zyskv-0007Vw-PM; Wed, 18 Nov 2015 02:45:57 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyskl-0007T1-GR for linux-mediatek@lists.infradead.org; Wed, 18 Nov 2015 02:45:48 +0000 Received: by pacdm15 with SMTP id dm15so28503815pac.3 for ; Tue, 17 Nov 2015 18:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=dz6iTD+mvUjyfOfaHKu0n5q8+vXQIvQu49L2HA9uTEE=; b=fNP90VGS46IjIAFi12Izs1ZOFfEd1WgOtGuuKq8lDe7OM5fsfDxYMrGK+yHVGrZSaa bl2IXhv12e1z178BOfu4UfHnSFzKQVg9FB6NAwEco1tBngX7lInT5AdsEpwEkf14j5F9 5DiJ72Q5rxgRJjZMV1mK0aXJ5P0vRgtgPCjYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dz6iTD+mvUjyfOfaHKu0n5q8+vXQIvQu49L2HA9uTEE=; b=k6BCf8z731G59JAEDQaK3473GcYcfvZCNNonrW4Ld5zotNRwOoS/4h7Dkurn8TtsGw z+MO+9pactdshf61KJkv78LN54OnQYqHVqBhnqdVyYTQ0hkTcDsgvSO0ayxZm7ghqwGw LizAC4mN+u047OR7yjBcVqQLdRSChbjkptZ6+rQQjQdAL9f9FQZMbLtpEfCxWOZsS2F5 Ra/xWhv75onrX9+lWTWDBa2Xz+XzlTqrrA1L9uHQ9cMx2AiU0ohurcgzUw/jTqOP1uZ1 75y/hTz/MNvoBPFl20OeMo6Mz35EGKEz0HOljZkdidHPFc5g3k/VkgTkskRHeU7Je6lr owPw== X-Gm-Message-State: ALoCoQne5oawtggMNFbHtBvU11co+JTbo31ey4QYVOwIWgdTAAnqbtd9hdPQQnvAbQkNcLRZ4HFy X-Received: by 10.66.117.199 with SMTP id kg7mr52903555pab.105.1447814726146; Tue, 17 Nov 2015 18:45:26 -0800 (PST) Received: from drinkcat.tpe.corp.google.com ([172.30.210.53]) by smtp.gmail.com with ESMTPSA id wh10sm464933pab.2.2015.11.17.18.45.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 18:45:25 -0800 (PST) From: Nicolas Boichat To: Matthias Brugger Subject: [PATCH] watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog Date: Wed, 18 Nov 2015 10:45:01 +0800 Message-Id: <1447814701-23504-1-git-send-email-drinkcat@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_184547_604145_3EFAA5F1 X-CRM114-Status: GOOD ( 10.29 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wim Van Sebroeck , linux-mediatek@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 WDT_MODE value need to be or-ed with MODE_KEY when setting watchdog mode. Add it to mtk_wdt_stop function, so that the watchdog can be stopped (e.g. during suspend). Signed-off-by: Nicolas Boichat Reviewed-by: Guenter Roeck Acked-by: Matthias Brugger --- drivers/watchdog/mtk_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 6ad9df9..b751f43 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev) reg = readl(wdt_base + WDT_MODE); reg &= ~WDT_MODE_EN; + reg |= WDT_MODE_KEY; iowrite32(reg, wdt_base + WDT_MODE); return 0;