From patchwork Wed Feb 28 08:32:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3209777dyb; Wed, 28 Feb 2024 00:33:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVIzLDFTDrCFC7LrRdUzvd3cGcVwbTzZBnhu6+JW6Knbxi54c4ml4kSJCeyNq5YKnxLPuJndOdTvCTxX1Jy/9ruz3eW7w== X-Google-Smtp-Source: AGHT+IGKfiEuwupe+4s2xyG6+d5XvGDQP1lYY7bGnqAoxbEb3icUdcBppH0bbE6F4iqEvWexhGQE X-Received: by 2002:a05:6808:8a:b0:3c0:4676:d201 with SMTP id s10-20020a056808008a00b003c04676d201mr3962334oic.53.1709109237421; Wed, 28 Feb 2024 00:33:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109237; cv=pass; d=google.com; s=arc-20160816; b=WiTaDEp9V5ZAkRk+exzhAOxjbvy3xxtINXuoytmFiEctHIR7GjP389m3KR1sN7SVdd 68jT6EznO2LeBVFse5kamrKfHWFfrxQfmeSnAKrmNnWnzLrF6jQ71jmzkm9rMIKaZ4B9 4mgVMQfFtzo/0MbINphv9kAoOiGhiyLrs1RLqqi+65nNTt8g+tbDtizH1XMl4anJG3I4 HljGK6PKD08EjIT/+EjnVtyHdtSJmVgJSQiNIdZh7S8NaaZ49N1j4aWFlRxSkQYnq5Qo l8PHugMdiNC9FYqw51NFg1L/xGlnN3iaj6WkfW5jD+PDcVDh3V5NfRSL7gSyRBXmanTf Kifg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hw7ydcgUBd5LwNKiG4K3Ih2x5T3tP6tTtIvBkv4Whkc=; fh=97OI2C9YuD7uxOzkW9M4pfLL3uE6VisdO5Q7+nkwHmk=; b=JnqEUnmRRU1/9q+JEVQ/vOQSpuSXfF8+Fcat0SyLS3L71CFAW1iwNv8gbxCXNsovDP b9CkpNr+wp7dFwlfPziUPEbNOXzt3wz7YLyx0owMYb2Bp/lwkhVTTGuz5bEsvIOJ80+t mYeOXxMwDbEtVkBuLoJwg0px8s6801++bYCF5IvXql8lk/68WP3FXwa3Hh7875sOpXFA Gmgn144D7qMhxOJrppTs9kpiMAAvAIbOiEWXWPeFPIAP2SJHAYuJJEI95WwttULeEqF5 g5fhFi2yimm8Zjqo1OEhBqJScsgDqs5z3BNsm4sujkivIKSnSO0BRCE8dgE6zKUkxZzE /Bmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=J16Q8i0x; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84677-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84677-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f24-20020aa782d8000000b006e430d483e0si6884031pfn.30.2024.02.28.00.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84677-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=J16Q8i0x; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84677-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84677-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 394842899E9 for ; Wed, 28 Feb 2024 08:33:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A72432D60A; Wed, 28 Feb 2024 08:33:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="J16Q8i0x" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A033A2C85C for ; Wed, 28 Feb 2024 08:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109199; cv=none; b=HE4cqelSgcjb6y5CxhCakg/Y6HKELvpOnhglIpLf0fx7jxcEvGAy1wgRiwB1/cFRlq24h2qipThFxMp3n/Q73OVD0aDsiqMvs8Kp8sRNOd1X6fSbOnemYYbQKkGnSKI2EWZlPJ0RQppYJHdqcv17bwrHI02U48efX0Lq1m7Cpz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109199; c=relaxed/simple; bh=qRdpfk5Ha5yzYO5Ffb0oUgH+XsXzgPdGsR48Popkr3I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pIiC9pedcn/TniKnN9AsOPSkq6e92p5fgkueGCK+g3Zb4ox8XUvMv8s2TeSljtrdt9IRK66ue4Xe4ghL0GXvskd/FgZ3w20RtJgzDvPtFB2w5cIS+DPRfA7NhKFcWhU1FPstRUulp83ffywMnuYm/HY4oUz9YD7ieLwT28tduZE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=J16Q8i0x; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a3e891b5e4eso658947966b.0 for ; Wed, 28 Feb 2024 00:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109196; x=1709713996; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hw7ydcgUBd5LwNKiG4K3Ih2x5T3tP6tTtIvBkv4Whkc=; b=J16Q8i0xRh+SbKIA6IMiSbakLuI2eeHZ26s/Ieubf31IyWZVzGcScgk5ORv4qBJiW4 KhGG3yOqkUAaj9CrHmr3jfhzbhF/9GH7Oun11e5rKQ6dDZ+1mn/0ngc5LH6AjYu5bXlc brhw6fMYvzwV/19mNe9kiokvDi9HcP5iER+Wvqv39T2SyDmQdxaCA0L9Ib2arsO0gP7u im3R7bOkDER8JcN6bHAKPCfOONTkGWKXlx0B2Zq4Jc+HOt8Y9kKT2lRxnb1YWgrexiUe XrOHClUT8KOUFyo9SzrwmBHGReHw9izYdPUMx+vGigxkBp5wrkLLC50nPrK3TSOLzgug wIXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109196; x=1709713996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hw7ydcgUBd5LwNKiG4K3Ih2x5T3tP6tTtIvBkv4Whkc=; b=JNQjZCIbWkP9zmBdoORJS09x3fGDJb4Z1Fj3GsupvXts/awtNWwFBiGIMKP0qJf0yD CHBo+ocTlA9WNCd8mCxnprnTssn+ZEkLUVEQ0GdTmNxuB6ZXYf0pGhSxm0wAnC1+9ZRv l2e7MzZeaBcb9oKLG60Qn7MVwwITirDqYDfvdVMU8ReL5Y9GjqXu2bo1Wzzs9iAwDcOP sCzqr9YNYwlpkyfYAVs8ai5kQ4D6AYsqYGCC+1BKwBYY3FaaAe6UA6pio1jbQuIjuAj1 Qsr/SkLKKHotbjJiJlmuMT/UbTC2Hu9cj15uF2ebhvja7t/o/VThlrm01L6aOUAdvKh7 b6Gg== X-Forwarded-Encrypted: i=1; AJvYcCXf6KI/F6kDrpia7rZEew1WUqCBIJUUxTnYCtihqkkp2txNYjBMDQSsxUA23XfjQ/wkSnMDLl+niTBMbKXh7IQjYUiCj4Wxce7MWGWM X-Gm-Message-State: AOJu0YyigZXUCabssrHZurdNCaIZz4ZEMap1/Z4Ih8aYepNlAvAiAjcS TQq0oOIwvw9pUij01/RPLpQ2SRKRYMbzhJ0Dd6iQ2RgONPlu7Mjfuvr8Nb04tow= X-Received: by 2002:a17:906:64b:b0:a3f:bcff:18b8 with SMTP id t11-20020a170906064b00b00a3fbcff18b8mr8577267ejb.27.1709109195897; Wed, 28 Feb 2024 00:33:15 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:15 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 01/10] watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 Date: Wed, 28 Feb 2024 10:32:44 +0200 Message-Id: <20240228083253.2640997-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792130927941137675 X-GMAIL-MSGID: 1792130927941137675 From: Claudiu Beznea The rzg2l_wdt driver is used only by ARCH_RZG2L and ARCH_R9A09G011 micro-architectures of Renesas. Thus, limit it's usage only to these. Suggested-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none; this patch is introduced in v4 drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 4700b218340f..bdd1527bb916 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -921,7 +921,7 @@ config RENESAS_RZN1WDT config RENESAS_RZG2LWDT tristate "Renesas RZ/G2L WDT Watchdog" - depends on ARCH_RENESAS || COMPILE_TEST + depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST select WATCHDOG_CORE help This driver adds watchdog support for the integrated watchdogs in the From patchwork Wed Feb 28 08:32:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207700 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210003dyb; Wed, 28 Feb 2024 00:34:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVSLY3uY05UNqFdXXwf5sDdmfK0DuFGd+Ce4xmgf9Wv1AMW+oWzSH0z/IAVbXoMwKxAphvAaH/kDMv1AFVmbTPbTALbZw== X-Google-Smtp-Source: AGHT+IG1c2UYAEhsmhKfOaqZPElvabMbxk+vklLr+kpWiIsf2H4W8O2NTv/VAYNQK6XDRaQ7cGu2 X-Received: by 2002:a05:620a:5372:b0:787:6de6:cc64 with SMTP id op50-20020a05620a537200b007876de6cc64mr4508015qkn.12.1709109268556; Wed, 28 Feb 2024 00:34:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109268; cv=pass; d=google.com; s=arc-20160816; b=xgQNMhF1q3Okwu94c10wgmvF+89BYAmk2w1toV+JBdocx2AFGxk5FaQRhvy6FY7TLv XowujthSeFQvtANUIWnMJlNcZFFiUP+FUu13tub9euT1oOrMcANM5fs4lsQOqli2EQdB NdSN+OjnshPgI6Nuv7j8k8SYv/KJmCRvNiHc1ZCoqT5p5OftL7509/GtmT3U44M5o9NU doROWkEilaajS6SxOcIctgAPpdEKP5fZRkSPOZI0DDLcFQ1opB9u+Gm658mn5mQIysAW 9EANFGSELAToV1I8DoFxDgIII2AuTbYB220e3hIVkCfUh5UthjH/9duahGZPr5eVs606 9ktw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PnFYEJs3Iq+V6PjN2KZQWymEIOW45yt0wje1tPFg4A4=; fh=QdfkP21SqCzEzq36IZ3cF1aWok1OD6nqgDn4ozI+I4s=; b=j4IjmD2Fy9W5NGJsUM2CKMp1GKOIamhYCvyUhe2KZUR0zugs7zaH6faY88UbAPlSSG SoLEw+1M4Kv95OHUgHA0jBBqNAMc3x5rI3Y77/01nK9oTPRSIKkTWrCLIEZefyoyOZLH eiQNHaqwX7aCbwnpLLmg/cLIiw+VI6DGxftASPY76xyx9mtb/iqQguhbqPGEP6a9zJt2 d+cPfllUEXjiqj4dxgW+eRG+KOR8XygKAXqXm9HJBdSv7Z0inza5a3eSt5etAWUNrAmk sWphK1nOJEMgBRX8Mv2ywXenBUpEtVA/RQDAtp01jIeOm5kebQ4wy0xtBKCVbYGujcTi l45A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="ZM/U2kNr"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84678-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u19-20020a05620a023300b00787d4c64080si5674752qkm.381.2024.02.28.00.34.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:34:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="ZM/U2kNr"; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84678-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84678-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5B3141C21683 for ; Wed, 28 Feb 2024 08:34:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29A4C364C7; Wed, 28 Feb 2024 08:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ZM/U2kNr" Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAA0D25778 for ; Wed, 28 Feb 2024 08:33:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109201; cv=none; b=akAx3LN+W/e4EECMqXZlf0j6zgcTrXfqbkWZiQ4uB8fo8ZhvwKGU1MSWa/kXlWt4ohR57iDRF/FWsZiOc9+gTi6KKcSERhNEjmujaWIZ3n69SLgQvFD4rj/4TTAiNgAnyiYzofRvZ/fdl5c20FAv0EGBEXvsJg7XtQHOm18zqMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109201; c=relaxed/simple; bh=4KW2eteISFg901CtKgTrDBwePA4eC/YGUAT/SCGnHTs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OZU1aVzwkPZQFhqUS54Ao7nT55vKxWuMfcEGws8qTlp13g0TXLXW7QtkpLFOFO5ltkgiL8T5tmxUGU2aqai/Or3ACZsz6FW5rvMCOOX3EqcgYMuf7msqGeY2oL4MBt2UZ1wxFvJUHudVvewM3QFPSF3parJfIwNfLuTzBo3PCfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=ZM/U2kNr; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-564a53b8133so4388296a12.0 for ; Wed, 28 Feb 2024 00:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109197; x=1709713997; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PnFYEJs3Iq+V6PjN2KZQWymEIOW45yt0wje1tPFg4A4=; b=ZM/U2kNrbg19oicg0+uF52u1KwzkGtSQE6bPraHG/u6xA7CkK/nVHrnQRpjOZDP8yt 1wJiZUP97YwBEqbCmGALYnahyyxN3SN0STzct4OQAhZjpNTcsxFo/ygopK5XwXoxWq4x 5hfVQuAOWtHgFQzNPlCRss0afFRFoo/bB4LHR8eKXKgutvig9wEXhBLvTkUa7pPLPNSS JQB3JVbvcqJsEWdOSuJTXOByFFrNWPGf/2M1m7nF+dL+JOnidcFfVtoYTsONCDsm3b4G +CpKXMaSfAyq1FZ7ztE2NeEqu3kRoveRVzP7f1j1Ejx7dJkhw3cIanx7sNvKIPa88hdY iDSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109197; x=1709713997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PnFYEJs3Iq+V6PjN2KZQWymEIOW45yt0wje1tPFg4A4=; b=rDnNW0rHi7b0Grxim1fLzuGzLl06qqK1C/f1q1m3GVHBvUWPDOWe0Zu9kylFKuC6vf nIldhYxZ0PaHzqUohhtHEJjWniaF/bPB+QeDt/NItL1F7h0/ORC9JlPovgaBHew24PkX 67/szeF2wEzywMqewZmZF/PKDQj07r4PIGWFGiHKWfqBtH3J4aec247gbcaGqhda0ehp im6FmlHXOfLYnePPN6w5pZKPhAIOI8c+pjFL19RTP8vat73mhnmjEnYeUI8Mm+M9NSGF mB+aGVyN1ejDmh1nqORHj9P9m+vPD8yoLvqUHx/LmyN0lUxlGBrEoq7FsXKpU5TSJ1oY /5qA== X-Forwarded-Encrypted: i=1; AJvYcCUokqv93miV8XACpQpAY5bOUeiErtyUuXSjdle3/vfBmbtGDuWf+9Q6KiVcEOVbZZKzxCbWacSu9fxGEJK5L4UPy1O49uQp8G9+VIW2 X-Gm-Message-State: AOJu0Yzf7kCP5P4BuOINPeSPIuQPokmxJSCioF21ttQC2iIJiIlmfIrW ZzeCZuDxqo082RME9ILKdhw2zkcw+8Pcj9hiDNv5ZCWZJtTGn2M0p9SLS4h8nSY= X-Received: by 2002:a17:906:3b55:b0:a43:f927:4432 with SMTP id h21-20020a1709063b5500b00a43f9274432mr641705ejf.77.1709109197347; Wed, 28 Feb 2024 00:33:17 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:17 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 02/10] watchdog: rzg2l_wdt: Make the driver depend on PM Date: Wed, 28 Feb 2024 10:32:45 +0200 Message-Id: <20240228083253.2640997-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792130960464955082 X-GMAIL-MSGID: 1792130960464955082 From: Claudiu Beznea The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the clocks are enabled though pm_runtime_* specific APIs). To avoid building a driver that doesn't work make explicit the dependency on CONFIG_PM. Suggested-by: Guenter Roeck Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v8: - collected tags Changes in v7: - updated the dependency to PM || COMPILE_TEST to be able to compile-test the driver when compiling for a !(ARCH_RZG2L || ARCH_R9A09G011) platform and CONFIG_PM is disabled Changes in v6: - update patch description - fixed the dependency on COMPILE_TEST previously introduced Changes in v5: - updated patch description - added on a new line the dependency on PM and COMPILE_TEST Changes in v4: - s/ARCH_RENESAS/ARCH_RZG2L || ARCH_R9A09G011 due to patch 1/9 Changes in v3: - make driver depend on PM; with that the "unmet direct dependency" Reported-by: kernel test robot was also fixed - adapt commit message Changes in v2: - this patch is new drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index bdd1527bb916..cd2e29da7a54 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -922,6 +922,7 @@ config RENESAS_RZN1WDT config RENESAS_RZG2LWDT tristate "Renesas RZ/G2L WDT Watchdog" depends on ARCH_RZG2L || ARCH_R9A09G011 || COMPILE_TEST + depends on PM || COMPILE_TEST select WATCHDOG_CORE help This driver adds watchdog support for the integrated watchdogs in the From patchwork Wed Feb 28 08:32:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207701 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210049dyb; Wed, 28 Feb 2024 00:34:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV7eSVVMiB4zup3O0Em+QMPdQQXG4AVgh3pwVdxy4uM6Ot1C+LYs2ABOF4yvjOl05Hjk5IvezLJ6VMDrbMZb90alzh6fg== X-Google-Smtp-Source: AGHT+IHtyywx93C2qK+OrI7plTt4t/579SwqU0QFmsJqctiNrkx02aPxanpqcnYYSe8pXuvhAN7P X-Received: by 2002:a05:6214:19e5:b0:68f:9ec7:2afb with SMTP id q5-20020a05621419e500b0068f9ec72afbmr5138279qvc.0.1709109276586; Wed, 28 Feb 2024 00:34:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109276; cv=pass; d=google.com; s=arc-20160816; b=JVkKmWfFuWVKqpO45MT5dmOcvmNIiC6SWWXqxOtyNDzuto3sTf+RM86MVIJCtfSkWG XP9nxL7UegfeMNsJP/tFAzmn+ba8kNyvhZIreJ3dN1w/R3bu9iU0ER2i2lKADy3lzIAL Ij8jneXmUs26gl9YVns6FyL1JXD8GvCtpMGOnq5sdy6FnxukP3Wassy8Ro43xwGKzFqi plAAxDz64tuwYtOcWm94VaqYDGrcKJRO7BG3qWGSbVE/798e14hVw8DMGQLEmWUBRIFq NaGjuIiuLVG79UMZdegbYD7mpngWlTG0Z6riMA1N6NEqAgarOP9aWwL3oVVN597+wngb i3CA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EJkLrfz+B+TwXIL3E5Ouq4pIOb3ww8iGVXCK/i9BddI=; fh=b4RxlZ2qivTULM4Rz170YmzY2AaDA0XgV10b1FGNjlM=; b=YYsGzwH9R2OLSBtyXMk4saCFLcz3cINqIxE6Fs2WUun5mLBUGq9ss+folV4XpKpOln oM2qoNQnJw90k8rav+ANlAJDah2q8i/0S9UNdTDinvWWwx2tZls0vDhGh1I2/cHAbUA6 SRyVfDgc6Y/31mEjoIO1pkphIIgDEtCUd9YNex5UeWjpfuIxZEINVdwMLuNJHTu7nGLI JyVM1qU0lF6j7nNb/dLQPVNyNWj7tfG1S704UijgPKlFSpcXSc7TG6PsWbbbdnh2w3Gr BxJEps+9xxPS8DtC6dvceL80fjJH+n68ceSrkmiiwgipa5OR9pTpmnOiLzy9bzE00BET tPxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=kBsH59A9; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84679-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jq12-20020ad45fcc000000b0068ff2c18375si8646488qvb.129.2024.02.28.00.34.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:34:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=kBsH59A9; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84679-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 547C41C2131E for ; Wed, 28 Feb 2024 08:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A82FA36AE7; Wed, 28 Feb 2024 08:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="kBsH59A9" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8515A2D608 for ; Wed, 28 Feb 2024 08:33:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109202; cv=none; b=DZLD7K4ybflyGqA+wvZ1qhSbNQPBDpXIZL9Jh0tx0kvJgaF1JMKvAaOlnaFiZ2FwBtBkDexpfm5PB3NChAfqNCPv+j4+pqOah4IqbJ40IeRDR1DgnIqriKOLQwUu6i+lquKb7DvjiMPFwyuzcLYoyOXZaj8Y00gCDydmstvI4Yg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109202; c=relaxed/simple; bh=2iaYjthGV+4YN90lhEWZi3Roao8D27ZIeW/fg1E7/vQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ju9uzuucqBSsjTornTpyyUC43+6AuPdtSKjqRw/cjehmo+DOC+GJ5vxHsTUygnERl5lnKnURss7G9Q+LGE41nYT8rt98t9Yq7ETa3KVSZtZI1UEaggwR7lkEVFoYvYlKzbhDqFTnw1cUFO4lKf8hcxhAsRPqn27yy8E2sRs2IuI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=kBsH59A9; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a437a2a46b1so312314366b.2 for ; Wed, 28 Feb 2024 00:33:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109199; x=1709713999; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EJkLrfz+B+TwXIL3E5Ouq4pIOb3ww8iGVXCK/i9BddI=; b=kBsH59A9Ha6haJTBlwWotfxsIq6Wta4aGKin1c8WvrKBgMxZxPI4MMY+fCDgM7gr5T F4wKqnwSSPNRmj98C7neZE8QnsnGscQrSG+9W1RjrHnDPdPPM7K5nDyhiWAybv5ND1hq PdGNKwj1xUCWePnknpnz1xzzVVag3AjkIpBp5qsMnZrt57ZaDyfZFnokiOhO70IHMbd0 NxbLGpneRC2rQkewSpFAGPv4lZvslv5kRK0g36fikmrbx4r1BEbKiAUKPRTiysJS6tBO kiyZPMBLRkZNXSWiMPIEbLDB5yz/4L+fW3Z2bnb1N3BMekNSuyOqokpf/kxgGvQr6beC uEgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109199; x=1709713999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EJkLrfz+B+TwXIL3E5Ouq4pIOb3ww8iGVXCK/i9BddI=; b=YbHIYedGvtvW38qHxobqgttIpv5E/PoJAZlUTHGLScL6bFSlKTkiTgxeLu4tu1x8K5 lgE8LxXhMqRvUr4fiKswIXRWIbyUUqQuEZcMFlGE6Y+0NieabVGjDjIEjhaciGil3FwR zR4NFQ/PaRCLta753myUyqsQqYZycVNuUd8cIHs6h3m4EuGNgJ38ilimSTzMyHvFkQbA 4CVMpAjBrfd6rvKJ6ns0OtidtQhs5C2otGTMBETwXBqPIJhcpIhh8wQ/WiEUn1S96w04 M+Eygi/QOlCmNBmG5QYfyzYtXLV6QRvRzOUeJcHMVVVCtzTRU2jvl7hdN/yuFCsnUGKM +m+w== X-Forwarded-Encrypted: i=1; AJvYcCWNaCJ5V2sOUBm6aXvZ2D5QsvZXI1DQczmYgH2salQV8AI2xuBJ6ZBqApi5+TgJES5gGhwBIxBo02bjd1X/Fgnb02lAGu8tTzuyvAnU X-Gm-Message-State: AOJu0YxvRj1beb/LpXwUrN/qKdfMS9MvrFS/6x3Jvsh71tNbF/gjZXgz XtD79Zob9AQGW+KSeVHFwS+3x6MuSsRpEJv2Xxgf7SGL10PgBm93DavQFC+G8dnpLPphM+vS68b l X-Received: by 2002:a17:906:af8a:b0:a43:cebb:7245 with SMTP id mj10-20020a170906af8a00b00a43cebb7245mr2181635ejb.74.1709109198838; Wed, 28 Feb 2024 00:33:18 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:18 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 03/10] watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() Date: Wed, 28 Feb 2024 10:32:46 +0200 Message-Id: <20240228083253.2640997-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792130968657157221 X-GMAIL-MSGID: 1792130968657157221 From: Claudiu Beznea pm_runtime_get_sync() may return with error. In case it returns with error dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get() takes care of this. Thus use it. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_start() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - none Changes in v2: - propagate the return code of rzg2l_wdt_start() to it's callers 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 1741f98ca67c..d87d4f50180c 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -123,8 +123,11 @@ static void rzg2l_wdt_init_timeout(struct watchdog_device *wdev) static int rzg2l_wdt_start(struct watchdog_device *wdev) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; - pm_runtime_get_sync(wdev->parent); + ret = pm_runtime_resume_and_get(wdev->parent); + if (ret) + return ret; /* Initialize time out */ rzg2l_wdt_init_timeout(wdev); @@ -150,6 +153,8 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev) static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int timeout) { + int ret = 0; + wdev->timeout = timeout; /* @@ -159,10 +164,10 @@ static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int time */ if (watchdog_active(wdev)) { rzg2l_wdt_stop(wdev); - rzg2l_wdt_start(wdev); + ret = rzg2l_wdt_start(wdev); } - return 0; + return ret; } static int rzg2l_wdt_restart(struct watchdog_device *wdev, From patchwork Wed Feb 28 08:32:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210147dyb; Wed, 28 Feb 2024 00:34:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVZsfsQnmuFN1bv80Xzicb+yVmHuNl3TlXm1JOpfP6OKxE1CoTjekLamUBkPGHRKd1kz6Uf89ojmMjpJXOnP0CCHWryzA== X-Google-Smtp-Source: AGHT+IFkr8Rz404PtCFeIclN7MY/tn6AXuTfV6B4dLoDHLslRxB+VN5ujyPZlJbYL3SJ8UjExHKr X-Received: by 2002:a05:620a:3990:b0:787:f1c4:fc69 with SMTP id ro16-20020a05620a399000b00787f1c4fc69mr943453qkn.9.1709109292990; Wed, 28 Feb 2024 00:34:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109292; cv=pass; d=google.com; s=arc-20160816; b=h53AuHuqTaluNPtZ+80I7s8gAA/GWJod8R5T0Aax8LAdO8Br6dBCWYK+7NN66ej5ys biWZIQbp/yQEE0zxMIZ/0zNB1PHuXFCdZohBs8kVgnboGRuz9jYdDOwtspRYH0ZC+WPD 1AbIdobQ+SjjKC9OBtLlONGQWXBt0UaeP0VillZqzJd/1JS3ZIl7la+eNfB7JUHmnduv ZXR3FoFRuVggiE1ev0tyTedS/re227Yw/lXSz/JdmEt/1UKldBHEgU3qgHev6M5xgTkS ERNoUteuMbkQh89Kncfech63vhLcldk0o8wbLpOHK3C91SVkM/jri5zfDUzI3l7lN28q 0PGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hqHO2GEYl7GxbzESdMYs5ztGHyZiF6bQIqtKeXOQESU=; fh=mA7hbESg/ihMkEnrB1KS665ZW0wCWqfiZSznSnEj3W8=; b=Mkq+WsnvOLLD4LgDQx7RBav78MJjGc0YG9GALmm4owEx8dGvS+8lNc0caSSG2afBRM nASIrdzwT7U5iOp+KdhODnJtGBahxgPfnA27cxF/b/v4y1bvwOiQlMwIk/rkELzRByXS aMUhcBLgBy6RRJdgKm0/Tf/40X8A7j7gfMV1Jvc1xAxgzuq3t/DMusLXmDFY6uJEb8JQ m69/w1c7Af+8Bc5FqBbQI14A6En6kZ9X5O/WCB6Y7bIGDEjoL2yVWa+6u75FE6xi1VSw SkKzl5UGPW+8RPqLt+5rzHiKylV6jbvfdNwfzSI4IgznOfNG3wH/ySvRh82ENdKO4ouo tvdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ImpNt0Hi; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84680-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m9-20020a05620a220900b00787ba776da4si9261817qkh.773.2024.02.28.00.34.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:34:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ImpNt0Hi; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84680-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AF5921C21469 for ; Wed, 28 Feb 2024 08:34:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06EB93717B; Wed, 28 Feb 2024 08:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ImpNt0Hi" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CD392E85D for ; Wed, 28 Feb 2024 08:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109203; cv=none; b=Hbg2UUnCMH7AGJ0jUkFsJXHzxCKdfvKWblKrwLyeIfPI4T1VOYgla+akVRawi/Kxo4SiBpCJ2PIepyhD0uUS4c5PtEOVh9nd1d2C+0HCF6gzdUHKtv9BLDT+7Cu8KGxjcrfu205ixCwv3aIkxBHSGuvjT4i7sY50ovcmUlIvBwM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109203; c=relaxed/simple; bh=Wr6oHFeer/nBk2CrajAUv1ACQwpXo37jKZZaaBfm3BU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Jftrvm829SwgHI1Ek7TvdQRNXy8QN5D1hz1jL7TqgIDkZL8IhVWlmR5/hvZqsF+N9CWFnE0/EEl8V36alKQiMv/bBzzaC1C1Aqkat7VfS85Zk1XTC1XQzS54rNL7/ej4OeHwNai1gErlIgUyLYtIFOVZY/LrZeiG4u0BVIO4iYc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=ImpNt0Hi; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a3122b70439so646795466b.3 for ; Wed, 28 Feb 2024 00:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109200; x=1709714000; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hqHO2GEYl7GxbzESdMYs5ztGHyZiF6bQIqtKeXOQESU=; b=ImpNt0HioA72dmVbpqrVPND82DcPcBgpGryo4zjMttgkfyZto8VOzU4o7wCaA36N44 450EWwwUxaWKuERAZyhlUazxpbaNBetB3bmEu/AcOd21wiAzqOWoCHkMDwaYIpSXqX4R 9aupuAPoEwqalGvNnys0N/LyZAn3zCtZUPH0/wgTxUp4KCyNiMUFgrZ3+AEipsyMqV1I FU3HjFhEEC/YdmKFsj+qRGG49D3WGbklv+ky1ueWWy/9T2jvmAFXX1qgFwtfT9/wuTKJ qXOLnZORwCl6drj3ZH1FpCkZUUbivDEnuy0zDjq5hvx5PbvuO+VwGizQeLVB10ebCaam zYGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109200; x=1709714000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hqHO2GEYl7GxbzESdMYs5ztGHyZiF6bQIqtKeXOQESU=; b=TxQ3QmCReJNVXcEO3NjuzFF05lIf3/VomZ5DDgxaFAroB1gKt9Pu4LS+LTcyk1R78f HHT6h6DIVkGm8YW88pG+0zq97eZe5zs2X4prQJnXeFWkn9i2b1vMvOy49acTZfRUPKhj TcxapZBsKWLinp1DFoFH82pyCOF1ruPnFCKGR1EzXQsjvHrbkw+y8vH7Muv14FhvHl+P 5FCQTAHfj8Ch42wnr+iCqlwYoLsP70q5jI1QPsbUkBkqnkxRzkpH0L3U7hJMW47cMPq/ AEmpzS68Fbn1hxrMfhSw1Yfo4M5S+VgqK9e450sIMsj4X4kB/tcv5FgSTjgII2Gnx9j2 e04A== X-Forwarded-Encrypted: i=1; AJvYcCVBDOMTW5GFdXzSAuhP5bXlkc3cHeD3x3vm9mGYfpIga6kp6rtq50lDyF2ldQYrWDxUlteSGv0dJ9LOfZDX8Y+RN/81dXvfIu4TiBMX X-Gm-Message-State: AOJu0YxU/gXNFejT7PKByixnxKiK8UQAJ222yKkOh+H2lnLvoyYekza+ pEyBrNz8dhBZeaqj+zbWDzztso+A4Xq17qpSmzHwQlHoKpbUl3TxgnEYPfpOEpI= X-Received: by 2002:a17:906:38c2:b0:a43:2255:2241 with SMTP id r2-20020a17090638c200b00a4322552241mr6391339ejd.53.1709109200250; Wed, 28 Feb 2024 00:33:20 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:19 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 04/10] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Wed, 28 Feb 2024 10:32:47 +0200 Message-Id: <20240228083253.2640997-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792130985860518591 X-GMAIL-MSGID: 1792130985860518591 From: Claudiu Beznea pm_runtime_put() may return an error code. Check its return status. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_stop() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - none Changes in v2: - propagate the return code of rzg2l_wdt_stop() to it's callers drivers/watchdog/rzg2l_wdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index d87d4f50180c..7bce093316c4 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -144,9 +144,13 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) static int rzg2l_wdt_stop(struct watchdog_device *wdev) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; rzg2l_wdt_reset(priv); - pm_runtime_put(wdev->parent); + + ret = pm_runtime_put(wdev->parent); + if (ret < 0) + return ret; return 0; } @@ -163,7 +167,10 @@ static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int time * to reset the module) so that it is updated with new timeout values. */ if (watchdog_active(wdev)) { - rzg2l_wdt_stop(wdev); + ret = rzg2l_wdt_stop(wdev); + if (ret) + return ret; + ret = rzg2l_wdt_start(wdev); } From patchwork Wed Feb 28 08:32:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210243dyb; Wed, 28 Feb 2024 00:35:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUzlmThOqgPNyJfyCB1lTK/vuhN4Wr9uLhJwQ3HtUgKAHA/xGndhuNus6BdfOe0OilFKutT5nGhGMH9uKdXxfk/DVOfg== X-Google-Smtp-Source: AGHT+IGGcYj07WJ6loUNDu/sIlZGgB0hHC0m68yNNRkwh/1glWynzpK5qAVhBVQuamCtNH3Dv9DO X-Received: by 2002:a17:90a:6f01:b0:299:75aa:8949 with SMTP id d1-20020a17090a6f0100b0029975aa8949mr9293183pjk.22.1709109309766; Wed, 28 Feb 2024 00:35:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109309; cv=pass; d=google.com; s=arc-20160816; b=TJgfJZigLd2AlT6OLylLpJyKOBUi517KgKiH5G9TKsjl9u2KOymTGtlNLovQ4W6qNL mUmij9X/qYYd4rQxsiiE2kme3Yt1KzxAVxPRNa+p4jaitkXnFIx9mwbpHY2EGqnPQk6J iadfPX7FX7p4jUquYFMyNlV+mv7BKvQFILMJDLErUiO6hF8xqyCkIBWFjh5LGlFHd1ug HhX5TSaj5yCs20BlNYGWEjd7oJo4TIvtzZ8AieZ/6D912iUJyKwTQRCXUJ+fIvKh4NxY fkHXK4/43GvV+6qV0dCocRStKTeho8vr889cdw8aK9HMMaZe2YCdldPRVN/kZGF4Lko+ L9wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ndAfnruplO82J5rjSW4lZ2fxdaHakj0g3zjVmUjCmY8=; fh=XMeEhpsbVyfdu3hdTL0sESi2L7+QVfAeizGk/svxpeI=; b=ONtWLAs60dDQJsHxMW8jOHajsymci0SwX7UphBUvVOOmcnmIvnTzRzKlv40TrwW1CM ewymUbO/zLxC5V7pq1l6CZGelzYsdMGvVA0O1JIrxPDLtDlxRnuaL1b69lZfuYpQfhMH +Q+so0f/jW2Sw1h3KwDLl/eI6E8oIUUO+uQrdiTUpWIl3n/OxHp108y6Inppl8C/wLTH f81py9s3cVTiPXqoCxAe9nqv7qd3f3aoQ9mwtKVkAgDJo6Hqw9ExLltcjNIsK/Jb/vMJ 3MHs2hUjOA0Kay1YB/8zzJCdvkiy1ZOLonDlNnXwf5jD1uPYK814K5Fz9kg/7S8EB61q 1a5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=j4kAJdY4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84681-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84681-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id me6-20020a17090b17c600b00298e0ec7379si966276pjb.162.2024.02.28.00.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:35:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84681-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=j4kAJdY4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84681-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84681-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 95729289B0F for ; Wed, 28 Feb 2024 08:35:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DF1337714; Wed, 28 Feb 2024 08:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="j4kAJdY4" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2569833CC2 for ; Wed, 28 Feb 2024 08:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109204; cv=none; b=UDTWue9WAvSOKIIjDxZkCH4wxzihJE1PSojTAFJ43aIl+SEn9cEGjV3JAfPSPUoxID+nFArzeIioMKQ3ickDL7Oo6NHYPwqaJsIdZ/VqgqvcD3J/bUDa9MBqtmZwlU/FZtO5FMFSzfQ4IeNQYXWz8/IPDtEGbe8EiWASjrVvO34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109204; c=relaxed/simple; bh=7mOWThEj82No40O+j4Gsb3EPCVrROElgn/WJZB/tenc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aK2p6tCv9kSfMYoEsC6mWIq0e4WAk3mrUrQ3yYwdklqmaWFSrxz/xtDpI94nuQzSeyeBJpQ/0pdfswrm7oZh3Z4/pVNgHWnea/bpY3r2LZGjGbbH4uvTByM1dNgRggHTpRlCheVKrEnU9s3E9XBy8cmA/I969TNSkAI5b7OzKi0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=j4kAJdY4; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a3e552eff09so572223166b.3 for ; Wed, 28 Feb 2024 00:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109201; x=1709714001; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ndAfnruplO82J5rjSW4lZ2fxdaHakj0g3zjVmUjCmY8=; b=j4kAJdY4AjOkaeG95g3U/zInfUz8gFGvpYwA30ZdtRD5VVkh9oF7I2ujI6nQqYS8pi +FmMrzW1kSkibMEFtw/ys6GcZASiQhHLBclBK3itjZ+aGd8MM70V1refXFtmFr25cnWF aqrDCstybUCcBdEL8kPyaWbysG+IeIvg9zXVpgDeoFDvvoJtLah2403sFjN3WtrC/L6a MkHj0bGzgxPhqOZsi10mL++3ZsSFzDYoJ26kDZBe7kLJ5LkR/I+23KitUu26c/pWX/gH su9groFdkSAe0Xwj3Vh/taUuFRaZsTm5kn6H9SBlbDvpM5Y8a4O2mPaRmfF4FNES03g8 wHSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109201; x=1709714001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ndAfnruplO82J5rjSW4lZ2fxdaHakj0g3zjVmUjCmY8=; b=bWcaMhqkmNDUGm6BfCBMnat4YKVUMc/DJzRnNpP9viHRpnagDPEbJ4+7SDoJnGzva/ SEELMmKcc6OGP9I1VZtbQU898F229J+kKiLDQJtxlwX2s3qZUL+qayLjSCBAzLCCrshJ Auw9WiUriHvVtxjfjaVw58QAjgDntGrILZLZxNZ+uuhegPLRBJen4+yLV/mlqYxUHSNo fiRP0u42fIvjb5Lbrm38FQGoU8UfIM024dTMGV2BL1zc4PdJgE3bvigFRb5pBT00EF0I mky/tE/c9RehVdhZjeWCkF6yPS01eHp/pD69Dqo3V3He+qm1xKFHAuTqAYut7LUPm6rq gVLA== X-Forwarded-Encrypted: i=1; AJvYcCWnADv7K40L0qf7FH24e+LpPg7WstrsUzmYUKCc0/ghYhcfTvgbiVeY9jMOaf3KrokLq3d3rwjkvDiHMTc1XeZTZC4JwSDSJVt6K8c/ X-Gm-Message-State: AOJu0YwiQAJnaAkNhWbw08wh1gV+48S7ER6XemR5c68vWgJnGiMXgx+3 SfS4iW2pgZnpK01ETsnrP/dfBjTA7g9CTRcV/KF435fkwnkUhjTYvo6D09+Whe8= X-Received: by 2002:a17:906:f9d4:b0:a43:4c31:c4f1 with SMTP id lj20-20020a170906f9d400b00a434c31c4f1mr5491767ejb.11.1709109201694; Wed, 28 Feb 2024 00:33:21 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:21 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 05/10] watchdog: rzg2l_wdt: Remove reset de-assert from probe Date: Wed, 28 Feb 2024 10:32:48 +0200 Message-Id: <20240228083253.2640997-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131003426612498 X-GMAIL-MSGID: 1792131003426612498 From: Claudiu Beznea There is no need to de-assert the reset signal on probe as the watchdog is not used prior executing start. Also, the clocks are not enabled in probe (pm_runtime_enable() doesn't do that), thus this is another indicator that the watchdog wasn't used previously like this. Instead, keep the watchdog hardware in its previous state at probe (by default it is in reset state), enable it when it is started and move it to reset state when it is stopped. This saves some extra power when the watchdog is unused. Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - update patch title Changes in v4: - none Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 7bce093316c4..93a49fd0c7aa 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -129,6 +129,10 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) if (ret) return ret; + ret = reset_control_deassert(priv->rstc); + if (ret) + return ret; + /* Initialize time out */ rzg2l_wdt_init_timeout(wdev); @@ -146,7 +150,9 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev) struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); int ret; - rzg2l_wdt_reset(priv); + ret = reset_control_assert(priv->rstc); + if (ret) + return ret; ret = pm_runtime_put(wdev->parent); if (ret < 0) @@ -186,6 +192,12 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, clk_prepare_enable(priv->osc_clk); if (priv->devtype == WDT_RZG2L) { + int ret; + + ret = reset_control_deassert(priv->rstc); + if (ret) + return ret; + /* Generate Reset (WDTRSTB) Signal on parity error */ rzg2l_wdt_write(priv, 0, PECR); @@ -236,13 +248,11 @@ static const struct watchdog_ops rzg2l_wdt_ops = { .restart = rzg2l_wdt_restart, }; -static void rzg2l_wdt_reset_assert_pm_disable(void *data) +static void rzg2l_wdt_pm_disable(void *data) { struct watchdog_device *wdev = data; - struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); pm_runtime_disable(wdev->parent); - reset_control_assert(priv->rstc); } static int rzg2l_wdt_probe(struct platform_device *pdev) @@ -285,10 +295,6 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, PTR_ERR(priv->rstc), "failed to get cpg reset"); - ret = reset_control_deassert(priv->rstc); - if (ret) - return dev_err_probe(dev, ret, "failed to deassert"); - priv->devtype = (uintptr_t)of_device_get_match_data(dev); if (priv->devtype == WDT_RZV2M) { @@ -309,9 +315,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->wdev.timeout = WDT_DEFAULT_TIMEOUT; watchdog_set_drvdata(&priv->wdev, priv); - ret = devm_add_action_or_reset(&pdev->dev, - rzg2l_wdt_reset_assert_pm_disable, - &priv->wdev); + ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); if (ret < 0) return ret; From patchwork Wed Feb 28 08:32:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207705 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210724dyb; Wed, 28 Feb 2024 00:36:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFznwCyz/N5PdSlEyOfCMYXd2hajnw6PpVmWy+evcn84bbtDFoBQJRkjrkNlX4q9WH1SRjnEap9Uw2wi3aTW+ENVHRLw== X-Google-Smtp-Source: AGHT+IGBDDPzWvGm9fPgctUZeVxx5uK5E6xaLkUBCdrSxAlTEsQ3upE+3woN1cfor3ylELnb9J8j X-Received: by 2002:a17:90a:bd0a:b0:299:3ebf:d180 with SMTP id y10-20020a17090abd0a00b002993ebfd180mr10601763pjr.6.1709109389212; Wed, 28 Feb 2024 00:36:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109389; cv=pass; d=google.com; s=arc-20160816; b=wXpWdg7jXRWQNFZsQEJhOtrwtJTKJdsVz/2UGflRXPnRso+bfdsWoPaa0w53489yIF 7iBDqbFf7Wxg1HFlVR01V+5ZdoXs0f9RTZp0XeAA778cFCkx2Boa5DStmq8cMBPXaDbm RMOK+CTQF52ChXsK7wliWtAv2wPjvIXCqVJthTo49I250A5EI66vjd+nZ6is1jCA+870 dPHceRvJiudS7ca3E0MC9tujOmAiaqyovK+M992hrMLXp+pW44t2pmAWegX9dUlxpaVV poucf2FC/ZnrSmvHQ2IGKUT9GcFWtG/ZZgx6LpzltJfAhOHlo4jZ/nOzUGEORUszymmL OpFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=N2oYKm4kbcjnrzOPJaN5bBfK4oadekuOvRl8x7PJBXU=; fh=40n+/ax6/TwWDdIfyvrWNrUwg0n4BBAH13CBKCAYL98=; b=Xj7RG/2ktdH0hCwzis7TPu+x3DUUItQHtPVzRcY+KIYBlkBjRb3K5pVQ2bpni3Bj/e TBwhUzpjS8RBu4m0BOgXdIPul/GNU+Idd+STRToF0pMnAD8Yrh235IwMht7HtnBKol6P YMWp2FC56yjU0bM0RgZtEQPQZkNL+hUnnFTS9EsVvxr6w9FE9agdqklKbYONcMkC/xeX wpkIZtg7UDejjQcAHK+NW83BHgN08aeiB2SGVz6R3Ef/e+KsxdNc04e8vyS0aJML611C xt1zJaDE19BsWj4bkmsm1/rZ9nsapiHN7iOu6zCqCntKA3B1e4jMryLgt7DsMJojaUZk MCFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=mCqO27KJ; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84682-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mw7-20020a17090b4d0700b00298e649da8csi968290pjb.135.2024.02.28.00.36.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:36:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=mCqO27KJ; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84682-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84682-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D041A28307E for ; Wed, 28 Feb 2024 08:35:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A66A6381D2; Wed, 28 Feb 2024 08:33:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="mCqO27KJ" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC9E3613C for ; Wed, 28 Feb 2024 08:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109206; cv=none; b=P4qDcroU6zdYMVqaaWAsOWBbl9zeylvg1xSad3qG+TBe1jsnbJ2Eq8VZ7BGLIKkHmC+XGLrwSZrxva+i2ErY23REbqiO5YLCBoL5dZt1LVBoNmj5dL76Uo03r06TfDMSiH5WutsBWagCgxUyhVMe+8G+LqYh6T/60L3JLYmmlD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109206; c=relaxed/simple; bh=zMATGWmbhje5tfDxfaCFVw5MU9tqi71sQIaQ5Z5dkgc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ragRWnA5ekLDgE0h3WMVd59y5++WtWUnPFYQwU6MS8N7eFVqraqHgiGr1VBdB/YD/DlqN1MxCk9+oazmPQljAGgMhEc7/Z3xK5nh8OPM6CGkvdH2sliuDeRhlBneYDAqFjWpYHJ1Dryy9RDewkyVa5e3wZXTcysiRS/97G6Fd20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=mCqO27KJ; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a3ed9cae56fso109786966b.1 for ; Wed, 28 Feb 2024 00:33:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109203; x=1709714003; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N2oYKm4kbcjnrzOPJaN5bBfK4oadekuOvRl8x7PJBXU=; b=mCqO27KJ0IiF9CFQu6XrmeICFGNZ30/aPnUv9BS40YIcd6qlC1XDQSDJd4lr8m9GEM XAEc9Y8q4oHPN9b8Dll/ZgqKE5ESH6LMDFr3WIengVrh2DYsdOeWAqZsfb4ufxAvx2Sg h2QRn0sK/U2mA9N2myAnskINHSKuXzvIm/xw9vdx4a+YoEN3Z/Isb640V4m0dE0AbM5X l6LY26vqaaCVC3SPnUf16bxUpATGVC9XYMwASEs5wWgBpsgyHk/B7C2im1OJ6UymV1hp IJ9nrwqLRlNYXRV1hDMM3aZlH1HQusOLq61+qXM8rfcqTKDp54MC59eoXYdc6D/cdzPj lXEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109203; x=1709714003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N2oYKm4kbcjnrzOPJaN5bBfK4oadekuOvRl8x7PJBXU=; b=Tb+4H44QOrcLI6YG528fsIjFmw6eGivVfkaqhFT4pzDRRf80flCTW++5ITM+mAH0CL uf9YiIzc/6VyxR7qExvuTsfjmZa+xvezggJM/TXdjf+PbAzg6g9ljP84e7nHTt+yfn5g f5zheBfRa9NvHOV6yDF081JfD6ta7tB8T37jq9XABqb5V93YaAZIRWMo02okI7KJClrO g9I81Oyx585neiGzDMucFJ6I0UWtq1i9bM8jpE9gdW3i/1QX+ae/LlgZSK7sXZNiPIn8 TohoXby7gOCC4b9B3vdVoPRQJJNBTXO3FxP5hGOQ5XhBmRJW0hf7X6My+yq+tQJdM6sd iVMA== X-Forwarded-Encrypted: i=1; AJvYcCVQta7zrKhV6hqlSZ0ConH3lWh7lYRWxGoYmtB3+TMRWTxoCSW313NWXof38B3pztzYQWsFIX9X/0hJgcv0YXkITFvz2ryKlN2YkyPe X-Gm-Message-State: AOJu0YzN1mL4yX9yLbILSfzS6cWEJHsheszBpTHSv/XGHxRe4Z6RUzdR uE+vdcYpqURLVylInfN/VjMGhjwP7nbnPKWuO+H4BEJeyl5yU6Ld0O3joVSve4o= X-Received: by 2002:a17:906:f357:b0:a44:591:a3d8 with SMTP id hg23-20020a170906f35700b00a440591a3d8mr669369ejb.31.1709109203006; Wed, 28 Feb 2024 00:33:23 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:22 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 06/10] watchdog: rzg2l_wdt: Remove comparison with zero Date: Wed, 28 Feb 2024 10:32:49 +0200 Message-Id: <20240228083253.2640997-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131087002058586 X-GMAIL-MSGID: 1792131087002058586 From: Claudiu Beznea devm_add_action_or_reset() could return -ENOMEM or zero. Thus, remove comparison with zero of the returning value to make code simpler. Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 93a49fd0c7aa..29eb47bcf984 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -316,7 +316,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) watchdog_set_drvdata(&priv->wdev, priv); ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); - if (ret < 0) + if (ret) return ret; watchdog_set_nowayout(&priv->wdev, nowayout); From patchwork Wed Feb 28 08:32:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207706 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210817dyb; Wed, 28 Feb 2024 00:36:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVESBi6prZqN/Z5CGHkWtmrm3CyQa/6c1FFkMB8PyhI4zS7Vna+TZBpaD0x5786B7lAHT2MnvJyW2YylFH1TbnjissCJg== X-Google-Smtp-Source: AGHT+IHTVei/f4EUZTA+Iav4Df/olchoaDR3xiyZYmocvk09c+CUbwhrWJaj/YCWDG/NIQBBtT4y X-Received: by 2002:a17:902:cecc:b0:1dc:8f8e:63e2 with SMTP id d12-20020a170902cecc00b001dc8f8e63e2mr11458272plg.46.1709109405382; Wed, 28 Feb 2024 00:36:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109405; cv=pass; d=google.com; s=arc-20160816; b=XfHj77XX1042h0OOvRibl6biTgnZilrpyce/gtaQpG0Z31mBUkC2vydBa2e54T5ytR 5XOp1oc1ZfCYzoGnhmq9zCQzKN8cdtmcGQf5OAeBOXgR0NfH3XCXFGdkJM3VonocFx6h 05gVIURiSx3oMGqECMdZEd2lysR7RYNXEtOnTPTUxsPGJsFzLwT1i/KoKgST47KKitE/ xLku++54DAbZGl/SoNvWxYng6BCoV9UOd1cZaN13Lf4lsM+M1gNqGG/kXzXBGrODEPZ2 0j5jIIYIdM0aJNBWWU/io+0CDwJLTTxv2AoF225S+L7+dDZo5AyN+HB/LB+9jRqymmIr DWfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CK+4L+T/fCIZeFhsmGZI2escuTtf5tzbbpdNzNvLL94=; fh=bnkrp7qmIJ76Di4px+4GQzz9bOtm2rGlioMAwuAD0V8=; b=k0oIUfH/9qoEXnozBWDBQjHfpea4AYXSgL6smsz+FAnsQhtmEXiWMD+KbA9mq7g5nV GsCu2Y7T0ktQqHIrf2jqNK5LGBYgEiFf4FLahv3cH7CN9+/1IMEI6rOgmcyazGzELiXm UNW+WzR+MkIqBEw8il2tMvlndvb5RxAQMo6B3Gc7Z7/uzUn7baWklijS3FQnb9L8kKBT 9+2weMw4J7hIiLrmcd2w0oJCArogQ+SWYRGwsFRUHV6g8NpJXkhpuWqVbHDHBq1qiX2G oFr1kHHXjQqRVwp9I24N0LLkLHETkA5sbr81T4qkLBGyt49vRtSE+1uYhaxASZQM9rPC mazw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=I1oWmTp+; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84683-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84683-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u22-20020a1709026e1600b001dc755ca214si2867736plk.618.2024.02.28.00.36.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:36:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84683-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=I1oWmTp+; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84683-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84683-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 35413287612 for ; Wed, 28 Feb 2024 08:35:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1393E38DFE; Wed, 28 Feb 2024 08:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="I1oWmTp+" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 723AD3612C for ; Wed, 28 Feb 2024 08:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109208; cv=none; b=tqaGzaBvo7rBtZ7lQmw5wWYlCdo1sG+EyW0ALTgO52fkn6MDPaohRBh/XqcPLiWE+OH/elNykREc1CIdK/K2V/x1rPAlSoEsnJ4yxzWdJ7I6NC+jKMhX+SLv2kY9ZWCQGs8vP8Qg/x17PWJcNz/9Sqhgo7OHJVxylZnlmLvj8wk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109208; c=relaxed/simple; bh=Rdlb2ia/Zc28BSEYVcVdZUAeB+95/SXqjOJ1NOQ27MU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mwFzRo8gUJ6YxQi7Hs3x+g5klXkR4JUkG8W7L8b9fXfZTUkdbA4+owprmudbA22Kx4e12hT5mmsIBjO4z1MTchoq87gsYwuRcMxp4sSqVdefIgTk848hV1YjvHx1lWK/vPw/G3mTm7Iqm2P69W/ht/Mbb68ROAYsqTUqgtJM69w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=I1oWmTp+; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a3ee69976c9so655534766b.0 for ; Wed, 28 Feb 2024 00:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109204; x=1709714004; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CK+4L+T/fCIZeFhsmGZI2escuTtf5tzbbpdNzNvLL94=; b=I1oWmTp+aD0H2i8uoTd9oTKsnW4BYXvwX/ALMk0OFOsB4QBlO8Ot7ybR14BsHW3nC4 qElOrDmrrlpaQpEhfpQIgmHMpO1I0BGqEPsbraOILsshM+YVWMBuFKw3SfUW5ulDQ5rf Pfg12vJ2rQc5e4O2lWiqdNRb8E7a4/uIjdfvfltzRLTX7Jotv2fFGiP2NPx2x+7BDgQe qEBZB/zl+SUx12KutfXU9NlPcz/9AaO1t6eYVze9EoSPGlK7tyi0tZQceQj5VnvXPL1f w69I/yX36S1nHieUS78MEcBxIPbQ0jVU+BO6LScGdBpmNMvr8NTbeNuAmLgU63YW9T+O gWRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109204; x=1709714004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CK+4L+T/fCIZeFhsmGZI2escuTtf5tzbbpdNzNvLL94=; b=FIFIQD1ZuL9BT6GHQQXy49SYelHEwSZbLy28MSOQeilTy9i0xEnmgDbGZCN1AHuXUi BXuK6xXFf8EPhCOrxCZLB3DdLCUjPgqctu+C3WYqI8bv7d6BiBqUtcbDDRAMzvq339rb YuYCviufv3DjTQTOBL0zyxgdIy+UqMC0DIkQUgQj/LpzPVC3YtZvCcZj6A2mCMs8owJr zGyclWuqzXjV2OnJkvhVPUwq2QM0rC1u/CQOu3vXy0U6+qp+/pFwYsXjye1YvnsYWVza jPcdQx5Wy9ZckjX5e8db//0tS/6j2HJHZoJ2att5lkDZurZw5uwLeB3eN9tngGLqRk4P avIg== X-Forwarded-Encrypted: i=1; AJvYcCVo/YRmwlE2ygT84D1bQkVl2VN2LUBX/eDUxgScmy4L1KlVQBBAZB9XrbXPqdXw9xelm58GwI6DKHtpiBhi/KSGzBDFOpeXEDbDt09G X-Gm-Message-State: AOJu0YxDBuWemNM6bRVY3/wvVdcpXLe0xIf3XEZs5LpwfkMlMWM1n+Uk PbF+dYYfdIx0tPekG16jJuMjwxcjLW9Z9KVGR2tKC/yt13am6UmpXhZzEORND+k= X-Received: by 2002:a17:906:254b:b0:a43:fd9e:2d44 with SMTP id j11-20020a170906254b00b00a43fd9e2d44mr610957ejb.42.1709109204365; Wed, 28 Feb 2024 00:33:24 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:24 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 07/10] watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset Date: Wed, 28 Feb 2024 10:32:50 +0200 Message-Id: <20240228083253.2640997-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131103747276425 X-GMAIL-MSGID: 1792131103747276425 From: Claudiu Beznea The reset driver has been adapted in commit da235d2fac21 ("clk: renesas: rzg2l: Check reset monitor registers") to check the reset monitor bits before declaring reset asserts/de-asserts as successful/failure operations. With that, there is no need to keep the reset workaround for RZ/V2M in place in the watchdog driver. Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - collected tag Changes in v3: - none Changes in v2: - none drivers/watchdog/rzg2l_wdt.c | 39 ++++-------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 29eb47bcf984..42f1d5d6f07e 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -54,35 +53,11 @@ struct rzg2l_wdt_priv { struct reset_control *rstc; unsigned long osc_clk_rate; unsigned long delay; - unsigned long minimum_assertion_period; struct clk *pclk; struct clk *osc_clk; enum rz_wdt_type devtype; }; -static int rzg2l_wdt_reset(struct rzg2l_wdt_priv *priv) -{ - int err, status; - - if (priv->devtype == WDT_RZV2M) { - /* WDT needs TYPE-B reset control */ - err = reset_control_assert(priv->rstc); - if (err) - return err; - ndelay(priv->minimum_assertion_period); - err = reset_control_deassert(priv->rstc); - if (err) - return err; - err = read_poll_timeout(reset_control_status, status, - status != 1, 0, 1000, false, - priv->rstc); - } else { - err = reset_control_reset(priv->rstc); - } - - return err; -} - static void rzg2l_wdt_wait_delay(struct rzg2l_wdt_priv *priv) { /* delay timer when change the setting register */ @@ -187,13 +162,12 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, unsigned long action, void *data) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; clk_prepare_enable(priv->pclk); clk_prepare_enable(priv->osc_clk); if (priv->devtype == WDT_RZG2L) { - int ret; - ret = reset_control_deassert(priv->rstc); if (ret) return ret; @@ -205,7 +179,9 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, rzg2l_wdt_write(priv, PEEN_FORCE, PEEN); } else { /* RZ/V2M doesn't have parity error registers */ - rzg2l_wdt_reset(priv); + ret = reset_control_reset(priv->rstc); + if (ret) + return ret; wdev->timeout = 0; @@ -297,13 +273,6 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->devtype = (uintptr_t)of_device_get_match_data(dev); - if (priv->devtype == WDT_RZV2M) { - priv->minimum_assertion_period = RZV2M_A_NSEC + - 3 * F2CYCLE_NSEC(pclk_rate) + 5 * - max(F2CYCLE_NSEC(priv->osc_clk_rate), - F2CYCLE_NSEC(pclk_rate)); - } - pm_runtime_enable(&pdev->dev); priv->wdev.info = &rzg2l_wdt_ident; From patchwork Wed Feb 28 08:32:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3214196dyb; Wed, 28 Feb 2024 00:46:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW2KBuIDZMjua/x6t8DegHz7N0EGhL/KaFPqs0w29gMjhVwucYRfKBV6efxvSgcA1Epd30zzQCFB2sIRxIN7brVFYqdBw== X-Google-Smtp-Source: AGHT+IHd47SinH2XjTOJ+5hGj9AMC2fCeaHPOmF59oX+xMRWyqLEJt1t1JGA2T8DRYVUcukTevUH X-Received: by 2002:a17:90a:d78d:b0:299:344f:b3d5 with SMTP id z13-20020a17090ad78d00b00299344fb3d5mr9235245pju.3.1709109974078; Wed, 28 Feb 2024 00:46:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109974; cv=pass; d=google.com; s=arc-20160816; b=vXK9sAIODu0GGwmIarNSdY5sI8NGrXkUbwk3yspTMnJ+1yvNsoEM1Vyzwgl5lWL7R1 a+5k3OetlTJDJ/M9erwvZXpFMyTVSEf3/pso7yPTKkai+xE9oHqvPJMxHZlM+pHwn1Z1 /EDyYJbqDtih81mUDW1Ldlbkrp0qccSMysAxapkUZ2wRCxB+3gCni9RksWR2ZeD+1/yu DC1g0VmxwOlgaleZUAEbNHxVW2MPEeds1rP3hNVuxPaUyzs+RbG1vNwEEa9ZDhNilYJx V820QLcbKTc/fb2RU8sl4C4Giv692bwYiIsuRCZgeX0Ear52T7PnYVFKe/rpFESyrfiG GimQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GjCAC+2PerafieMHV8RN2guxKuMHo8tOwc6kR6Aqv5E=; fh=rsWzAXt6rw/QbO8Mdx56fdsEykr2W0+HzHS3nEFJv0I=; b=lzQzexm69egz0k3P+8moDpslt1GQVhIoEm8HpD1Wz+OXQDEC1Hmny8SRVhxUCCTMzN Q6UcYKb5jOhLkE0dKmfvW5d6xuMYHGolPradU2xy1O6Oo85KLxS6/wBf6PTEsQEe7gju XUfw/EAYuC8ZVuybGTPyHRWvVxEVstm/aHgdg/qDlxSJoHkgssD9Ns8stQk9Y37hsP/I cORTgynxpECl9KTSPi8+1gmCQ4YNN7J7MIsQoS+fkz1F6GuV8G8MFtLHImEbpzSVPORu 4wHXib5++z/3sFppjezYG+77Uk2DuGoAjZPp8h05Ml2UmbOZ/jCF2OMIFjN2mp2im5EE dYow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Tc6OO+fU; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84684-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84684-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r20-20020a632054000000b005d8d56cd646si6731303pgm.130.2024.02.28.00.46.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:46:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84684-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Tc6OO+fU; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84684-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84684-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 302B2B27CE9 for ; Wed, 28 Feb 2024 08:35:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77CAD38390; Wed, 28 Feb 2024 08:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Tc6OO+fU" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79A54374EA for ; Wed, 28 Feb 2024 08:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109209; cv=none; b=P7NbFefbsnmjCvARffsKnObbOu/c4K4Dww5bscJg+vbRmHfWuxZPON5Uwd7U7OcxIcCTlBedz28b24LoJEB4hoWAcwQce074l6D8SV+lAfl5aut5LJQV+ayX2R7s+w+bvHmzdSBHMARwbLPGDgmxp2rcPKa5hO3pNMaOsXinMNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109209; c=relaxed/simple; bh=xpEy60wLCww6Rzj9qsFI342NwmQkdCt2ZTEg/Fiucao=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mZ2Zf6yn2JDKH7xDLSdeYdoYs9+dygQs44GejsCQ4EqsW+kO7/0ubbkyPzHJBO7K1Fx5jdl6XGtCnoMe3aPVvTKy+4d3XbKXVzo71YvD4KpHVT3iGXsOaH3D6xK6oehEjAr+hKWA0brMt0Aw5wuUxD6X2WxNEUL4HGXTqZlIAYc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Tc6OO+fU; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3d5e77cfbeso109069966b.0 for ; Wed, 28 Feb 2024 00:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109206; x=1709714006; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GjCAC+2PerafieMHV8RN2guxKuMHo8tOwc6kR6Aqv5E=; b=Tc6OO+fUTOKmKwLJsUx13q2P9pAcQaEPdAnUsBsvfA6iC5HsVbxYFtIR3J9E4lgq7l yHGuSDXfqG8UiKZOVAKbErSDtjicSmbukP7g+iR5vOvHYSVr6B7UHZZvJ8lPfBnzY6L8 o0tnPe/sCrvmAu/QpxZA1An3KX/Z+t6gPP87yDVnx+GYJyN3XIeSEzflXmr9hEl6jOU/ rNz54GIniDUtKlaNzDuqXDMRAwyIZG6c0ItWa/DRFeGwmwnCKYhELwnjy9CPGTGt7bv7 NgN7ygBjzS1ZXRWx09xssZ2X1n+SwArysj61yPO5k86dJ4nD13IVMW+Q/eL8cG2wgJKV a5xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109206; x=1709714006; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GjCAC+2PerafieMHV8RN2guxKuMHo8tOwc6kR6Aqv5E=; b=HFwXlrlTnTyRXJEgRFB6f2GrGh4aXpndx6pZ52Up6DlzlMUbscG3p2NTJe7IaM/z0V XnXdTPtd6g1tW7AgbiPO3VIxB2omCuvqkWPB1UHAljysSuWgBYMQTbCssyi7nfRL3lrO bbOW8YbkyUFfD2BSxr2w5Ot6YcEMAWO9PGHJg4GKff7hnByo05Mu5lkKMuaFG2aVm3y8 xKtQZ6zsNsUJK8rbSslFvPmJFToEejTJOJ3++0yR0HMiZ8Fn5kRVcdlDkAub3MKhURbA QCBTBFq6qI5xafCjRVu/rYysZWF5kGL2si1wFFSE3aDXOEf/tgX2iaOZUBA8WrJ/eTn9 1WfQ== X-Forwarded-Encrypted: i=1; AJvYcCXbdVwssrRRUunH9VsQpmj9xHaZAwNZsoNFctcLmRYiecPLm5LxyAaCpStvuwSKR+BiPBMqRzBWZfyLAAsRy+H7nFpsSwn3fib6uQat X-Gm-Message-State: AOJu0Yy6VCwtTbiPi5sHjRvHyIM2n6LtCf0jb01ERDohi7iX5XEr+JsB fxULfxVhAy6zJKIKqTA1+Cm6Xx3T3b7AULTg8SOl+hF6zu3mqH9INBKWKeUcNuY= X-Received: by 2002:a17:906:f357:b0:a44:591:a3d8 with SMTP id hg23-20020a170906f35700b00a440591a3d8mr669462ejb.31.1709109205764; Wed, 28 Feb 2024 00:33:25 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:25 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 08/10] watchdog: rzg2l_wdt: Add suspend/resume support Date: Wed, 28 Feb 2024 10:32:51 +0200 Message-Id: <20240228083253.2640997-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131700456627637 X-GMAIL-MSGID: 1792131700456627637 From: Claudiu Beznea The RZ/G3S supports deep sleep states where power to most of the IP blocks is cut off. To ensure proper working of the watchdog when resuming from such states, the suspend function is stopping the watchdog and the resume function is starting it. There is no need to configure the watchdog in case the watchdog was stopped prior to starting suspend. Signed-off-by: Claudiu Beznea --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - none Changes in v2: - remove the usage of pm_ptr() drivers/watchdog/rzg2l_wdt.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 42f1d5d6f07e..c8c20cfb97a3 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -284,6 +284,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev) priv->wdev.timeout = WDT_DEFAULT_TIMEOUT; watchdog_set_drvdata(&priv->wdev, priv); + dev_set_drvdata(dev, priv); ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev); if (ret) return ret; @@ -305,10 +306,35 @@ static const struct of_device_id rzg2l_wdt_ids[] = { }; MODULE_DEVICE_TABLE(of, rzg2l_wdt_ids); +static int rzg2l_wdt_suspend_late(struct device *dev) +{ + struct rzg2l_wdt_priv *priv = dev_get_drvdata(dev); + + if (!watchdog_active(&priv->wdev)) + return 0; + + return rzg2l_wdt_stop(&priv->wdev); +} + +static int rzg2l_wdt_resume_early(struct device *dev) +{ + struct rzg2l_wdt_priv *priv = dev_get_drvdata(dev); + + if (!watchdog_active(&priv->wdev)) + return 0; + + return rzg2l_wdt_start(&priv->wdev); +} + +static const struct dev_pm_ops rzg2l_wdt_pm_ops = { + LATE_SYSTEM_SLEEP_PM_OPS(rzg2l_wdt_suspend_late, rzg2l_wdt_resume_early) +}; + static struct platform_driver rzg2l_wdt_driver = { .driver = { .name = "rzg2l_wdt", .of_match_table = rzg2l_wdt_ids, + .pm = &rzg2l_wdt_pm_ops, }, .probe = rzg2l_wdt_probe, }; From patchwork Wed Feb 28 08:32:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207704 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210554dyb; Wed, 28 Feb 2024 00:36:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUreV8gK8/5xrdEGpAxpDqjraXYAEyDrM250dp6zp5BUN35GnlqDXxlSENUjjbuwc6tnYXqXlnR5FNKh6nR/Hwas5PZuw== X-Google-Smtp-Source: AGHT+IG+YDB4I5zx9Ho+GXXnYWLtwR+DZW7BpHn76o474iPj2WlyPLw0vzj4A+LBI2ABGis4K/E2 X-Received: by 2002:a81:9256:0:b0:608:b4b1:3e48 with SMTP id j83-20020a819256000000b00608b4b13e48mr4654955ywg.1.1709109361756; Wed, 28 Feb 2024 00:36:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109361; cv=pass; d=google.com; s=arc-20160816; b=navbs72hiDKiNwqyWAQvSbQ6wX+Ptvi+OEuFCsX1MKepLvCYEbP2vRvlOapyMWDi79 +0+aXYHQmxSs3l/oNuze0RGMTLK+dt66NatQBNq+MpX7IPb2CqXOPXkG6cc1GU7A94LW 2p0VjvKcQQAcEA7BvoXnGI1NNGJ9hcsh4VR1g8rx394tWKm3LSBukE+y8CxyFDCtaUWH nnY3DmfuWkw/3NMPi7YhTgZQSstzUT28ZB3kv+qvTDUK6kroKanVmGQ1cK2Pd9HAoAM+ CXLxopO446n8U6khaCxtvN1O1BRULFlaRH8H3ZtBcsnsvY/yv9yd8s6EfpxM48DO5R9x 0GPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bfpDELhZMXS3a+UUIPdr1Q+y0EuPmA52WesKgXwm+Ms=; fh=Q+V3L2zN30RajuobE+2SdYzeSnfcyv21XmIrKnrbFrY=; b=RI8pfiyoKL6JtQFZdVITmWashJwJ7sIMBQeGo1UOATAfCZ2NIzVSnnWF6WbcJac7n3 xyszkW4P58iMaOrb3ZGvKvqy+4sMT6xI8qDTG/oKNOroWGxATn8ZpRsSnU0YsTS+UEIP acZ8ccOimRkNTNqDFCtYvgkpavrtAgLxJbBPaXbF5GTer+jThi3wZS+rl5cQfGNo/IH6 jY7iJ7a7uvpJHCDgN9K3x7nxqZF7vNNUBIP7jiQOhp2gosdwjD6fuda8uOQ/etJs3not efMiS8KE+MxPFzyADWOIxOAHwGhDydXicQD2qAe5nyg9diUDNntXE2Xs+3AOyDGnHVQ5 TJ1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=IQcs0ODK; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84685-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84685-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fu38-20020a05622a5da600b0042e46349f83si8658929qtb.633.2024.02.28.00.36.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:36:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84685-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=IQcs0ODK; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84685-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84685-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 75FBF1C216C0 for ; Wed, 28 Feb 2024 08:36:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D59543A267; Wed, 28 Feb 2024 08:33:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="IQcs0ODK" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1098381AF for ; Wed, 28 Feb 2024 08:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109210; cv=none; b=qLIyRQVhfcyWmeeCUAJ+lBTUInxARDo9/9YVLzhZORXHnvhIOYRH2OmBiiBG/MEmdi1un3RrajaWvbPHwDNzepkmRnhEWbBKqIc+jiiGlgkV/3aKHTFNt/Jo7L1DPXXKE1I3+JZPvQO2vtTz7lC6kAySdKSjA9yFUdMLaRgL0ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109210; c=relaxed/simple; bh=CJ5Yg4Su25upi9PiRBilKHZBgxfV1yi9eo8lCkVdx7g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=r+9E3OeF5h+ziNFxxhYcGVUkBRf2oUpljE/XTlDqHhqEz8NuGkCAlKbdRKBYIFx8ewqrt/k6Z+AkdpvYSgwmMEH0dG+4W5+v2SHX1gF/L1E+ZXDGOjjSSnu+hmg+M8qnUZ4Xpb3PPxM0vy7QhXl/pbZLd3Te96BNCP8U9fe/I0k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=IQcs0ODK; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5648d92919dso6953440a12.1 for ; Wed, 28 Feb 2024 00:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109207; x=1709714007; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bfpDELhZMXS3a+UUIPdr1Q+y0EuPmA52WesKgXwm+Ms=; b=IQcs0ODKBBlEqzcRUnMR3PphfLdpm8uFtq6t6DplJCVhjYQyfNKbjPiB40fZPqwWOA aH2gMx1WBfmZGxKnhVFXzVDhIjHuAAdxDX1+xl/Z9a1dd4sM9Jibl7oWNPz2v0w3g6Mz jHH6BYUQh/tsMxeYXOzzX5RxoHDEXa9lervrxlDVMR7felSsHXMjowU3gjy2VNzDevpJ cAbD7kFHwMegwkaL4VfLF23a/c0uHyEwImKp9aAnjXl2bXJtQp8nVZNQRc7DzRV0wYua sv0S6P4gIyx94Js/x6cEs4kvRwpWFSNq3CnGaqH2I6+QcmVhSx/cMArAxM5y/1Tb+y4N 8F+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109207; x=1709714007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bfpDELhZMXS3a+UUIPdr1Q+y0EuPmA52WesKgXwm+Ms=; b=h8becMPp1LE6UKr0LnWz/yvFjvpfOEuOUzg1ppR+dv5SUQh0wo2B7Akw8ea2eZNrTC LEKKtPKHJpt6nQ8eY0Cfi3Mb/vJEjc0JJ+GIGmDRqOVXXhxCNdR+HIsMzXynJDQWMKXm GoVa0YE3acotcvuRDZUGdn/mPK3uMAnBZWNKtIJGtFqGntRsgDD82MeJAf0Cp8agGGv/ p//WSpPDN3TMC98oX/NmR5wngQffA1DLvSodXx4XyAy6GG4eQSXJdAdjNf1MC/zhOBaW qMXZr3A1820IIL70xp+Lk9HJ3qxaK6XlFB5i9sjLcjYZlIUyjYa65s7umpDz4b7u7A6T VBjw== X-Forwarded-Encrypted: i=1; AJvYcCU1OJrZ+JQHlHZS4X2jCEJ8CEV3LENiKDQgLLeyzm/lW3ASVrTR7dkays9Pv8qKmNLwZcXBjfLgzy/PHYfAN3/vL2wjFaMFbogJqGnU X-Gm-Message-State: AOJu0YxsmBttBg/V8UfEBatPGMRA8DiQ/A8oC0hsKCHnFSRdLHnAyXY1 cgNXl2USr+oQ+x2wXwsgXAivzxWCmeUy16Xscwulss8t5hUHNy/D0UTeqp9o93Y= X-Received: by 2002:a17:906:384f:b0:a3f:2d9c:c66b with SMTP id w15-20020a170906384f00b00a3f2d9cc66bmr8289281ejc.22.1709109207332; Wed, 28 Feb 2024 00:33:27 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:26 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v8 09/10] watchdog: rzg2l_wdt: Power on the PM domain in rzg2l_wdt_restart() Date: Wed, 28 Feb 2024 10:32:52 +0200 Message-Id: <20240228083253.2640997-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131058201275581 X-GMAIL-MSGID: 1792131058201275581 From: Claudiu Beznea The rzg2l_wdt_restart() is called from atomic context. Calling pm_runtime_{get_sync, resume_and_get}() or any other runtime PM resume APIs is not an option as it may lead to issues as described in commit e4cf89596c1f ("watchdog: rzg2l_wdt: Fix 'BUG: Invalid wait context'") that removed the pm_runtime_get_sync() and used directly the clk_prepare_enable() APIs. Starting with RZ/G3S the watchdog could be part of its own software controlled power domain (see the initial implementation in Link section). In case the watchdog is not used the power domain is off and accessing watchdog registers leads to aborts. To solve this the patch powers on the power domain using dev_pm_genpd_resume() API before enabling its clock. This is not sleeping or taking any other locks as the power domain will not be registered with GENPD_FLAG_IRQ_SAFE flags. Link: https://lore.kernel.org/all/20240208124300.2740313-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Claudiu Beznea --- Changes in v8: - none, this patch is new drivers/watchdog/rzg2l_wdt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index c8c20cfb97a3..98e5e9914a5d 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -164,6 +165,17 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev, struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); int ret; + /* + * The device may be part of a power domain that is currently + * powered off. We need to power it up before accessing registers. + * We don't undo the dev_pm_genpd_resume() as the device need to + * be up for the reboot to happen. Also, as we are in atomic context + * here there is no need to increment PM runtime usage counter + * (to make sure pm_runtime_active() doesn't return wrong code). + */ + if (!pm_runtime_active(wdev->parent)) + dev_pm_genpd_resume(wdev->parent); + clk_prepare_enable(priv->pclk); clk_prepare_enable(priv->osc_clk); From patchwork Wed Feb 28 08:32:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 207708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3210959dyb; Wed, 28 Feb 2024 00:37:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXlKSOrZRn17hfxxQTC5SsuFctkmOPCzltN/o/wZmDDi3W64tgJHe41lXPOz+wYtOo7OLMtbHq7MuIegkgqX1W02z3TwQ== X-Google-Smtp-Source: AGHT+IGDPqeimUPsc4qObIauzku9+BxWvZO8FezzTHVKaLXl4xBr84p7jLPKkFi8vhnIbgkVHCxv X-Received: by 2002:a17:902:b68e:b0:1dc:a647:6979 with SMTP id c14-20020a170902b68e00b001dca6476979mr7247387pls.58.1709109423426; Wed, 28 Feb 2024 00:37:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109423; cv=pass; d=google.com; s=arc-20160816; b=EsVhtpiLKoM8ujzNqMtd6O++Y15ewrkTNQLV6JFLUolTMVCguk3pey5UKZ5JcMiLcm P0l2NsDs7AsBSdAHbRWR5UfOCj24dRcc2X+6pfmBeSCCF6MRVOIhvx5PF0GURrsYhzGu lrQwWT/QkO/75arkLrWKkUQS/awyXG9/6r8Lye6xOuM6N73Q1dA/aj3bB1OvkLhYl2cx DQmSvLQwjC4XFQ4NehJBz4BKwNzA0A3yt7+3WBcTtNppkRV47tjgA++nNiLQkLr+/mZ1 Ldgtzki4lnGbZBJbNWk6jZ3yg0h0TMbKtJmPMJuwW1iDDdczGwizdrvtDzLmD5CiHORp q4nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=udAuYdD/mEhYZcun1SYUcgN7ut6llxoEuzPE+4cCd8k=; fh=VIQJib3cATYW5v80bIg3OocBuCT5kuCdJAm9jrFxt7k=; b=kuftd7hWYOdTyT5h/rXVKsIBVl7BvMGyWP0hYvf2Ow4H4I3IUFktYk6hAkelGl7oT7 lackHkdpJlWHvTSIfk6mUSxgXHawLdqJWugSDbzaKSAJ/m6MX8juSXoYfJTdN5UzafWh 25kxWYmEEk/nwRTFn+xKIQZK/PObP349CtWjr4jxotL/6Z4m34opK3yx1ovWeYpP1jaA kH32CGRkfZmtB+UAClOnely8IJczn+O4dI9RzqPL6LTLYMvgvc0qfJaELwe+Mixm/TLc 9lYRxuldAPBVNE2OT8ibCltCwN+D5ClTPzHTD2Ey6zSbjTVlAQafhHJWWCedz+KSEz/6 rt6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=LW+AqZue; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84686-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84686-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i14-20020a17090332ce00b001dccb048434si716664plr.65.2024.02.28.00.37.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:37:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84686-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=LW+AqZue; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-84686-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84686-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1672728B52A for ; Wed, 28 Feb 2024 08:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A46483B190; Wed, 28 Feb 2024 08:33:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="LW+AqZue" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CDC338382 for ; Wed, 28 Feb 2024 08:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109211; cv=none; b=SFnYx64oRHOfNLgR4VGkCd62dnNOqny8GRUj3bIImcsuK56JwurdddjwVaicLyOTQQMzekug3BSSXfFOdzga6T7QmGf1QDM0yeuyHlQbt1dvz0fCnmuXDsRNfNgwb2rujAD2rGp4d9t/Zh/bNnz2R86hmva1c7rk+7FZeRdx5eQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109211; c=relaxed/simple; bh=ZC6qpVtZsWIunDzHO8I7kt48MkFMR6oNCEUodZaMmHU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aXzc0WrkUoJ4Qkc4i9DbtYcraIujnc3mTS+EBOAAKzekMjWZ9VpwkLvhs3+CdvlDDf0PxM8ESBS04tvfy8YaGihAGPiQqGFuzRi0USNAdaIsHCgupue7M12peBWFgmyvvm/UKveFQGfGU6HPmJD39kkdvohO9UG5QHMi1t5Fkos= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=LW+AqZue; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-563b7b3e3ecso7155609a12.0 for ; Wed, 28 Feb 2024 00:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709109209; x=1709714009; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=udAuYdD/mEhYZcun1SYUcgN7ut6llxoEuzPE+4cCd8k=; b=LW+AqZueTuJ38uf5xBLpNY2i8AshSBblDqSlIYrwBEhL8EPQMP+5wKBtahbNYxmj+4 ztTAUe6ousPTKBuNdyc//dxTo3OaZqNVQSieBdm4jBv7YZJJy5NlM3PZDr/xt+2fKFIj ZaiGiyob4A2sM45FFv2brotYV6u8Vqf0hssxX2Xc7wvQvcdEfrDzhyG/7Vc+u83upGwu FtuYj4tFDmEF+l5FxkLkPdxiIp+F1OIRcIccFJyMqX0mSWOSXljDhbehyXPtsSiqgHJd Us1rh7mt9W03bHYhqkKdmP5c/xFtZ8KUxDpLNGnK2T2Vj1tFjp4vr12Ildw9PemHarue 4oxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109209; x=1709714009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=udAuYdD/mEhYZcun1SYUcgN7ut6llxoEuzPE+4cCd8k=; b=ihD1RCf+bjxOVsc4nmSN5kB4E/pjoLjKYTd9xvvAk80XP3aaloW9CNUrUSB0XfxmKh zK1tD1jahmK83/tnJ0VRx/e1/JZVZCpjCVU1gen22bZOm+I7vjdUUxI41K6l3ytYNQxd 2kZcICIVbOCFO9G8+QGaFcwQoeTNe6zIbPUeIqgYTi6H7RlTYc3k1bH/FhSfT6Of7g5b 0Kx0WQUzfsqxnGIqd7x88KEX79jptD2o5woo2eDtIYndOLydNKMPY9y7zAAwoJsY/r2g 4xq3og6jEKDszkq3C/ovPYHUNl5//9/GiuhgFmGWXrQdqaURWOn17AUvqDeCPR0iChea ZILA== X-Forwarded-Encrypted: i=1; AJvYcCUzJZJj787KXpSc5GHGT77PHomnNSc2Bwhl02j42B2fZ7DJcn1go0+MJ3K4We/oNG0SGcLTaByLgx5Et6HxGkQG7TerrcRW6ntoMA6m X-Gm-Message-State: AOJu0Yz/BQMeatm7eoDwl2S4WOJDQHLAxNGslhKP3lOSiR5YLciizMUq wB66a1ZOp52H4fRW92IWyjDoFWiMoZfd/A9iR88YvTO9u+iy5TJc9mEmrO70NFI= X-Received: by 2002:a17:906:a00b:b0:a43:39fe:b475 with SMTP id p11-20020a170906a00b00b00a4339feb475mr5627872ejy.45.1709109208805; Wed, 28 Feb 2024 00:33:28 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.83]) by smtp.gmail.com with ESMTPSA id qh16-20020a170906ecb000b00a432777eb77sm1593987ejb.60.2024.02.28.00.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:33:28 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Conor Dooley Subject: [PATCH v8 10/10] dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Date: Wed, 28 Feb 2024 10:32:53 +0200 Message-Id: <20240228083253.2640997-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> References: <20240228083253.2640997-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792131122757185253 X-GMAIL-MSGID: 1792131122757185253 From: Claudiu Beznea Document the support for the watchdog IP available on RZ/G3S SoC. The watchdog IP available on RZ/G3S SoC is identical to the one found on RZ/G2L SoC. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - none Changes in v4: - none Changes in v3: - re-arranged the tags as my b4 am/shazam placed previously the Ab, Rb tags before the author's Sob Changes in v2: - collected tags - s/G2UL/G2L in patch description Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml index 951a7d54135a..220763838df0 100644 --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml @@ -29,6 +29,7 @@ properties: - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five - renesas,r9a07g044-wdt # RZ/G2{L,LC} - renesas,r9a07g054-wdt # RZ/V2L + - renesas,r9a08g045-wdt # RZ/G3S - const: renesas,rzg2l-wdt - items: