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: 7644391 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B9AD8BF90C for ; Wed, 18 Nov 2015 02:48:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4BA520620 for ; Wed, 18 Nov 2015 02:48:07 +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 901A52060C for ; Wed, 18 Nov 2015 02:47:53 +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 1Zyskp-0007VH-O1; Wed, 18 Nov 2015 02:45:51 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyskl-0007Sz-Fm for linux-arm-kernel@lists.infradead.org; Wed, 18 Nov 2015 02:45:48 +0000 Received: by padhx2 with SMTP id hx2so28530214pad.1 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=WLLRbqsaACQO12bMr0nZCSSAGGS+xbvY7567F2x3dQBf2MczahZte1WpPLU/+QyU1Q K72VIqyTulfKBlheal836BlvTTPNOExsydGYD6rh+PdZ6XVTfNQzvZGyH1PtZ7PYvA+l 2uaXL90dC1zjW1Eg0nlIduPFdFNbUysNcOAKbWuNJgT3XgumRxuq3x1B6sSbYpfHXvZX aYUpmemoQXAcZmTNrqMo1/KY9T+MJsab9O+WGEJW4qdszNqAvJOrEPNzXSGipfmkvDef b2CVs58rOdjPhcQLhw+Vf6Nvyj1lodmZsf1rM+yJCf5tbp9WHzNy36jf1xEKibMsDXkB 1sKw== X-Gm-Message-State: ALoCoQnHby1kgKQfoVKG3L1uQ33fwF49grl4nMLoY0jtMNd1zyNkj3bGCSiQC9sr1EF5CcApzKm3 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_638450_27B8F6A2 X-CRM114-Status: GOOD ( 13.06 ) 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: , 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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;