Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1135914ybf; Sun, 1 Mar 2020 01:42:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxwae0Z+Ttm0CuxiN8Pi+Qqte3mHz5zXOGxgPbt7TEoP3HghkvxiMjYIckJkrDpRZVukrmv X-Received: by 2002:aca:bfc2:: with SMTP id p185mr8560935oif.57.1583055720152; Sun, 01 Mar 2020 01:42:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583055720; cv=none; d=google.com; s=arc-20160816; b=KaUnbIy+IgnaZf5hgTYj0u4+6iWzUC8ZYQlE3/R2oA9CcIrY3HGpZlQvgQduHpXGiK AftbXEZERl97hp+g///3xPmTtcdX96R3e0MPAhQCmwVrqYsf802wiOqxyStnSDJ1TWed uiPMt/OyHqna6gT5uyRWWejfAnN58ggswQKiKUyZRm6siUOdcQFrwrdo6kM4VD1V+x7S F0kN1/MY1lUAFFIImJZOyx54C7ue2UnLGOskiRUO3TEMrz6+dfr+u/gjv8J4l7EiVTj8 ZOex1GhIuYSd/igTNkmfjToaP3TUsLd7E37P/duBCP6CPFcaiuQpgQ8F/Ue9fcXZ+oSK BBBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ljwM/cslWmYZa49ToVvNNNQwrppG+bojanHowBpxQf0=; b=soIVoydGgp1z2PNX5QsOvwLI9FWrCCkWvYRtpAwoqUPUoYMcOy6fBStrmcY1aqPLoz ACBS3f5eY1o41BF2baAEPqrYtJxdnqIt6NIPKUwKe9IWS8EFWjqnSQzE7D4xP5IxESld NW7ngmCakh2dlbWEAwpPRRgqNB9pAp77MR/SQSsXOG8yXSEALHBjTvbHxkcb8C7qoB5b GF9DJr0umy/uUjw0PRxhDWUbo0q2UHcMfmIoJzUAIolymHKr/mKkQCmEkk32h5/DK5hs en8SVgUcTZopC+lBCKhNOaxWWjKzMVq4zWZI9B7YNEGbRQnzkKcprpJx4mGGVK7gaDNw ofjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si4458359oth.267.2020.03.01.01.41.47; Sun, 01 Mar 2020 01:42:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725892AbgCAJln (ORCPT + 99 others); Sun, 1 Mar 2020 04:41:43 -0500 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:38430 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725787AbgCAJln (ORCPT ); Sun, 1 Mar 2020 04:41:43 -0500 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id 0219ehYm028747; Sun, 1 Mar 2020 11:40:43 +0200 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id C7D2660330; Sun, 1 Mar 2020 11:40:43 +0200 (IST) From: Tomer Maimon To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, mark.rutland@arm.com, joel@jms.id.au, avifishman70@gmail.com, tali.perry1@gmail.com, yuenn@google.com, benjaminfair@google.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Tomer Maimon Subject: [PATCH v1 2/4] watchdog: npcm: add restart priority support Date: Sun, 1 Mar 2020 11:40:38 +0200 Message-Id: <20200301094040.123189-3-tmaimon77@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20200301094040.123189-1-tmaimon77@gmail.com> References: <20200301094040.123189-1-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add NPCM watchdog restart priority support. The default restart priority is 128. Signed-off-by: Tomer Maimon --- drivers/watchdog/npcm_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/watchdog/npcm_wdt.c b/drivers/watchdog/npcm_wdt.c index 9c773c3d6d5d..8609c7acf17d 100644 --- a/drivers/watchdog/npcm_wdt.c +++ b/drivers/watchdog/npcm_wdt.c @@ -181,6 +181,7 @@ static int npcm_wdt_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct npcm_wdt *wdt; + u32 priority; int irq; int ret; @@ -196,6 +197,11 @@ static int npcm_wdt_probe(struct platform_device *pdev) if (irq < 0) return irq; + if (of_property_read_u32(pdev->dev.of_node, "nuvoton,restart-priority", &priority)) + watchdog_set_restart_priority(&wdt->wdd, 128); + else + watchdog_set_restart_priority(&wdt->wdd, priority); + wdt->wdd.info = &npcm_wdt_info; wdt->wdd.ops = &npcm_wdt_ops; wdt->wdd.min_timeout = 1; -- 2.22.0