Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6594829rwb; Tue, 15 Nov 2022 00:25:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5IWcJFzTKy7DOVLLb6gUw6m065SVpIOMiI2d6dRR9qlITIFcPsvXDGm9VXMdvX0pLmr+/2 X-Received: by 2002:a17:90b:2703:b0:212:fb7e:54c7 with SMTP id px3-20020a17090b270300b00212fb7e54c7mr1069537pjb.124.1668500751590; Tue, 15 Nov 2022 00:25:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668500751; cv=none; d=google.com; s=arc-20160816; b=cnmtTR19H7D3cDDyD/aiYC1aBpYLh6/4qXgti7KQes7DGAI/Cs/Y3Vgs47hI/DKETC 7uh2Ri2DhNZXvS9xlBbFsVZ/WDlBfnid2MBIQ7gHHDHS1JnrVJtrr0paNh4d6TORTICm X9cH4K6dpGdBY4jhZYF6C3E8Ra8801QRFNvo6Wp8s4ozFkCrX2BCoR5J5agf8BWRZVcP kC0VZL8k+wartQ3HDxbd/5X9UGkqu21HNaBvvnMc0sA4lb8plgwYv6ZlroYMdQY3soMH RC56VBo2oaWKBwX0/GPrtObOwZkUrtuVjD3lEoqNCbZerDIJ1PD/D/82Ucf+rmnxt6E4 8S2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=C5FBxs387xMLJ6FEoMsoqjFKDtcBxbziSzdRL5iwuys=; b=01EXAL0LRB40UVWkLCxD0te70VEkbcLepScdu7Um3viVmrOPE/p0rG96TLmftUqKIO Ku0kYYxSeWUvXYEEb1WN+NPExqFEAm5qLi96P0TVqRUwjJyWusAVzMSpCrySuIx3kq+D kT9mC7n7kX157Lw9ZpKOfn1eVXW7k9y9BanBM/T5+bOtMRmA6BxPJdRxiOhTr6ndI8HE +mndsF6QxEOcCP6Td3rI3CGTU9hmuBYmv8DtVJkuHbZ7COCAux3CvFXSyxRtpj3VvalP UWOEFHylNptpsoPqtzPfBdtZwAm6K5FXD20KG5mB8uCSyD/ZmXoSU4RgA3YUYr9mCyrk xGFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a631d04000000b0046fcbcb1015si12239118pgd.331.2022.11.15.00.25.39; Tue, 15 Nov 2022 00:25:51 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232220AbiKOILX (ORCPT + 89 others); Tue, 15 Nov 2022 03:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbiKOILT (ORCPT ); Tue, 15 Nov 2022 03:11:19 -0500 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 138386306; Tue, 15 Nov 2022 00:11:19 -0800 (PST) Received: by mail-qt1-f172.google.com with SMTP id l2so8287608qtq.11; Tue, 15 Nov 2022 00:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C5FBxs387xMLJ6FEoMsoqjFKDtcBxbziSzdRL5iwuys=; b=TfNVDH++H/2O4XnnGN57gJqrIm33Sk/yze7NMVJbmDiu0iN+C2YWM+0bqVqtyKSNGU mrPaCtmz5quYCawZv3vF4JaRQLPX7uIV8iEgyETuXFZzmiKUUNPbD0LQzwgIIJPV07cj Lq2NHzWaS7rDsPvrFnUz5b51sYOpRT5oSmWHF/zPLNwUeZj85OsIe7RoXMt15295B5pU /ZmF35Ykl3e/+k8LLfgfn2RpqMp+IEOYBNYuv9sLcg55bxnFdy1iaKCCCJqYoa3N6MNw FZsG0xXgMczov+HYgqTsC7RAac3m248Kq8VwFkGBbS9+eZ2e0mp/QZtiVyUR8f7Havib YGTA== X-Gm-Message-State: ANoB5pmnVoWZedjeEIsyaoBcBtMLDCUzzmP0L2Vi1D1xrxWN7mu2MdMs 1rMfFz3hlNxZ/70XuhaiCMVqUERfyYArTw== X-Received: by 2002:a05:622a:1982:b0:3a5:7de1:9708 with SMTP id u2-20020a05622a198200b003a57de19708mr15676723qtc.616.1668499878064; Tue, 15 Nov 2022 00:11:18 -0800 (PST) Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id b13-20020ac86bcd000000b003a57a317c17sm6840125qtt.74.2022.11.15.00.11.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 00:11:17 -0800 (PST) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-381662c78a9so49120897b3.7; Tue, 15 Nov 2022 00:11:17 -0800 (PST) X-Received: by 2002:a81:4ed2:0:b0:370:202b:f085 with SMTP id c201-20020a814ed2000000b00370202bf085mr16147843ywb.502.1668499877212; Tue, 15 Nov 2022 00:11:17 -0800 (PST) MIME-Version: 1.0 References: <20221114180843.1125308-1-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 15 Nov 2022 09:11:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] watchdog: rzg2l_wdt: Issue a reset before we put the PM clocks To: Biju Das Cc: Prabhakar , Wim Van Sebroeck , Guenter Roeck , Philipp Zabel , "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Fabrizio Castro , Prabhakar Mahadev Lad Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Biju, On Tue, Nov 15, 2022 at 8:48 AM Biju Das wrote: > > > -----Original Message----- > > > From: Geert Uytterhoeven > > > On Mon, Nov 14, 2022 at 7:42 PM Biju Das > > wrote: > > > > > From: Prabhakar > > > > > On RZ/Five SoC it was observed that setting timeout (to say 1 > > sec) > > > > > wouldn't reset the system. To fix this we make sure we issue a > > > > > reset before putting the PM clocks to make sure the registers > > have > > > > > been > > > cleared. > > > > > > > > > > While at it re-used rzg2l_wdt_stop() in rzg2l_wdt_set_timeout() > > as > > > > > we were calling the same functions here. > > > > > > > > > > Signed-off-by: Lad Prabhakar > > > > > > > > > > --- > > > > > Note, > > > > > - This patch has been tested on RZ/G2L, RZ/V2M and RZ/Five. > > > > > - My initial investigation showed adding the delay after > > > > > pm_runtime_get_sync() > > > > > also fixed this issue. > > > > > - Do I need add the fixes tag ? what should be the operation > > PUT- > > > > > >RESET/RESET->PUT? > > > > > > > > It looks like timing issue, None of the previous devices are > > > > affected by > > > this. > > > > > > To me it looks like the device must be clocked for the reset signal > > to > > > be propagated? > > > > Yep, provide clk supply for a device, then apply reset. > > Maybe we need to make it consistent by taking care of [1] > > Current patch: CLK ON -> apply Reset for V2M. > [1]: Apply Reset -> CLK ON for V2M. Yes, that would also simplify that patch: just add the call to reset? > [1] https://lore.kernel.org/linux-renesas-soc/CAMuHMdUWbT6VArm9B56VE0yUYWCTm=3vMGrrONSv9cdsQQnhpg@mail.gmail.com/T/#mdb78503524a8f4207f59a40f7ff573e210656988 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds