From patchwork Wed Apr 10 13:40:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624556 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 5824B16DEDE for ; Wed, 10 Apr 2024 13:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756469; cv=none; b=ow5dvPmjnOrmGQWTPYuM2Zb6d8qGw8Axp7ZYnJn7aaBmd2M6sar03IFBMDMf3kMMkO9M2IozyFFoUeEuCbYbosjYxnqgXg/yLTAmx7AMIWzUNqSeXEepmioCpIOX+xNaCocXcd479WAPeL2Uxxh7WQjhrL+HCuF8qY8p97zfiPw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756469; c=relaxed/simple; bh=AHg4r1igOHQ/H9MTzUFzqv2TctQMmFdO0mNsX/ev1eE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HbmV96i7M7d+S/ZJ4TPMyuW7/m1AxbTN0ARybDAWvN29Rh2EbFAa4zePGJbRUhEVu45u60Qdcw/K4Y1T0CdJB8PFmg0IE+4J+K01vEoAl4kS4NiDNWMR3ElYFRIWGdiDxM9RWLShd687fX+YbYPVCXd4aiqzotjtmX6j+2/79f4= 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=bLpduocW; arc=none smtp.client-ip=209.85.208.176 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="bLpduocW" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d4886a1cb4so80218301fa.0 for ; Wed, 10 Apr 2024 06:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756465; x=1713361265; 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=C+lvKNL9MEQ6OHHG/4yYF9MfyhojBLzLY7o7MaWIK6A=; b=bLpduocW3SOZfigBjW9eI9gwZU75N7BWshSqBBh7X6azWnkDPhW0+53QKvOtKIXH5c XCWFi11lJI2rjzHy1TULTxqkhxIxKWxtGZXUap9aqtJ8Ql8s3gm+q1StobHoDu1gf++q BXBw+DSwzW+Gf6NMBPEoAzyQpNOKcRSyRuvC0FhD/e1TO3oPczl6rYYce6O9Eq2AHp6J 8xYll2OnYuBQteynP/OGF1iwFNJMWj8TLx+kTLu35A/ZI3pQ4fbgiOlfws4Zb8LWhOzu SKl/2cAIr910zB/xfl4mtGPB/wgpkSHpKXFEsGLK8E9nYyhDAF544rBysUexGDbgwfXX u+cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756465; x=1713361265; 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=C+lvKNL9MEQ6OHHG/4yYF9MfyhojBLzLY7o7MaWIK6A=; b=S+VaFo9q9Tpj/QfeStCp9nWF0d9HunWGIruI/CwRXE0bHrzDD4fIj90zoKVoDT3wl0 U0aYMZmB4jh2U1cyF7yFz3mCB51hd/V8Np1Lk+nJobyw5IuFshDh8VcHiy8EKw+COLNN QwSid1OV28AbHOkHCOl2GTW3GgSbacHYr3v1ij8vNKF7o71ZixVQxQdVahViJQQS3c9X 01bygczjIThTlC1QzmFmoqHXFWYs6SETiigQCIh3ITb5hu2uMddPtLVCMcoLpiuAeh49 8nECrmIyJJFit0xZvUkdrmxjtbPI9p774ozSZdr2M8PLEWAXoWQObqOlvUAz+KSj9z+O b7uw== X-Forwarded-Encrypted: i=1; AJvYcCWRI1LkboLPMAy7I8k9Ua/A69c0CIfj9CiE15MMuIzeTAkQB7HWaCEUElo63urgx4ixN6lvusoqnc8jrt5fnW7gEO+bY1sL1bHCSwNRQYSE95U= X-Gm-Message-State: AOJu0YywlwqfENkl3+heeweFkVPp/XULra980XhRVWCUAPRoUPh+rsjA dr1GrF1Wboz07A103tX4ZKwMTCp8LZyEZTfsRugGi4E3kbBcIGx34wc5zjA6gmE= X-Google-Smtp-Source: AGHT+IFYbRQ4lnDwqKIuup0OKWbE7mK3L/xVYd+kGdrzWnCZWAoH2Gm8LU9jCLdNJsOSjtPrTAQ8wA== X-Received: by 2002:a05:651c:8b:b0:2d8:3eaf:86d2 with SMTP id 11-20020a05651c008b00b002d83eaf86d2mr2127105ljq.47.1712756465419; Wed, 10 Apr 2024 06:41:05 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:04 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 01/10] watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 Date: Wed, 10 Apr 2024 16:40:35 +0300 Message-Id: <20240410134044.2138310-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 6bee137cfbe0..e2439967417a 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -920,7 +920,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 Apr 10 13:40:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624557 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.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 0FF3416E875 for ; Wed, 10 Apr 2024 13:41:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756471; cv=none; b=rTGb/k/wrEg9VO4HnT9Up/cvPysU2IFEWDEfd+24v27FSp1H7Cdc5Qii8ci+DTV6CRxOKiMzucPABB3rAxccq3hXRZE43Id9V0tALant7s1chIA2yh+GrleyUIR7+YYTvxu1pCBJSBmf4BYeVC4CdUPPDzVHnLWr8fpn2vOuq5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756471; c=relaxed/simple; bh=DRGxguGTChX5kxzu5lwWkYnQ/YVRgHMxRSmSOiyZkIA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MuJuGTkVPNVtXk+3OiJxlCgOPbi23iwqGmT+cOy/7OvkJH9KsblFHuzZ6PSNyfcEs+nk12vI1wfAcBQ9Ez/L1TBwKt9KYQ7Y9nWGsAdXkpUO9fZXIZcU7cwaEx78R98E/on9IsIvK3xdbpiAg/XOKZu8HBfStdsVwOfprGPcYyA= 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=R27DNhCm; arc=none smtp.client-ip=209.85.128.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="R27DNhCm" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-417c56569fbso1143765e9.1 for ; Wed, 10 Apr 2024 06:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756467; x=1713361267; 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=VwOQ2Kcf4Va+sLm73V1zpQTlEUytHotkzWfwqgI7DKM=; b=R27DNhCmmLW/Bo/m+nXb+aMvkD8LNNuWu65MIc5yGANp1o8HqrlKHRCoGE9bQagUsK cYOZ2aMiwrSSC3P3bbq9upL9pgXLrER4GhYfeX3kuVw1QPOy7eZ45xXOBWMDNg76MpcY lmdYN+T1kEsWvKYP5CsaLS7aiS+pfXe+np06VOj/NxktPAJyfE8N1BgFuhpSysL63wje HYkC8FYSim2eVTvQ6Nz6UNAlQWGwALm+dGKynBmjjG38QBJBuu3Fot+yG1/OgjWOqp4q qrWwdE/mNUPThiBVthg+d8NwXLx3IrCodpse6AmKfYbcy7RUkL3rVignldPf/TVwUdwQ E/PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756467; x=1713361267; 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=VwOQ2Kcf4Va+sLm73V1zpQTlEUytHotkzWfwqgI7DKM=; b=dK/SRvt62br7/QDmjsevf0jaQ4DXX72pAIbBiW5xVzCfX4q7HzBptx6sbyIk/C3zVF /MLcGE0aZ2yt7GOjYP9cK82dzpuLgB42PzZzegAH+sK5JimhoNUpWV5Y3Ym9glH3sElR +pD8LOjisEy2bPrMhISNV9S5bNZH9cy4YhWK/AY2kii4v66zJntQ7ijTaOMu8LZTrzJT /OSfIbfU1Ch+dEFp7JognSHEysRCye73LKONarpAQyanK04yx0VhAja6LILg9AiXZ5fA b7E25Ma5kU0AI64JX2Xp2JdF+agblWxXOGOVem2j4OvZ0VLqbyLU4gEYHzMR6MSzxgO+ FIQQ== X-Forwarded-Encrypted: i=1; AJvYcCWpuNtwwCk6JwL/G5QWksJto+AqRval6awJyK20zL1JeRNRgK+X4peakkxfAs4DZgAgUspM2Gpj4KV4vscCe/08XshPEDEteazKXD8jB6VcvAA= X-Gm-Message-State: AOJu0YyxEEOLFKCDuOd4qu7SqwrrE9NlHFiCmqcAvLjM2shT1Aar2d6J r2DKHrTbCZNm4diN/RcYrE0IW0uw05j0EPRSY9ozNlfDPNFHMH+CDeikRcH9C8WZJz7NIcBoPv3 z X-Google-Smtp-Source: AGHT+IEPXf1BG80gY9pVAu8MeGUgez3LQFO6YvkYXi5gPVxX16YoW/dOOwGsI76EZlMbjzlzAwlevw== X-Received: by 2002:a05:600c:45ce:b0:416:3a07:43b3 with SMTP id s14-20020a05600c45ce00b004163a0743b3mr2216725wmo.3.1712756467561; Wed, 10 Apr 2024 06:41:07 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:07 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 , kernel test robot Subject: [PATCH RESEND v8 02/10] watchdog: rzg2l_wdt: Make the driver depend on PM Date: Wed, 10 Apr 2024 16:40:36 +0300 Message-Id: <20240410134044.2138310-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Closes: https://lore.kernel.org/linux-devicetree/202402020445.TOBlFPcS-lkp@intel.com 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 e2439967417a..7b66fe06ac85 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -921,6 +921,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 Apr 10 13:40:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624558 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.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 4103316EC09 for ; Wed, 10 Apr 2024 13:41:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756473; cv=none; b=fJqvz3s/0YxbHxZ83PbZ78UgHx5gyOPT/zVvnfCPVXDVdtrIaH8Sf68Bi41lGpvxjXc4eZZNHGwQMidCyQzygQLG/vvXTZ5pIoP07A2yvudWBJXESEVNNcRK9GM2ChtGLUwHQmFEXgGRG6Ezz1SlT3Al+PcNSN2CUwD0KmxhgfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756473; c=relaxed/simple; bh=2iaYjthGV+4YN90lhEWZi3Roao8D27ZIeW/fg1E7/vQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=b9RMP2p+pIiz7dxIzWakvnQUeBsCq23g4xz3xPua66QHVqyeK45VRsytuk3uCBbaoz2QeK2LskNag2YGBap8JzM8JckonfUOXpl2cUt8p6tf8BusNJXXmcbsLiyn3dKuuTZc9k1XSuXOe6QPVuJPOS/T4gDo0PKrIS5+UtMEWX0= 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=caoRt37Z; arc=none smtp.client-ip=209.85.167.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="caoRt37Z" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-516dc51bb72so5277922e87.1 for ; Wed, 10 Apr 2024 06:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756469; x=1713361269; 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=caoRt37Z0djF8KfUzlX902SDNH6iaLMT/OtD8W8Ux4RehUn1Rwuoc24qdWA02FCMQ9 0M8sT+CVwuWpr2K/ka7GIY+pLaBdBo35zYFFNSlD0W38GUEtzkVrVB/SB8EyLVF4Gjsr YEw7b7SFlg8h1REdt0UGAPzDEABUMYW7qhv/riX+hotCwPYW3pNoNrfNuoOuNK/ZTirn 2xnhB2F1zdoB6hPZ7PcMMF2Ql5ICtuJcHngmXBGw3ujhw2D02lVlCX1QsysnrYzRYv6H lbI70w4Soh9sOHBca8NCUICct5IwVC+MF09KZS2Y2IJzEEQ+L5D4/eIVBKaWALZEFcYP LBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756469; x=1713361269; 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=M8mfLyxuA+w2GPY5E35UWLEq94rUWjQEm+huJei6JbaVuNx0qErc/U70wJvQ6x0Trx xMH2/6/A4IvD07h5W4/Lq7ZwiGHuM2YsFBudogwGVZZmoHK0pCBivhd3H4oToeSgS5Go V0J6qtutziuH+C2A6xzV8Gp1wCDBBIOeWmMpl+bhPbdZch3SRgyXh655wI1tV9zs+xBv xqtFfUyXvkWerRpreusR9aLaCjMmlCW1egHjpwMmke1KKPyaHcuZWC3+MSp+PwSSU/so iSlqL+rmNivaKFiAXMhvasgLosTdK/bdxbIntD1lKBA6xn0C3XkvsIfLOqzJ7odEF1Zq ieUQ== X-Forwarded-Encrypted: i=1; AJvYcCWPTZGCl+cOT2ferXKb+h1YianrbhwbmMUZ/DLCEGz7Aqmkb+aZeyParbFG7Oqt4JrEEY/33dHKZGb2nbs827YkdMUmFVTePyKMcNCzJPuzrOE= X-Gm-Message-State: AOJu0Ywfj4pvfC5+XAGPeETFiwZ25pUGlZxd2DFyRUxtiAy+t66ekNup KcYOV38tE/DrPPgEw8m7Zzs+fhMaRuOUL0oPWbNE/H7TLrjqpFFk9sCI0hj2iMk= X-Google-Smtp-Source: AGHT+IFw3OPj12yQhGQYtGjHjUJu+zlht0FnITQUI9YuzbYxpNGRAMoUxZ9v7Lyr4jpHJCf2By7hqw== X-Received: by 2002:a19:3847:0:b0:513:23be:e924 with SMTP id d7-20020a193847000000b0051323bee924mr1631343lfj.59.1712756469308; Wed, 10 Apr 2024 06:41:09 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:08 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 03/10] watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() Date: Wed, 10 Apr 2024 16:40:37 +0300 Message-Id: <20240410134044.2138310-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624559 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.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 27C0016F0CE for ; Wed, 10 Apr 2024 13:41:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756474; cv=none; b=pnK0m8auS2Ym4+bVpY2uf7HIBoMJyiHA+l2tykBk+QheESFu5I5GN+0zP+lfebeQ8Lv7ihQcmgEdLKi5cXjhGpOiqB/JkMXn0nBgUgRzdlwqQpVmAuvZ4DLEBnoG3NtQmVsYSVAp3CmNKsZFGweWALhEPFRN5SnptWOseYr1m3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756474; c=relaxed/simple; bh=Wr6oHFeer/nBk2CrajAUv1ACQwpXo37jKZZaaBfm3BU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Oj57pRPMY2uK2jm71kF7bCrctlBU7R9sYxdK3H2lgujlbGczAABURuxWmtlu9hRjVwjandDSL3Rr0KfSi2+ZRIJl2QkXOcq6PJMsWw+aD087Dol9+XnDKpAHk10FmQE/Yrjv+KAVTb/neM3fccoh8/B9ydpQBrs5Tkx5c+X9GOs= 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=M8nfES8C; arc=none smtp.client-ip=209.85.128.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="M8nfES8C" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-416a0878ad9so13189505e9.3 for ; Wed, 10 Apr 2024 06:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756471; x=1713361271; 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=M8nfES8CkQjGfUIHJYJgF5eoVClMfgKbJ5jjsZvxI1SP+PjTSap4ZFRVjysJncgPdy tOge4ap9Sl+rcgI5NMinkrbHJtK5uqpvIp+7JtfDAE/fnjws3QMQcD9teslF8U2Cte1m uljjZn7gYMP6VA/JOSwRTEwH55QOdJx099bQYclMYCg9mJNZkh+kc1YwRI0z80Pkfdng MZUqEQz+RQCv5xzDTvdJYhxYD7Nbs6Lr++FOWZQJ5OyAv8GHslSHNXbOzKhM7ceytt8q 9ii4J3cyQHK56gIOIUMLoIPthFWWs4FYlXpgldsULdQsFsfqIZ/l7fDqIbCGwSG0PA5O LL0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756471; x=1713361271; 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=AHhEXd9MX26CU8qXl+RvElL3KEcHavfwrHV7x9fl89fjSiTjA1mM+HGSjfr4gTAtfK q3DwtC1BPtUhK4sF8+lxsFh55FuSZ/U0dAgq76di/fDtmD5yPX0PWq5CmHtY/4ejvyky IQDl1t6Fw8qqOCH7wbst/yvhUeKWpXDXlL8NVMdh2ggVEiY1E7MedyA2fOEWJuUKmIv5 j51M4wsRprfx5wYlj7B1eQwVVjFqZiwzKhRcA29wQuf248QeVtZmPGLdwcF0pwLhUjGU /6McltI4RPrbN6kcr00oz9zQivcLDuWbIepY+qkqyNMBRRflMZ2p6ZD6aCnxd1MRqP3b RK4w== X-Forwarded-Encrypted: i=1; AJvYcCXsZdkh+8+qfV3bNwmqqnMiaKanDk3EDR4D4vHVidByQ84mhQ98kyzx9bntyGjSfs2CJHzsvcuLYRxWczQSXLIYETXvh9j/gnMy7CUJl3r9gl0= X-Gm-Message-State: AOJu0YzykKkcbHGCQFoK2CDoRl/UabOOqxQ1KgDj0NuIzdOr/c5OClPy 47J0kK1twVfnGan6pDl/GDIYnI+XWPF3GD4xB0gv5TJNrMCBflSWAWGh9HxE/hI= X-Google-Smtp-Source: AGHT+IHlHkLJQocIgFdLWEZ+jc54M5NfdTfRLOOWAqu20ekgP4Q3FqD6sJ5hx9covF42haCEFR+msA== X-Received: by 2002:a05:600c:3c9d:b0:414:90c3:f5be with SMTP id bg29-20020a05600c3c9d00b0041490c3f5bemr1940073wmb.36.1712756471429; Wed, 10 Apr 2024 06:41:11 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:11 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 04/10] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Wed, 10 Apr 2024 16:40:38 +0300 Message-Id: <20240410134044.2138310-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624560 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 2A2E216F26B for ; Wed, 10 Apr 2024 13:41:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756476; cv=none; b=AEBffN5MsvzCU4rUv3LAFogRl1bKtECFmCW8nPniYRLp1V9iMkbiEL+bakQj0WGp9QdlO9c2vVPbYLEVL09aEuvwe3Gsfip/rkvFEKaIoCmJxkejDKhckGTquT9jBSaQBgNiguElqyKmS5NLWZE/dMeBlwXZcRGMW2L5B0dlFlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756476; c=relaxed/simple; bh=7mOWThEj82No40O+j4Gsb3EPCVrROElgn/WJZB/tenc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lukqxGoVozIoi+smSNKenoDjc2poL4Yp9AcDnFhiIjks4dfh/q8DgtkYnZC75RSMsbl1CDeylbWbXbimvfdEsQH3vhDhbXAGGoy/H1qyeLO04dPhpfgtsr0ebSPCpUgqdvfC4hn+W4WVFhSYnImKFmJw/fzGE+JLk5TXuw73lGk= 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=nlDRevBp; arc=none smtp.client-ip=209.85.208.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="nlDRevBp" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d718ee7344so76904411fa.2 for ; Wed, 10 Apr 2024 06:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756473; x=1713361273; 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=nlDRevBpG+M5hSfzdDl4xJXtJhw+R1UURSSLubtOoMRuQ5dKguPE9CtyUG/64dZbjO dtO+DpPxmntw0pJ6MfZ2obr1tFP4mCaY+GSxwiVhhyjajDbhIfJJqp5m/QBQnJhqT/Nk +bk7pSkJojyLYes+n59M8NkfxLAB6IoOCSgRZ42iaJuh6CMM0LBHgOzL6Ysq8YKMcwpY 0dQtHSU52RW9cacN5uxnAy/WclQZNCk+TTOByQPIHIVEW7fEI2Un0G8jvI8ptN3Wn0N1 1YGg7iinYUkvpI7pC9/suAiOLgqwnpqOrjXla/c35ki0zxZ07CGS5OT9H6tKTj1mrwn8 T5DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756473; x=1713361273; 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=k+UEXY0DYUfdTRH1qkBFYmbcuZeistpgMq8EUooXmhIWz2dLO8YSmg9dDS1zrcjy6B svZR57NiusnRxTX9vOEUKIz68cu3jWAJp3mS1IpNsOEWoTccTloGwXGxbcvtA/Llg28M BthFXARYt+a4PSSu6pBIXjRsvaAJppT312kuYqXJy/+9ZyUie36LdbT+SFFtccwUWnz1 /Cya9tquqF/+AaFbGqwnTlJcKXAZyHVy1VzGtr8HngWu/nHKt10skz25+GAmBJadqTdp 3WqpwskB/GEuh6JfAA/se4YePhQH1spkh7wmM4d+2aJZNbCvaO9YNX9HzoU1LlUrhwSF mpcQ== X-Forwarded-Encrypted: i=1; AJvYcCXSTS7GQY6y0pq7dLyz6BKH1KytXlDJjqjUO+ssQxN7w0uvbSfZCP9GrDbZLFFkW1UD/U3KSEMula07ucRxuEmtOx75i4OZPAFKQOqgxUSr9rU= X-Gm-Message-State: AOJu0YwgS/DptGat+2eDbKz0kzkvGU84slv2EqgnUW+Y9vnxsNSWa8BU quzQKx/evIsFRaxouTPZT8IPn9mxUrZLba6Lswhx8gOK1BO8DBpsazV9FrfHUyo= X-Google-Smtp-Source: AGHT+IHBch3z46eIpwIMrlag3ucoQRtxLPxfE5oWrDfrZwGW8hkURhoSdNwL3iOwO/2g13RlmD+IZA== X-Received: by 2002:a2e:7c0c:0:b0:2d8:52b2:2002 with SMTP id x12-20020a2e7c0c000000b002d852b22002mr2025805ljc.47.1712756473412; Wed, 10 Apr 2024 06:41:13 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:12 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 05/10] watchdog: rzg2l_wdt: Remove reset de-assert from probe Date: Wed, 10 Apr 2024 16:40:39 +0300 Message-Id: <20240410134044.2138310-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624561 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.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 D9BD317164D for ; Wed, 10 Apr 2024 13:41:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756479; cv=none; b=siHa1awucyCn5Dv0+mgrt4V7rr+4is4xnAmLZ0KV1XQNR0z0UEcOkN21hGMnWrvhW2ELoEIkM1z3AKre+jIv01atR8j69+zX098trh6hwSyw94faT6NBeW7KCJQbMY1rvNxO62Ieg36FqtUtbY7HEoYzzh3bdvnoZQG6oWvFniQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756479; c=relaxed/simple; bh=zMATGWmbhje5tfDxfaCFVw5MU9tqi71sQIaQ5Z5dkgc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k/pBO8A5u0msPbtbFDfCAStGNThRgVPa97xInxlO9KWPwS4kEOOfu4qpm0irKYdr/d10OTZwVDyxIQiUd5qJTjtwUjtIsNfFp+z8vo+0EsD/6xHh/FfZLvR0Y6y52RXmyDby1Oq0j8pmqEarWlOKIzAF6tlP6ItWPdwi2VOgvhg= 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=iUIcDvN6; arc=none smtp.client-ip=209.85.128.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="iUIcDvN6" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-41634598125so31041185e9.3 for ; Wed, 10 Apr 2024 06:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756476; x=1713361276; 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=iUIcDvN64YVXTb5HYaGceOmKwVCq+ODcQ1JP1imInw3mQ3CbdlMhcJfXhtRd3AxyT7 gtldnpxBU3a36FfLEQ8vJ3JNgcdPWMeW8RIzLjzkeQ/s1/0F9R5iNaECXxRuevwzQMkW 2EgV0NVrmSiwrPkJG0Yro/z/cENoq8vKXgkw4pwM1eAMyXnRArRCN2Hicbv4x/u4MW4T a4ItlcZjJ+7VRMAR4T/fOH1Y99IsCA6YzLQmB6SQKlelm++SASD7OLA+YQW/hRffH+dD i1T9utHS4kRkr894ZGj2Udv9504/yEuMoHv5XgU0/P4My0FwT+HUoYPP0kPaa9dKywtS nSWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756476; x=1713361276; 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=UFIjLHLOYbQuP7XaKrKMl7Ab3aDvz3CfJ/zXS8DY5lHeN/aqlyKVSTDvV/s8RCERiK VGoztTvn88ai9KoQJmIB1Ay0QYs1GFKTW8Lvm+fWBx1FmGy1plY+OQlw2OtENUNDVQvR KcMTx8wygUoNHP0i74/k8mi97OQIzGnogrxirsy3zny2EvlGB2Miba78TPwG2GzdgkFf I1Tj7uYWTXbbRozDCTm6Wt/w0VOh27K29maBv15TZ0yGje+akHy6arN/WgKpsdECj1Nu oJwBetUB/heohtAxT6yDThzlvGje2aO0uwxmon1/h9TX2KzFIhIp7YsttRxUkbuHNLhR zZKA== X-Forwarded-Encrypted: i=1; AJvYcCVHDonenvzbuINTxz7mfhl3LK0WCoIUiCI59njR4z+MHxQ9orjtYKMPGAjfhb9IHm8MRuAbFx20f5Pd0VbT17/Nu4vyO+Pap4ZG1kWVwK4PWks= X-Gm-Message-State: AOJu0YxedXoPmNRHVoD9eat0fgICO8K1VqPH/bm3Dl2yoSmtrA7xuzKg 45lJrfhSXTYFsgzzxPgAfFVFH3d8CZnCIt6Abl1vDq9r85JOedXQrpYhzBV5OKI= X-Google-Smtp-Source: AGHT+IEwTzEScnNS/2gYDyhXczlf+j/6gr0ajyK8+LV1iGQ3yQNzLeDf3kEUCA4KCUIoIeLf+9AnRA== X-Received: by 2002:a05:600c:1c2a:b0:416:9c03:62e0 with SMTP id j42-20020a05600c1c2a00b004169c0362e0mr1770271wms.33.1712756476470; Wed, 10 Apr 2024 06:41:16 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:16 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 06/10] watchdog: rzg2l_wdt: Remove comparison with zero Date: Wed, 10 Apr 2024 16:40:40 +0300 Message-Id: <20240410134044.2138310-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624562 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 3122B172792 for ; Wed, 10 Apr 2024 13:41:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756482; cv=none; b=PamcUqPTTpLVzTb7CJQxhOuJjQRx9Tdmde8btqa1CyxW/NY/MkP/qQLK5StRsagOGcBJpOoOqf2bJMH7+AcB786u+O0uEpTW/cFeqpk74zMNHU0M4au+IzHW2jW/7D4Z8/DkT8xJum1YN5E2ONgVVgoXWsOOZFbLhNCugsnJF9Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756482; c=relaxed/simple; bh=Rdlb2ia/Zc28BSEYVcVdZUAeB+95/SXqjOJ1NOQ27MU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WUBqd2PDFqj6FJ60nuYcj5nb4PkI2NDjoziO01yE+pIuTjCjdoj1n74W82SVDak+VOYaEQ7qf/+2FagBkIE3kaz3itFxUScTpqFC+Yto6taNQCrVoTXi4EVAhuEwxkJtRckKrHYzw/mQqpfhj3Yj8l6gzhMu0l3MLZLC77Iv69g= 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=Lbh2s80z; arc=none smtp.client-ip=209.85.167.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Lbh2s80z" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-516d487659bso7085509e87.2 for ; Wed, 10 Apr 2024 06:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756478; x=1713361278; 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=Lbh2s80z5MaG3g3vr3Ps8+ktHtEZJSFW1q1obqZzhRfPKdyjbkicQ5PqCaMSHNCM80 c5XHjl4HilSuIJwi0T70XIpzUgZ996EpVmPM+kvx7ywcmP4AlQltnoqL57/Yhl1NvznJ omklfHUTegS1iJm8fTpt03YcXmBRo/55pWjJt8VJ+Zzol7wQ88zUN3j9FcgvRfkZAhk9 VolioGIplMTPEjHBx73y21XukbxBtWnKtG6+VXpCypFpCGmWFElLJg6I5Un6EOnHYgXY vSXoomKkxjt+iFOahHWsOB88MvzhdAAkI8ET3iMF9NP4rAryVXm6hbRGoJXBIDApOCtb NdDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756478; x=1713361278; 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=vSe0HDY8b+lzH1QCAo+TgzfYDWgszha35/aQ6lU1E+PH87sCghdfF+PEfG5WEg5SU4 HpVLxlatVRmO4ROEpD6Ttvbxotf+PgvnQHdtJw9Lg8DszkojTNh6LjJGw8dSzkdECGCR UYSiCjOCUlUoHeHwZYRZD9bsTztvSq+E4h6/7k6yNyKVdg1Kl0OFuYvmQucGsH4xT5xB WcO28/W+pU4bR0+3yIQl0Fkx1+ZzC9W2ul/SpfsqPkp3IjuWOId/x05qzyAsRZGwUYKF PY/9SwoqD7/5BpdHYloDLz/xR1gYhgG6bifQooqvB5hdL5MoFpF2icORT4AH8rL5/XLp Klxw== X-Forwarded-Encrypted: i=1; AJvYcCW/YeArWYElB6dwTH0UujmMEVrVpuNZ01XMIUfv/FU9URMuismnK8K63rtxnUapa+tqvwloKjqiIiRmznt0okAyPS4l9z94nyffXM3IorezYJY= X-Gm-Message-State: AOJu0YzeNXdEbm28K3SaLwLVIhk77Ki1/c7z2zkYOAH7mDZdH35T3acO STUM792zjNg9OrDxL/Qm2BvXWId7H0WABRqb1OlAzz/pIWWqbn556JCmU5vRqgE= X-Google-Smtp-Source: AGHT+IHkGb8mjtV9pN57/rdk2rifpIFkEXJ1hY+ryzX1kld++TgTjPbpmaqJFhV1Ikuo/OSQXqId/A== X-Received: by 2002:a05:6512:230d:b0:516:d27c:f6c6 with SMTP id o13-20020a056512230d00b00516d27cf6c6mr2167365lfu.35.1712756478328; Wed, 10 Apr 2024 06:41:18 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:17 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 07/10] watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset Date: Wed, 10 Apr 2024 16:40:41 +0300 Message-Id: <20240410134044.2138310-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624563 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 9BC7C17332D for ; Wed, 10 Apr 2024 13:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756483; cv=none; b=NIUrLP33Yx3eryQ4/Qw8SUJgSTgAJrevs32vPKOttwKHi5IqM3YbtWn+8WpHUuYuCgfWrp639L2BZkuLuIW4fjpWtL50Sb69kW6AtJXOBfJhmgw08gc5MLcQR2uqqcwGkpdpi+pNE8V8aXyz7M/WjqTUBFF49sae0jaelVxBcOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756483; c=relaxed/simple; bh=xpEy60wLCww6Rzj9qsFI342NwmQkdCt2ZTEg/Fiucao=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oXf/anz/LRdlJPl8E5nFBiIab1KY5Ts/NXpy4rW0fqzrW6xfG6oW/Rp8Cs/pOBcF6qiuOp0cFOKyi3tor2OXQBnYW2d86/Oy1crnDRMsl3GG4gCjFNobR2nlYIY3oV5Mazs1URSrQxFHKd1AAl0Ti3FF4Zw37U7yL7GLly4Toic= 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=JIll+PFo; arc=none smtp.client-ip=209.85.128.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="JIll+PFo" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-416c4767b07so6186395e9.0 for ; Wed, 10 Apr 2024 06:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756480; x=1713361280; 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=JIll+PFotOkQjwaGFtvMv6Czl14XjVA1lwLSlRnY8OhOBoso+cZoLut4N+d7Eep1my mlZu5aHg/2UGh2YdcRN+ST5S8e0L6CSu+mchtq4Vxzy3huraJX7/Vl3GUmLQKs5cMu18 xPlmFNcQM1f7vfw5fEixArMySyLF1EUKz1Hu+mHzwH6ys2oYPcZa/yWgTKC8JMxglrdx iXoCzBAUACAtMCzlP1Y91fFRA1vOn157rqYfYGQCBeHab6PP8pT+eQq6lTvSKcI9XoJT 6i7323tKi68kd6aV+Vv+TdaooSYZixRVieoHQvmNcAQU83O0ARr9VmrK11DZ8SCrFeay W+fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756480; x=1713361280; 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=YnMjgTCaG4SxFRAmxpD9wIprfdxGEywiJAN7O7U4W8NfC9QRgl+jg4TyI021UaXgcY YVAH7gwhvpCnEfWtzzN2du0vPbJfZbJmNVK/0BA4kZpQB/DEZmnihj2huzQankkccRFq 0B2cKvH9kxcQja3ZeKbOlvibHH0/Yyqx4tZ2j+DqPdbXAH8kWmb/NRiMfzlMyUYexL6M a9bR7eONJAHDCiCF46dbPgURjoog0oBObV7LArTqD4EAdjHg+OrxtvrgmPK1eEeHKd8s JGvHs7bOrdcw01bJRyBgQrV3QZFDs64wSHbH8XPlYkv/TqNZxXhueinXeW+ZeaL3rfwR 1O1w== X-Forwarded-Encrypted: i=1; AJvYcCVu03er+YsoFx/SUxtNY/ANau8IoZbHOLybXSUvJqrBAg3oldBvbSfw8g170DoSNX/36oA+zYtSqCM+KJlrl6HXcHXhVvZlk2oVmvvOEcNdkMQ= X-Gm-Message-State: AOJu0Yyl+cthjIEJ6jDxvxmc6jnMJv7HfeQsagcWp30cZy1JdMvsDgtg x43LpuYk68ps3xvWo1Y5HVYzmUbm2tNHiEkUUGCHfj9hItHC6imBFdsddg9Q434= X-Google-Smtp-Source: AGHT+IEFj8V+GjPPGimKfeXFxBrabqAeiLAm4xEJjfKHrlCzLWu0SvFIk2Dhlg1MICOPvwFyYzbskQ== X-Received: by 2002:a05:600c:1c95:b0:416:9b8f:1e5d with SMTP id k21-20020a05600c1c9500b004169b8f1e5dmr2226160wms.35.1712756480162; Wed, 10 Apr 2024 06:41:20 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:19 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 08/10] watchdog: rzg2l_wdt: Add suspend/resume support Date: Wed, 10 Apr 2024 16:40:42 +0300 Message-Id: <20240410134044.2138310-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 Apr 10 13:40:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624564 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 CD814180A8F for ; Wed, 10 Apr 2024 13:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756486; cv=none; b=JTIISesNp7pLecsnB57mpfgOHAmvuWH0vN6YBRb2f4wFpLIbW1+zVYideSRH8UaHoWgc5fdswxcSeqyY5Wci3s56scR/ot4pIlucW0IUijqsfCwsha+6E3lUDuMA7Ae4FVGkqHkUyvls4ixReDhf2i2DC6nD4bMpvpznUZmo25c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756486; c=relaxed/simple; bh=CJ5Yg4Su25upi9PiRBilKHZBgxfV1yi9eo8lCkVdx7g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uWMSXmgTtbehDpyHVrRFdq/rPHJtl3T5L9UvUl3bOF0EcYYwWMmYaOVUqrg2G41pn2MGfiT3dT4KWmFAxE8KqsM/pMQs9+LXJj3tM29WamDsF3Nhy9ON2rUekHWf1YlBPRZ92lBhBeCt3Uj8qDikkuF2ID1WEdf+CMQTgKFPQZs= 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=Lf0sUxq4; arc=none smtp.client-ip=209.85.128.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Lf0sUxq4" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41745acb8f4so3825285e9.0 for ; Wed, 10 Apr 2024 06:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756482; x=1713361282; 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=Lf0sUxq4UOs3C7KQX9/jUbg4WWL0HxKQYtHJ0eVFePeuWxpcTGK3pjOSU9ihvt0xds IDvkGrSrzp4kcU0hbrEOlf2b3FkX+F4MBaEFz/Jo1EQU5pxHJpoA5TKi54fq79ooxF5t F6EUNFUCUZY5V0j+Q6546Fv9smaI9MAbA8tMFNZUsHUrvq2Y4dmdOH1P8nRiHDXBtzXp iEOb6a4+Vz3kZ3mzEYge9GcWqJljpC1ZJBZnzWXvnYnlAKcDDHUs38vrx+39zcSPRbaF mPg2p3RfZm9XtIxYT4lbx2XOiohQ8ViDok2YHvedZWWo6M7aC25cTz3AjGKQoiTfZegC a1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756482; x=1713361282; 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=kFIBFZDDBEWCd50LHZoFhn4aGc/ulPpwZD3axn96EPzxMNijySKJFZY3V0Vb7/jN/n QMkfWbaWlEQUociYyeUT39ehkyR2HM7b04cfYp+6W7BHGDJx67sWKzcjJDi7f8xamwee wLgc0IBXq3JDPPxBWoLSYPKXiiKn6h7Htb3b/dLwj1niTfbpzx1WWHJw1T4VN0LHGTPp tLYDiDw0dlwhI0MHiSKdwk4AbYCyxPbOQ84xh3uqvkZbRyjdaSG1mbc8O0WYsomylPe9 etwDdFJA6nnbpyDUZgoi3E52bb6c6xfPEFZxZo2O8uLdc/j2zmrWUZZsPjpo/3/A840z czug== X-Forwarded-Encrypted: i=1; AJvYcCUUqqp7AY2Tyh7n9pJsqCI2iAJq2zP/m1b//geIyuVmnMcKHFztIYh78+Gu7sVfWlsDYr8vNHXEIppiyPyHHd0i07VX+TnokjEwuLeBhMILPAI= X-Gm-Message-State: AOJu0YxiW7G8rCbcLT2cMlISV419JBXZx+U4+mwP8Fi4/Sbk7caXlYkD x2LbnjGLG91y+cdabAuQ3SmF+vI+beDs/un5yronhpFUFVIeUdIVevswGg4BLZk= X-Google-Smtp-Source: AGHT+IE/n16DpYEO2qqbI73ni/tWCneu2SaQzav7O3neyS/HYU4MN+sPx87irigmMT5RkxaFWg9p4Q== X-Received: by 2002:a05:600c:1914:b0:415:6d51:8e2d with SMTP id j20-20020a05600c191400b004156d518e2dmr2247721wmq.13.1712756482533; Wed, 10 Apr 2024 06:41:22 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:22 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 09/10] watchdog: rzg2l_wdt: Power on the PM domain in rzg2l_wdt_restart() Date: Wed, 10 Apr 2024 16:40:43 +0300 Message-Id: <20240410134044.2138310-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven --- 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 Apr 10 13:40: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: 13624565 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 A895318132E for ; Wed, 10 Apr 2024 13:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756488; cv=none; b=VOmUEYX4zi2QwP3OMx9kzq1C34IlObqE5qUodNcaZOVoRx3BZQvTAVzxt4r/Dq2qmClhtY/InIwFJoLaaMU10cmx+VzIPh6bp/IOWAJPZZ07yQIHdKKBK98XD0bJ1AuQIYLa7IjIAJO1vSlT3g4slIO7DgDxau5EWbjAw7xOc5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756488; c=relaxed/simple; bh=GXy2NCi8uXzU6Hc5qvGIBLwCCNQ9bIeLqQeevRksNVo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZUb6SVCQTTTGxwnk1AYbABHASVLnWt3lHzU+fhAMBMe1qq0CSciXoEvY5Pz0Ww1RswOTwmlyjnmxPqUMAn3QcL8bOJ+KUfY4W/bw98w/Qc6P04ZFMBGQSQcIz0hUsUkfE6dTLRzJo1HUCYDU22YFxtW+nLE5qruGqxt2iyzpwKM= 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=cN9CkAvP; arc=none smtp.client-ip=209.85.208.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="cN9CkAvP" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d8b4778f5fso12725771fa.3 for ; Wed, 10 Apr 2024 06:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712756485; x=1713361285; 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=qI23KqzcJt38Hlh/8lKvteGzbiZhgHD+Qy4akVKdJqc=; b=cN9CkAvPGfmMvZq2/2zFbXC8/W29pbAQQnDraDkOj7Y7KKgZgTKr0MDcaFVkNzwV45 UuffDlTPvw4Kfmd/ua7N7I7k4ZY1iYaCw6hgoKueKUI9txx5EvtruQpq2NE5UrJcgbmw mKvxjOQ/JyHeqAWTUP8EqDMD0SXjj5QAezwejWEzuBwxZKJN50iEq/QuW0FHrBABf3Vv Hs3yXrAkYnjO0kU0YXza2uyAjvk9i0htoLTI+oE3OI1NRhevF0X0CP/ssELZNKrN+Xfj M6bi9WjOdBh2rhbGg7YsZ4onA4UtqaAFpajGMe2ayUbxeOfRiGOnVOsmwYY07cWcw9O4 heIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712756485; x=1713361285; 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=qI23KqzcJt38Hlh/8lKvteGzbiZhgHD+Qy4akVKdJqc=; b=FqCcQYyY5/f5mpC74n18CbY5qJWb+lj3qqutUAC5Q/OmhvOkuRytiZTAZE/PpnpEBb 1ZH62awB2e4G/9ozT1kWmVtwehawtdjcr+0t+YTIco51grYFLlQwUB+X+kkhSjdVbGaa vtJiT47L2mYYHGcfy9IGrKL8E7A/3+fQxZBT3bqO0D0cer+KT9tOZf/TXxWfbYWLm9mx nXidaquaUZXDgiU+Rv0NWQ1Paoq5cPausQMhtx54XDPQLJtJAN6gahIf6/yH+d9rbTv1 u2+PWlVdFLFqqlTKqDDxCiZ+YhoPDH2AXMoVeL+LBuWjEK2w9hVJa+5mJpY7JEzMFmd3 46kw== X-Forwarded-Encrypted: i=1; AJvYcCURWrAyiVKCo2IS8OX+4IXb+WOBikrchAkr7woHNeqSRlt7sPtMZICOm424/2AnywBsZ3FzCwZzOaKy+u6oS+aEmDBbg9dfU1RyD0ljLVrQZG4= X-Gm-Message-State: AOJu0Yyr2MMM+WiwhROU6itbuwwBi91kJQ8jlMMS3P/9Uq/K3LZ6K5fg l2l7PlB2P4YlMRJa12+oJZEkCYxiAyWkLu+cw6QaH9eSxehq6Wu/Sb0VgXVZ9jE= X-Google-Smtp-Source: AGHT+IFhrlweALOximZcC0BHFuTkzJPdrxOAXLFJAQUUC628k9E6cX0jEMuaEZy3td7RELRpQOev1A== X-Received: by 2002:a2e:8682:0:b0:2d7:f07:89f8 with SMTP id l2-20020a2e8682000000b002d70f0789f8mr2135166lji.45.1712756484813; Wed, 10 Apr 2024 06:41:24 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c500f00b00417c0fa4b82sm872528wmr.25.2024.04.10.06.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 06:41:24 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.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 RESEND v8 10/10] dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Date: Wed, 10 Apr 2024 16:40:44 +0300 Message-Id: <20240410134044.2138310-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410134044.2138310-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Guenter Roeck --- 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 ffb17add491a..eba454d1680f 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: