Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3394518rwr; Sun, 7 May 2023 10:41:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Aq4HMOS08ba1S0ltSUNI77+U+tXdUlDrvsWm4UQckEDA95ez7aMWD/MHf7o5wn3riw6Hy X-Received: by 2002:a05:6a20:549f:b0:ec:86a7:4fa5 with SMTP id i31-20020a056a20549f00b000ec86a74fa5mr10421884pzk.30.1683481267919; Sun, 07 May 2023 10:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683481267; cv=none; d=google.com; s=arc-20160816; b=xVPpVuhKAw6NXsfdYyl7UpMroAD3f5QwkM5Pmeqm0vmMUQp6h08/W29OTvPSgUaXN2 rBJD2IfTt9WRejYMu3QMB13s0LI742i6xehOpKJMWc+HumHW7Cwl71XRZcfgG6e2IE+X ykX7dLFZI//N1BmgEejAHRLp7EZYSR/5gUOQUu3M7/cIO7iy54gq/K/jDVcS/LEiL3Xb x03UcLqOBeHclHL6l/lpXqzApnKHgXrRVMLE59i6MuuGgLkq0kkJ9LIdJdRDCEdyITkY /1+VnXV/QYDNGTI+F4Y6Y38AQWQVFHGUYYBfowX5I5AzY2xaNRruk5HQ2mwl55ks8c/X 1fQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=SHSpRQcdxnBWfazUKpw0DqI3b6y9HjxJ9kEUl41GFPE=; b=vg+oS5aqy/T7R7O46dqAUV7svScL41HxaSoCNAU2Xa+e6aNsiE3qZES2VPDaibM0Bv kUz7Ndl+X1iwy075UcazSAZ7N0MHCOa4Dcv3yoC4Hxm3+Lm7UKbl5PfFddBPNorY2EPN eUfuAB4RtKPxoB2AWUr9n7zsEj+V2fsK9m5Gw3PCTeEUPv7iMVyTj9dJXfrrM1eTkAkn Gjt1G6fWu5IxpqfLZowXBMUS6DQl5aylaOiQ9b12g3pZenNuPS3r5AQ6tdzQAYK2UItA FK7tmlEz2INt/vOROyrXBPMitQgU0yGJ1Scled9oSNQ+k38Jnamt+YHvGdv1OwbhRP8+ l4Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-watchdog.org header.s=odk20180602 header.b=m9+uu4TZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=linux-watchdog.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id il9-20020a17090b164900b0024df598ed11si3371269pjb.188.2023.05.07.10.40.53; Sun, 07 May 2023 10:41:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-watchdog.org header.s=odk20180602 header.b=m9+uu4TZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=linux-watchdog.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231628AbjEGRbn (ORCPT + 99 others); Sun, 7 May 2023 13:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjEGRbm (ORCPT ); Sun, 7 May 2023 13:31:42 -0400 Received: from www.linux-watchdog.org (www.linux-watchdog.org [185.87.125.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9D3A71156D; Sun, 7 May 2023 10:31:27 -0700 (PDT) Received: by www.linux-watchdog.org (Postfix, from userid 500) id 5B3D6409FE; Sun, 7 May 2023 17:36:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 www.linux-watchdog.org 5B3D6409FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-watchdog.org; s=odk20180602; t=1683473786; bh=gTrugC1Tfe8NntAJ4r/hKWa/vAR/hMTXBXmU9T05C4w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m9+uu4TZA/xeEtZnFi4lOBhXVwirUPgR4DGnMJ+ylLqYepWDgPBdK/oCd81gT2fWN DZJCAUrssHPHktGYgMpxoqYQLVJtPyClvtTxkeKp3A+z3gjWtRybDh3rs0DMH7Dsqx quPX4aQAiM3dAClAEnZ5jahnRYRhpuWKGeF2+Lko= Date: Sun, 7 May 2023 17:36:25 +0200 From: Wim Van Sebroeck To: Fabrizio Castro , Guenter Roeck Cc: Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Biju Das , "linux-renesas-soc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , Chris Paterson , Biju Das , Fabrizio Castro , Laurent Pinchart , Jacopo Mondi Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M Message-ID: <20230507153625.GA3135@www.linux-watchdog.org> References: <20221103223956.50575-1-fabrizio.castro.jz@renesas.com> <20221103223956.50575-2-fabrizio.castro.jz@renesas.com> <20221115132811.GA4189373@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabrizio, Based on below e-mail I excluded this patch from the merge window. I saw that Guenter still has it in his branch. So can we have an update on this please? Thanks in advance, Wim. > Hi Geert and Guenter, > > Thank you for your reviews! > > As it turns out, the rzg2l_wdt driver has some reset related issues > (currently not addressed by the driver) for the RZ/V2M and RZ/Five > SoCs. More specifically to this patch, there is a better way to fix > the restart callback by addressing the way the reset is handled > for the watchdog IP. > > I am dropping this patch, and I'll send out a series to address > the above concerns (which will tackle the issues with the restart > callback in a better way). > > > Thanks, > Fab > > > > From: Guenter Roeck On Behalf Of Guenter Roeck > > Sent: 15 November 2022 13:28 > > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M > > > > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote: > > > The setting for the RZ/V2M watchdog cannot be changed once > > > the watchdog has been enabled, unless the IP gets reset. > > > The current implementation of the restart callback assumes > > > that the watchdog is not enabled, but that's not always the > > > case, and it leads to longer than necessary reboot times if > > > the watchdog is already running. > > > > > > Always reset the RZ/V2M watchdog first, so that we can always > > > restart quickly. > > > > > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support") > > > Signed-off-by: Fabrizio Castro > > > > Reviewed-by: Guenter Roeck > > > > > --- > > > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++--- > > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c > > > index 974a4194a8fd..00438ceed17a 100644 > > > --- a/drivers/watchdog/rzg2l_wdt.c > > > +++ b/drivers/watchdog/rzg2l_wdt.c > > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct > > watchdog_device *wdev, > > > { > > > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); > > > > > > - clk_prepare_enable(priv->pclk); > > > - clk_prepare_enable(priv->osc_clk); > > > - > > > if (priv->devtype == WDT_RZG2L) { > > > + clk_prepare_enable(priv->pclk); > > > + clk_prepare_enable(priv->osc_clk); > > > + > > > /* Generate Reset (WDTRSTB) Signal on parity error */ > > > rzg2l_wdt_write(priv, 0, PECR); > > > > > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device > > *wdev, > > > } else { > > > /* RZ/V2M doesn't have parity error registers */ > > > > > > + reset_control_reset(priv->rstc); > > > + > > > + clk_prepare_enable(priv->pclk); > > > + clk_prepare_enable(priv->osc_clk); > > > + > > > wdev->timeout = 0; > > > > > > /* Initialize time out */ > > > -- > > > 2.34.1 > > >