Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3016774ybc; Thu, 21 Nov 2019 01:58:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzG84G7psCE48geFuz68KuJYkwDvT+53YQjssdVGsZ8bZ5c/VusojbUn7IlI9jNChrCBbho X-Received: by 2002:a17:906:6dc2:: with SMTP id j2mr12568763ejt.140.1574330331065; Thu, 21 Nov 2019 01:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574330331; cv=none; d=google.com; s=arc-20160816; b=C/XxI6GzROODyGjDBBFQusVX9uVX6N7j0Nv8cmx5B5eyOCSZnMByE89Hyd0J6T09y4 gA+Zav3GJJUS8P5N18ilmF27DLXZUD1qkRQl1w6kIG4yQBvfG+Dnu911KPtxQLg7ayk9 P+1DQVwIr8AY64ctqTDxjHpNrcAypzylMCemc+2WtzHEwkGVD8uv22igFojbp5JEFMhH TZqiLEQmxP3vPy+eCOpBgmwkYS0Vy2Lm5sHBT8qdGJhTKRCEjQ1KwRbEU6irzIVwPvfr P0m4qvGTcc5XYAPfmARfURk+Brm2Mt1McNaAH3bvAsmHr0Y8HdjDrLuG0FvUqFR+GJpk hwXQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=FzoSL4YP+wGhKXl+dqpfFhOcKj1KTUkz/Dcb+UIksRo=; b=Vp+HNM3mCOIf59uQeDtkopVtvj/qbs+CVXBfQDfqN3h5S9wQYYHHtEBPokUyeDF1Za Jg19wSI46IJ4IR7rgqpLLnlqMJUjlnHl3HUn6ysuZXcad4tx5kg4Ro45qs9BC8ATRQia 9C/ScAoektAQtD7gHtlrO9rpw3q2Q+jVTljaVeJQvnPjs+dayLudk3xZA65PuzQ5DYQA 9n5gIMgjfe2fbBJKuBbYn8/G3Q/hxqabaLKvHOyTA5X+GOli2Oi44aETvJUv5wsTLVDx tx1XPZg9uQE89Pmk0V2yEJl8GYHAPkwKJ+QFIJNfXrv2x/dMIsF27+ZjL07BVIkYVFTz 9NNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=gkLUSRZ5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si1356385ejj.307.2019.11.21.01.58.26; Thu, 21 Nov 2019 01:58:51 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=gkLUSRZ5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbfKUJ4D (ORCPT + 99 others); Thu, 21 Nov 2019 04:56:03 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38950 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfKUJ4D (ORCPT ); Thu, 21 Nov 2019 04:56:03 -0500 Received: by mail-pg1-f195.google.com with SMTP id b126so1327687pga.6; Thu, 21 Nov 2019 01:56:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=FzoSL4YP+wGhKXl+dqpfFhOcKj1KTUkz/Dcb+UIksRo=; b=gkLUSRZ57R42ncaj1Bx/kvu7relx6lzvV5Xn0I6r0sBxURtE1G5TWry9NP/BMT8BNF 3S+kDKmnBj/WuPhqh4ANh59+4wGbZvZfPCDdxdkO2mA4AyMc11Od74bt54Q0vHa20hAb zG2o/zMVd3//A5wOPM5jlulk4BK2f/GZ7TqIQGxuug6XxqqlHWfQ5pY81l55QICfHn84 EU+fOSNb+9V2NoPd8j3VsqHCJJJmbukdakcn6WNjQeh+05V10vd/ek9g0ao/+K9XZI4I 8eLZrAhFe91mPLk6ze4v3kLC7ZPeaLSKrpVnAsWOEszlazVf4AV5l4FRqhozEpHn3QsP 0W8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FzoSL4YP+wGhKXl+dqpfFhOcKj1KTUkz/Dcb+UIksRo=; b=e7GlTYIvfdO1AdeSpAfI2B1t4Pmmju8aI34nqNqYpFVb8EGRVLmypCbS2Cshh4xy5/ derJijXIGR4gAEpzH05mVe7k2UskTIynBfrfeLmufrtcQZv1cMa7Xf2G+93WQHCl7Ike JcKJGewueSZtG+cIGRJbPTFw6QG1arLPVaDTXZ1m/wMDAs+JU3Ig/XjraLC+aznOAusO hNVeHIrf5k7VKnGGV+ezSjWkFafIvXYzhufwRu8YGplAkiO4isoz/kUu5VOSp+BGGJPU 3beNE+CJjwRIbQU/8ysohcNts1ScpBDTdOfOHxDOF2yEJEe49FHWwfzuHHMHGLuuwdUP atXQ== X-Gm-Message-State: APjAAAVzii1EuhpqAb5tgwVr7DOgpiCjvoTEdrNbzdJbYmafpecqOxGV H6egTqdcAu0W4DfSU8XxQPAwVq62 X-Received: by 2002:aa7:9a96:: with SMTP id w22mr10066954pfi.162.1574330161967; Thu, 21 Nov 2019 01:56:01 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c2sm2614445pfn.55.2019.11.21.01.56.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2019 01:56:01 -0800 (PST) Subject: Re: [PATCH] watchdog: make DesignWare watchdog allow users to set bigger timeout value To: "Wang, Peng 1. (NSB - CN/Hangzhou)" , Guenter Roeck Cc: "wim@linux-watchdog.org" , "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <4468f40ed5f5413ab27825bbcc611d65@nokia-sbell.com> From: Guenter Roeck Message-ID: Date: Thu, 21 Nov 2019 01:56:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <4468f40ed5f5413ab27825bbcc611d65@nokia-sbell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21/19 12:21 AM, Wang, Peng 1. (NSB - CN/Hangzhou) wrote: >>From d21d084122d08816454a1e338f0946a9da1f81e3 Mon Sep 17 00:00:00 2001 > From: Peng Wang > Date: Wed, 20 Nov 2019 15:12:59 +0800 > Subject: [PATCH] watchdog: make DesignWare watchdog allow users to set bigger > timeout value > > watchdog_dev.c provides means to allow users to set bigger timeout value > than HW can support, make DesignWare watchdog align with this. > > Signed-off-by: Peng Wang > --- Please version your patches, and add a change log here. > drivers/watchdog/dw_wdt.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c > index fef7c61..f1a431c 100644 > --- a/drivers/watchdog/dw_wdt.c > +++ b/drivers/watchdog/dw_wdt.c > @@ -114,7 +114,15 @@ static int dw_wdt_set_timeout(struct watchdog_device *wdd, unsigned int top_s) > writel(top_val | top_val << WDOG_TIMEOUT_RANGE_TOPINIT_SHIFT, > dw_wdt->regs + WDOG_TIMEOUT_RANGE_REG_OFFSET); > > - wdd->timeout = dw_wdt_top_in_seconds(dw_wdt, top_val); > + /* > + * In case users set bigger timeout value than HW can support, > + * kernel(watchdog_dev.c) helps to feed watchdog before > + * wdd->timeout No, before wdd->max_hw_heartbeat_ms. > + */ > + if ( top_s * 1000 <= wdd->max_hw_heartbeat_ms ) > + wdd->timeout = dw_wdt_top_in_seconds(dw_wdt, top_val); > + else > + wdd->timeout = top_s; > > return 0; > } >