From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40289C433E0 for ; Thu, 28 Jan 2021 08:20:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE9A564D9D for ; Thu, 28 Jan 2021 08:20:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE9A564D9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YdxaQr8GIHqf8btKbfGhcpmgmCFwqNnNwWJZOgjTzjo=; b=JBXhdw0welr23ANX6a8dCGJiw vytrKz++P+i7eejaosTyH1zUnrVF1NgVents/b+gjHHu0VhUuA1RtNpSDWxLw4zXe0k8XcQfwcj5k tn30v5Ov6tJg1VIoqcagvO/OCDoijGDdRzhroaXdrXuSfxSG4GtyOx+MXgmeCmQQwWtaaH+aBzpfQ 0FdEFcb4XAgGYe9M/V1AOcIF7QPmKttORVh7As34l9LdT6Mj0Cd08Edh2tgH3mC6ZSuN0Up63K1Qx u2BHkPBeAwFmeCYWWW7u2cMg9F9lWOgcmrGSPxz1oZnV8qsyAufEuO+9zUP4Abunm668+ZZWhN9jC FohwTRALA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l52Wb-0001a0-Be; Thu, 28 Jan 2021 08:19:33 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l52WX-0001Xq-HN for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2021 08:19:31 +0000 Received: by mail-wm1-x32a.google.com with SMTP id z16so1244636wml.2 for ; Thu, 28 Jan 2021 00:19:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OaDHkLa3cmo9Wol8qwuGHS4BgxQz50ECcY1Y3aHRi6Q=; b=Oyowa+rFa3kOXPrSNGP8xvv2Po05U/VFpGV3TJrHKgGX9preexld2hw22odEfHnPBZ y/yQb/XstNbl5yWuyyOZ9cBJoXwCUu5qe/fwBhgZsDXOy4M3Pm1HdroNQEW4sxD0nkEx R4i36WB0qL4o1k/NE7dEYvbHCjerTayhM733OY6AhMiYeMOeDZotm1j21cuDj+Rqr7rX v0ymsGRhdQhbR7lonQIc9W98g8ysqfNThJ5NxNaDvxmXj9EJFsDp7Rrrrx49ZKPxeoJG irqO/wzKPyTfunE7EGyfob7MRaOQC6YbCrbn8kbq6IEkmTBtDWt+52yTvKVZqAe98NJA P31g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OaDHkLa3cmo9Wol8qwuGHS4BgxQz50ECcY1Y3aHRi6Q=; b=MJrNB+ZxcIoiQdGIHc7/wkki1l7lOj/euvga8xuDaUXb61UEPu3m7Cc5AQD4nGEzuO 4fGSQZ0NNpURYyaPFL/3+oLcBqkOIp6hOYbjynmavjZcNMkgyZruo3MP2IE8yMyq327s o0kMv2/ymjaqYeA+i3YlU3ip8IWGVVIWuRIb54BrsN3Vl7y4J0o5Izsv2ew0Hku1Aaxz kPlCGIZG3WAttWHD5mNg7zWr2ExOZkjQPS9aFaOsok/Mxqemf1P4oLb5gfGUrqHri5ep HXm/+dBn1hI7HPJo25l35k7h41OQ81Oai7H21SJN/RvUKti35x5ih8M/vdlUt34V6eTw Kexw== X-Gm-Message-State: AOAM533Qj/yVBdAdPttLbq6mshDGyLiPvg5uUMRb0fVRnthrtojF62bD gfYYNRFKJ+HyAlbQG6KKu+SJeA== X-Google-Smtp-Source: ABdhPJyMZil5oITulxkk1okkcwfpreeNR6ghrVtonTPnww4tQokRLCN7uNH8lckATwV1szUgwO8IaA== X-Received: by 2002:a7b:cb8a:: with SMTP id m10mr7382596wmi.127.1611821965902; Thu, 28 Jan 2021 00:19:25 -0800 (PST) Received: from trex (182.red-79-146-86.dynamicip.rima-tde.net. [79.146.86.182]) by smtp.gmail.com with ESMTPSA id g187sm5242347wmf.1.2021.01.28.00.19.24 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jan 2021 00:19:25 -0800 (PST) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Thu, 28 Jan 2021 09:19:24 +0100 To: Sai Prakash Ranjan Subject: Re: [PATCH] watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ Message-ID: <20210128081924.GA30289@trex> References: <20210126150241.10009-1-saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210126150241.10009-1-saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210128_031930_568517_F31399A7 X-CRM114-Status: GOOD ( 26.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-watchdog@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bjorn Andersson , Andy Gross , linux-arm-kernel@lists.infradead.org, jorge@foundries.io, Jorge Ramirez-Ortiz , Wim Van Sebroeck , Guenter Roeck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 26/01/21, Sai Prakash Ranjan wrote: > As per register documentation, QCOM_WDT_ENABLE_IRQ which is BIT(1) > of watchdog control register is wakeup interrupt enable bit and > not related to bark interrupt at all, BIT(0) is used for that. > So remove incorrect usage of this bit when supporting bark irq for > pre-timeout notification. Currently with this bit set and bark > interrupt specified, pre-timeout notification and/or watchdog > reset/bite does not occur. > > Fixes: 36375491a439 ("watchdog: qcom: support pre-timeout when the bark irq is available") > Cc: stable@vger.kernel.org > Signed-off-by: Sai Prakash Ranjan > --- > > Reading the conversations from when qcom pre-timeout support was > added [1], Bjorn already had mentioned it was not right to touch this > bit, not sure which SoC the pre-timeout was tested on at that time, > but I have tested this on SDM845, SM8150, SC7180 and watchdog bark > and bite does not occur with enabling this bit with the bark irq > specified in DT. this was tested on QCS404. have you validated there? unfortunately I no longer have access to that hardware or the documentation > > [1] https://lore.kernel.org/linux-watchdog/20190906174009.GC11938@tuxbook-pro/ > > --- > drivers/watchdog/qcom-wdt.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c > index 7cf0f2ec649b..e38a87ffe5f5 100644 > --- a/drivers/watchdog/qcom-wdt.c > +++ b/drivers/watchdog/qcom-wdt.c > @@ -22,7 +22,6 @@ enum wdt_reg { > }; > > #define QCOM_WDT_ENABLE BIT(0) > -#define QCOM_WDT_ENABLE_IRQ BIT(1) > > static const u32 reg_offset_data_apcs_tmr[] = { > [WDT_RST] = 0x38, > @@ -63,16 +62,6 @@ struct qcom_wdt *to_qcom_wdt(struct watchdog_device *wdd) > return container_of(wdd, struct qcom_wdt, wdd); > } > > -static inline int qcom_get_enable(struct watchdog_device *wdd) > -{ > - int enable = QCOM_WDT_ENABLE; > - > - if (wdd->pretimeout) > - enable |= QCOM_WDT_ENABLE_IRQ; > - > - return enable; > -} > - > static irqreturn_t qcom_wdt_isr(int irq, void *arg) > { > struct watchdog_device *wdd = arg; > @@ -91,7 +80,7 @@ static int qcom_wdt_start(struct watchdog_device *wdd) > writel(1, wdt_addr(wdt, WDT_RST)); > writel(bark * wdt->rate, wdt_addr(wdt, WDT_BARK_TIME)); > writel(wdd->timeout * wdt->rate, wdt_addr(wdt, WDT_BITE_TIME)); > - writel(qcom_get_enable(wdd), wdt_addr(wdt, WDT_EN)); > + writel(QCOM_WDT_ENABLE, wdt_addr(wdt, WDT_EN)); > return 0; > } > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel