From patchwork Wed Jan 31 10:20:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 195204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp10651dyb; Thu, 1 Feb 2024 00:46:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQgQ0QBp3rpSKA4iP3fMZBWfpf+MkeUpioH8vlyPARbyDKNoOLgfQXzQ/hE0yyBYrDTPEw X-Received: by 2002:a17:906:a855:b0:a35:6299:a349 with SMTP id dx21-20020a170906a85500b00a356299a349mr3029581ejb.32.1706777178274; Thu, 01 Feb 2024 00:46:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706777178; cv=pass; d=google.com; s=arc-20160816; b=f2nCvXLgRculMRtbcBjgiStql46IPETSo2dsP5MGPaODU+L1nl3Ah7JAwt9+Gkn97r TeGYf6ImEa2wqBAATfYqRMgS4ecxB3tHuYYUCee1NWOvA9CAh72lk0Gc340M1PjSlgul qRyP2S3PHFc+EnXLf7aq/5Q8JuISEMwe+VdwAgJgxmuTMsMHadMTUG5mXlPBn68rKfWW DJ0Id5S1ZusQjZldLhSbgMk6fOCWix8/4P4UbUhi7i25aZFc/j2l1sZfZYY/37nLQRyr cSet5L0W+8FZlUdioLywqFISlUNg929UR5Dc3LNBVwcAeTCi+mkGyOTud1ZxjJ52EDHd SwEw== 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=sccW02Yo8K+lpKyBO44V8P8/wJBKTY6GrI2k9Gcc9OY=; fh=L36vwHN0cszEIBKjqS+X0uJ/cJhT1Gj2dCkvG0D6cuY=; b=WzBJHtkHVV4RYq5yuM3K8bZncE+Eb4Kr7Rtg8hW4n7//Qt3vx2RHCJ6rOo3RCU8g6e bQLfIhqwe69DztPWkJLCjFvB6o1IkY4xZoRBJZSDKIBuKQfDqG7KhtkPtlMvWCdAEaXs DKv7cMgryB/XVq5syY8TpxL/GN+oJVccW5rDFrI699ZbG0l6uscRRq0AhhsTjVs0pzec MK8CGYoqt5E3M6kEBLr1pWLJGwMvC/YaIj0WxpWCQ1LMrNveuXnqK6lHwfODV2OQTIqW v7wKWA4SAMJTIadKOvOHyKAGIb38iDlUSOOeOuzpzLWEIG5y+O+s2A0yDdNHKsOkp8gh WboA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=KDm5AY0u; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46203-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUmY1tKxb4y9fbcWSH2GFBoHNy4NthGFIJjy7sl8n2Y7vZ7vMlV1A2s/vDqTXwv8ick2Gc9JMYiphTXCoKYBTw+iZEbuQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p10-20020a170906a00a00b00a354b441113si5105363ejy.19.2024.02.01.00.46.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 00:46:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=KDm5AY0u; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46203-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46203-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DADE11F2C672 for ; Wed, 31 Jan 2024 10:21:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 244DB6DCF4; Wed, 31 Jan 2024 10:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="KDm5AY0u" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.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 9B37B69D34 for ; Wed, 31 Jan 2024 10:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696432; cv=none; b=jFOsHXTn3XYAyYkivnsLaTn/XdBuTVZYiB9SnOA3xYaxooQpvYofk0EVKKuAaMiciyBZaZDNDtQW76Py/m7gDmO7fQ8x50EYB+ZlW2c3ksJ9fi/JpLGF1KeJWQLaICb8abRRlHtOuUVEWUFVooULydUGcoU7O0RkUcYW+ALY7rA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696432; c=relaxed/simple; bh=NzPPNEy00n6/NLoSK6YZsJgd1KrQZGAMBgH5ckRJBJQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=D6LA+d1w+tlMHdqy1bd95FrLrzlQoP1IsZkya9vpQwN5aqERU/ERCf3gjce3X4g+151wJJ8EV45S/jv8UNXDLrCjsRKblmuwNw1/nyATQ8mgY0PrSoWCEYHY4/bHQbmGEfCJoiFjpSTRSLj5U9lN3wa9L32NnzTpkFCrc6yO27E= 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=KDm5AY0u; arc=none smtp.client-ip=209.85.218.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 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a3566c0309fso447954266b.1 for ; Wed, 31 Jan 2024 02:20:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696428; x=1707301228; 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=sccW02Yo8K+lpKyBO44V8P8/wJBKTY6GrI2k9Gcc9OY=; b=KDm5AY0ue+aSH3O3y5tNaFluMNkzAEPIT1Ndks8KaHnXqd8uO6jFmbrbKil3CJ1J5Y QTEJ38fuYBE7lzjsCA+Q2M6Vwa5cKg5ro0jT3xyg5LtPG34fcIdgRl78EXSxmxd1CoFq y9//rQvLSIXnvw3FPYr3T3fObQJQ6irsJToL70kQ3L2GtpVGnwGIPEsDLtKJ5ac0VXyy /c+e/Xm8r//mF7S+cASIKhY4Jz+tNzBWeH8Mzt9DO7GtIgXd6+hTA9n/4QpcSvvxgXqT L8T0h3HpqxAIVYJHqKMmS5JnMC/UwdnZs0cmvk+ZNn5dBCWKBRmYZ2F/9qN51w2MU2YY 5yOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696428; x=1707301228; 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=sccW02Yo8K+lpKyBO44V8P8/wJBKTY6GrI2k9Gcc9OY=; b=K2So2VN4DZpzYjRG1qml2u4BdGypa7kN1SFKBss76mY2prLE6BVzTHvNPZICtBH2O9 Q/ghJNF3miDffBo1pKY/rOSkIoj5zq0jFeH9u+4OWGe/VFpIUwlDz2/iz/2llyYNLppW MrTb25sGuVjyFpObYFKuhxL50koDWcdtnEnF26aNNinp/IBhxWfNJOfZ1mjJXA4E4wT7 NDnXYZ9uLBLlAUsMGztW5l4v8+wan83FUaetEFoeMo0I4SbArMhZOEJd2xMl/QqAkLlJ Qgnql9cTBfqyD1haQguZKfQuzSaVVAcoYKpGwxdPK0EByO+Ole5O6j09b804b7ymYt6V W2bA== X-Gm-Message-State: AOJu0YyVamZVODPDAv/5Ad8+/0FIMdDKAG0OYcMyYSNMSnGh8mvMInQz 3iIJu/3MNREZzCOIwyXGqYszPBojIl3AU+62gewRROx4EgZG33dK2aU44IgcJ5c= X-Received: by 2002:a17:906:c29a:b0:a35:fbc4:4c20 with SMTP id r26-20020a170906c29a00b00a35fbc44c20mr673787ejz.6.1706696428463; Wed, 31 Jan 2024 02:20:28 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWj/VdHtk+M0M86HFo/oBx9tdBLc3Ymnrmn1HzwS+AL+quDYDP80yBe1Z+uHY93wTD8TU1WdW8Xwf3yK1ddYcSjYbpXpXavKZUTmSbVfRUJXHB12XHKtK8XFViqz8dEoI1I8p0hNUTC8PMb+FYaaxhnXE/KiTthw0Yqm/rYk1ctPAkXO/DLcRZPuvwyNjzMYsNVokOVqztofbycJpnB8vKifwXjq2E1GSH9KCjaBM7N5/H2D6/XCNt+I/TQMeke7mNM7pZTTlZ8iMfQGbXiTYxI3WTNOAweVddqM2gD3FuEmDePi4/mMfLMdgfcjKmZ67/ah975Z+m/Br0G+Qg1jjt8ZAL1Uk1BsheFIpMi3VdfYHPjnjoEtwPIt3FHhudcKVOEJMIxZ8NA/PGvD/l+uZQMShzJQW7dKRKpG9utw0PRQm1FUhayffj1RSPPiWTR8DQoEG0Wzjyo9Qklx0Goacvjnb9YSPaJirWzp1m6eoYLuDXhvdAElUL5rRcqdNddSu04A5CmyznfAFKSA4z03w3FfxiK1v4kiTnJDZzXLUtY9vbtbI9eO8LBp+hrKeNhsHvX5OVMpvSWA183i6+4YjIEsdqyoxE/m/uGbN1pHl7o+II= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:28 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 01/11] clk: renesas: r9a08g045: Add clock and reset support for watchdog Date: Wed, 31 Jan 2024 12:20:07 +0200 Message-Id: <20240131102017.1841495-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789685586658938418 X-GMAIL-MSGID: 1789685586658938418 From: Claudiu Beznea RZ/G3S has a watchdog module accessible by the Cortex-A core. Add clock and reset support for it. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags drivers/clk/renesas/r9a08g045-cpg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c index 2582ba95256e..c3e6da2de197 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -193,6 +193,8 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[] = { DEF_MOD("ia55_pclk", R9A08G045_IA55_PCLK, R9A08G045_CLK_P2, 0x518, 0), DEF_MOD("ia55_clk", R9A08G045_IA55_CLK, R9A08G045_CLK_P1, 0x518, 1), DEF_MOD("dmac_aclk", R9A08G045_DMAC_ACLK, R9A08G045_CLK_P3, 0x52c, 0), + DEF_MOD("wdt0_pclk", R9A08G045_WDT0_PCLK, R9A08G045_CLK_P0, 0x548, 0), + DEF_MOD("wdt0_clk", R9A08G045_WDT0_CLK, R9A08G045_OSCCLK, 0x548, 1), DEF_MOD("sdhi0_imclk", R9A08G045_SDHI0_IMCLK, CLK_SD0_DIV4, 0x554, 0), DEF_MOD("sdhi0_imclk2", R9A08G045_SDHI0_IMCLK2, CLK_SD0_DIV4, 0x554, 1), DEF_MOD("sdhi0_clk_hs", R9A08G045_SDHI0_CLK_HS, R9A08G045_CLK_SD0, 0x554, 2), @@ -219,6 +221,7 @@ static const struct rzg2l_reset r9a08g045_resets[] = { DEF_RST(R9A08G045_GIC600_GICRESET_N, 0x814, 0), DEF_RST(R9A08G045_GIC600_DBG_GICRESET_N, 0x814, 1), DEF_RST(R9A08G045_IA55_RESETN, 0x818, 0), + DEF_RST(R9A08G045_WDT0_PRESETN, 0x848, 0), DEF_RST(R9A08G045_SDHI0_IXRST, 0x854, 0), DEF_RST(R9A08G045_SDHI1_IXRST, 0x854, 1), DEF_RST(R9A08G045_SDHI2_IXRST, 0x854, 2), From patchwork Wed Jan 31 10:20:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 195354 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp215013dyb; Thu, 1 Feb 2024 07:05:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEi/0RrtVGccdgOEdoROnUvBcjVujgPaIbJlJ5iQHzs5lplwttI3KET96PX/QvQIQiwAbFe X-Received: by 2002:ad4:5dc2:0:b0:681:7ba3:3649 with SMTP id m2-20020ad45dc2000000b006817ba33649mr4471531qvh.63.1706799956576; Thu, 01 Feb 2024 07:05:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706799956; cv=pass; d=google.com; s=arc-20160816; b=ya64XguORmYA3UsO8YGzcYVRj9ij7uQQcHx8R21nTpa8l5/2d+xZW/ld8DtoYgVUq9 YhWvpQe718bsuwHPVKZxQBHHg44ZguqtSKrvZTKdhbtUy5BoWEKunFu+L6BM6hPaeD22 qJ25PtiWUYRp01TqZ0niXEosn8kk+f2nEbsfJb+X8oQGXgtDy3ajQSyVixxbmdTRT6tE uBd4qcI8JCGofwoUfYEgdSp5Fdxz4p7pBjwLnbt4KKhjy8jvQdvG6H1JWSH3r0NNrAI4 vbn4G6G/pl8ICaPzPs6hCl9UNM2UUejlAWt3AJvw2RJLMaMkOXbypdJ9/uzjFAD3i7KS 9TCw== 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=cWlqSYVWXt5E/so3s3DVsM24TfFqYzGuXtgHed/wp8s=; fh=apxFs7HDNOH5oXIcGptdnB/lfhhuaemxbPQdzK8+x7A=; b=FbI3Ys97cRKqFjQGhCQPZZSqAlq79ZziNjvO49SLlScEfZjytjbTigbTfJze5yqtRJ ikydmWTJ9hzpsElVCVDb+ux4bCufvt8ljkpHd4xxr6Eik3tv0jCoHw4OBCBm7uCQEAKP xPaDUQYf8RpEtl1DrkNMynwtAH5RbEVx2vpyHDSfX3uO9QQvB+1RZ/ENCM9MfBCc6fco pKbNo/ko0babYsNr7TPmtqr8U7OP80sT9AVyt6VT7Hg04cfiLqAfinv05yXw5vS8CCqY ZigoMQpna3F1Ae+y5CGSFoFu0nGxcFAmfIOLwp/bVFLY8zejVUMgd9PmbeENBSyt93oc yM4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Pg9cCo5w; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46204-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUsox+5/F2/diMHQIkirZffuctAFEg3daObsV3Xku53RE5JnktekxdqZMZQjG6/U41ulmHzg7sR809vkkLmO1tlKOuUpg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t5-20020a0cef05000000b0068c805120b4si587682qvr.55.2024.02.01.07.05.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:05:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Pg9cCo5w; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46204-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 D79821C28915 for ; Wed, 31 Jan 2024 10:21:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E8336E2A2; Wed, 31 Jan 2024 10:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Pg9cCo5w" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 0EC0769975 for ; Wed, 31 Jan 2024 10:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696433; cv=none; b=QLgySQLl3V9mLBUofoJeV7AwRio52hh0Xnm3Dy76sLZyqM/kL0zyvX9bnm/EnVuY3bf90rvnU9mdvaV7QICDcZ5CESQD1xwja2/koOcyMR5+FJOnAwdF5oLLJrz9kDkwrcUqC/Rlk4DGYfIqKTA0j2HyJHtLdFwSj2zvbX8uKVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696433; c=relaxed/simple; bh=oE5h6rY9x2tGBQVchOg35/O8P8LJYFf57f/PwB4KFbQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=otexAt4tK77CbWmDzlHPGI0E6EQxf+vmjdOTwh66QZceHfCqdktXvo19q/W4jMAx57AVVJTtGDCWoDVYnyiTA6tW8Pa23X+sPE1fcK7/9q8J8KyjTjwCPNOntcIGyP3xUK7nUECUAntvR+avNwbgHVVfj7tRwFkH7LYwAF5GvYU= 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=Pg9cCo5w; arc=none smtp.client-ip=209.85.218.49 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-f49.google.com with SMTP id a640c23a62f3a-a35c0ed672cso423831366b.1 for ; Wed, 31 Jan 2024 02:20:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696430; x=1707301230; 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=cWlqSYVWXt5E/so3s3DVsM24TfFqYzGuXtgHed/wp8s=; b=Pg9cCo5whVGCPrI1h6Ugn6aINl+R1r3uzw4Ux9+JVFxGjoSbqT56X+nByGCCxBSLi/ 9OUQqHjJEd/slrg+MnVv8e3IYPQn0n7FNQesxKZTwTJD/PHnpB3yZMeCekhJw8tcK54/ 7Rk+1nuZqllNj+uMHEJ9FErxTve/XVeNzmNgmDzl8TKm+SojnGxIJFhqzk3fePYv9Cun UWnCSUoyt6gNMTi+BLQY0dYN8JDorldB62XgGXi9UQeTJ7fzGtdyxI9ZisdkFyKzYG9/ LRH31dnStthHvgj3HCV7Rtw2orw9pm6ld8xtyjyitjua0KQlxTNtubRBh5mhof3xkrGI GZuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696430; x=1707301230; 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=cWlqSYVWXt5E/so3s3DVsM24TfFqYzGuXtgHed/wp8s=; b=gjAY/xl7Ksd+Ad6nNXVeYBciA2UUB+vRvahN3Z/LdlLqze3l8Axfsa5H7du7aCd9N5 l1OtMZI1tsDjfZh6oGADSO/+YDEVzcPVRRk7JSFmFwMynah4TcBPOjywtihlbo2D+QPa eVM1tbmEMrpP/VCSTK+0fdNStou6FP5yYi8r75XJdW6us0yDf5mzvQMhzNBEvk/pxsbQ BMdcFhvcffM4evMmCVvlW8Ex+MYbssKNbMCCcd5vuoYRPUUOOGUknj4kH7GuACFEd8l7 mRze0RtXCJaUKxVqTxHVJQtz2VdIVOhVfbCDC2eu98U0RwKaodbfodhNTlw+2a0RPcE7 LJ2Q== X-Gm-Message-State: AOJu0Yz9F9GicljpD2wBnXeClI/rcTb6iXmUZtf7SH7/nExEOOII9cHP RRroBojPHwRmtEe4LVCsO4P6IiCDiNj13Jk0Vm5AK0Dcj51u+9VhgXGnZvfNgaA= X-Received: by 2002:a17:906:2511:b0:a36:8d18:4c23 with SMTP id i17-20020a170906251100b00a368d184c23mr345341ejb.11.1706696430161; Wed, 31 Jan 2024 02:20:30 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV1Ri1NVLh0NF5zlUaVk2LHboPFKt3vlX5nUZsfLUp8tfHumWoZsFReo2sckPYwFpztR0dhc/i/AzIS1SgQThJAAT8xhaV2eyz/8uaAX9i+MxzAMDTGiIxJx/ZBgukcQsrpQO7YFc2maiQNWUHrW9Z1gzDs6auk1cSHE4JgFEb3S0XHSQMC797OzoOuBVeMkkvOtaiGPJSDut0wixUE+I4Ge8VlS1+MQJqyka3A9hZCUaxbR3xlhlPXmJz9jy7MK9BsayDmaQ59Cjbx+95l0qmfpkilxhAc+CItk1amXZLDJagZ8LksjARqf05noT9rvFDsejY5UR+9BraUA1P+isPYrib6pE+o/hEi9V4inqT+ocI40qzJ2rqjbhoylihNjjMYpC4dRoVAiQAxrSscQYbeYIC8MvaQFU3sJ2QzCo96E8Tkqk9I+MDSlZ+tycATmiePuE/Imr6r6jjX9KrYpXS1gAJSg1syvFoSHnQjo8BOS1p0xLEdc+Kf5CMDfZF8daMrT90sgI8NxG9qt4FwqHo5rZQFiOvptavSv66oURwSOuOvbsSJhXLohaOas5XyJToTOR2UkHi99fugqwlOIKWtYajk527FODjYHf+RRs8TAmM= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:29 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 02/11] watchdog: rzg2l_wdt: Select PM Date: Wed, 31 Jan 2024 12:20:08 +0200 Message-Id: <20240131102017.1841495-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789686452738140716 X-GMAIL-MSGID: 1789709471456949564 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 don't work select CONFIG_PM. Suggested-by: Guenter Roeck Signed-off-by: Claudiu Beznea --- 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 7d22051b15a2..495dcd1c5139 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -912,6 +912,7 @@ config RENESAS_RZG2LWDT tristate "Renesas RZ/G2L WDT Watchdog" depends on ARCH_RENESAS || COMPILE_TEST select WATCHDOG_CORE + select PM help This driver adds watchdog support for the integrated watchdogs in the Renesas RZ/G2L SoCs. These watchdogs can be used to reset a system. From patchwork Wed Jan 31 10:20:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 195697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp290774dyc; Fri, 2 Feb 2024 00:44:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVDbWiLUn4lisqTsJVe5DoS4sQdP+fl0Rn3BYNYjJOJm2iAmowO+qLfPz7jrCw83hXlvDn X-Received: by 2002:a05:6808:3020:b0:3be:9be1:1341 with SMTP id ay32-20020a056808302000b003be9be11341mr7784315oib.29.1706863440534; Fri, 02 Feb 2024 00:44:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706863440; cv=pass; d=google.com; s=arc-20160816; b=R56K3jYt5+heHC/hk5JSz4r0xPOj4CfZWKv+YVy64AcvqUPyMar+gDZSLWubqluMha McMGYEfzK+GKb1XOopkkWmQ3LDHSPT2iOdhiaOu8+8QMYMtb0qZa93Mc5WNVqr7lV/PD qAMXrrCra0Y1tCZGrlddaqfzpsxc/qwUU1paiAs2s2nSohClmCUXGlqI1liIDNObkGHt yXYzCiRz0T2ldbKRjjf2o7gVknGyzuXTf2UUSdpj1Jey1kC8tx1uCSdrtbPWA1X2q8qj AeG0mxVhZELgwPHaxZwJf1YqhTsnacM6BvkRmMsn6hkRGucpds91nwy2IfZmD2Z1mnAQ LyJw== 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=pjn1b7iVWG/Dzeqv8I89FpnvUEwnwwybhoCYxf02VwU=; fh=ay187eJ5GGZqrYDuss58sfDcZgu4tbsX7SyZIsCFk10=; b=O7zOLCXNxII80GqVZBCkyUBQvBRwTEpmS0BNhRzKItnLtpbfcu/YRh/ePf+dc14PXH UnG8eot6CngeULaX9eZvMzmMOqSceKlocomOmDy71BOQyjq7K++xTJmC0a1uzmDSEdkI dhJTPQHzhULgm0V8Us1pQcsDshDKkLe7IvwjtykSn1l2nDJ/7drdyF0tkooptyijLHpq YUHMn+n4KHNfNK3xMvOpp+ETplA6cNFC2xPCSdX0JvNOWmM0OPovFjRpwRRIQCbRikyv 368+YG/DR2KUKb5/ecQZzg55iSUWq+wHdMcIcJ10gcGPO/GC9J9VY2nOfliCoBRpKqyP KtHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=cIRbSaQr; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46206-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46206-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCU+UH/GTorYDto48ze+0nYxlWSlVUAVgP18GSIHYF8K77TX+S5xwPhswk2gId2Z2usR1CXGE98/GB29yMBi60Oy93edpw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p22-20020a63c156000000b005dbec216167si1177703pgi.614.2024.02.02.00.44.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 00:44:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46206-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=cIRbSaQr; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46206-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46206-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 69EA8B28EA5 for ; Wed, 31 Jan 2024 10:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D84D3762D7; Wed, 31 Jan 2024 10:20:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="cIRbSaQr" Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (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 9AABE6A35F for ; Wed, 31 Jan 2024 10:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696437; cv=none; b=l4WPFtL/UL0X5Z3xTZN9aMK08hnvS9u43+jD8we2b65dxfdP3fX8KdI97puukmnr1pOTO385/U4rSuwDXWF73FYx2Mcjrmf+r/n0rnU/jc1fD49rSMG5OaGZaJ64jh8758VP9XqoVgUPcO4LY96/H1tu4bKxpQncjDlfeeGChA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696437; c=relaxed/simple; bh=MgFJpUbvEVQLvjB4o3otMQmxO0bDiV3ePLWOTxj5V98=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qm+kGLJEIdlSLIBaFdjvOXPEQgx48zdGZmZKhABREgqF2wGUTD0loDxsD/IcZOf0I1m+keSb8DFvjVAKJD694/iKh8CGF19UH2JTk54+9GioNf+RMBOhwjGhZljxTgHI2xQ4KnkmymL4yDGO1aWhAqLKyhgksREl/pn0qIRgL3M= 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=cIRbSaQr; arc=none smtp.client-ip=209.85.208.50 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-f50.google.com with SMTP id 4fb4d7f45d1cf-55f7b91ce4fso1061800a12.0 for ; Wed, 31 Jan 2024 02:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696434; x=1707301234; 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=pjn1b7iVWG/Dzeqv8I89FpnvUEwnwwybhoCYxf02VwU=; b=cIRbSaQrPMsqjN2PW72K7GHlHTT1dBisTXfg6YPtGREJNKVNr442ql3N1XDg0LJ4Pn CjxcpvfgrCateO9+Si7WUFN0qzOvTdoo5Kbzz5uydRTMsW+emmzci3ul68PU3Vwy5+rp ZVHGfGJyFLKOM/tVYcMkuzg8CB29hF0S/1KtLkXvA28SBPaDE3EOyOD7tKOgkLy+tXiG X2F1yOLCnrz3UZth+Yn8uOjYWj6TamJJL+TmnyczRvRF8RwHA+weck8fpBNg1qIDxRKx cWX6h9V3kcOU7alXIQiNWATT1oqjCDeSBDWbWAoHbD4bMd8y0e08iNmEW3CjR71QszVD vIkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696434; x=1707301234; 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=pjn1b7iVWG/Dzeqv8I89FpnvUEwnwwybhoCYxf02VwU=; b=Jmiv0yKDxONXvBsMUzk0+nxWnylZuKSIv6c8QxU/o/KtHnLhfa5dt8f+vGX3pQtIEF Ah9jfYCuCCsR9qa59IZ/1pO2tjmKUO1cZtJO1s7lK44H/QFn4K+/o5BzSQna6ieubuo7 qlWQHVs1+ReUOn974cug/TLadt0ArnjQyKPpi/UidCfwrweLRrvNGrc294r2GFNOstJR 7+eal+cfkrqTrHyo0eREF61qwBp+0XkCS8pKb4HZUMSz3DoIAAsL+vDJ3SyK0KCKiLLC 9be+3zP7D5ZIHH+SSYDR/PphZgVWkXjj8xa40nwlYyuL6ikVhSlP5h4I74I3QlX2riJX RtJg== X-Gm-Message-State: AOJu0Yx5szq97fZ60+4w7quokh2t0MUWsWW+W5abt3mpjdI6QBtRUIZj bjuTGaX3buytGyBhVFP0EpICM/Giq4VFctaL5TA+SzfFhdLrB0w7OqHwJ8xKbwM= X-Received: by 2002:a17:906:7192:b0:a35:3faf:c8d1 with SMTP id h18-20020a170906719200b00a353fafc8d1mr1208954ejk.22.1706696433795; Wed, 31 Jan 2024 02:20:33 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVdsfWILXBviMW9OR93BKPBurDeJwQf6Oui9NzsTpZNfcE3wC8/qMTH4nNhWGnLKAz0s3W5ZoCN+QoAvaniaKgj5e4ewMU0trSGK+HQzaeqoyHC3vT78T3r3SGyUEpVPvuW9MemSpjjbqjHGaUUop3csxowBP44acauzGdUDesn5dubiD+z3LV5kGziv954qiZgrqlNUW5Gy1q4cC3TCDbUfOK/d0tzrYPoKJS7o/tCIz8dhimL5UpsZfYxLe6EB6h2K5bsHuE97qzwE5IF+zkJY7X+K+wDePZe+MpMK866N7f1IzgZ6osQSKXv/11bn/hw5NcwkmrWCb7qkCpJ2eRcPKT5oF50J3RcULP5TMZoiTS1pdJxPLwd4xdIHBUjyyOdIXVMa7mCXlBDVNwE8W5Yexl8zfraiG4fM+cxqi5RITojecESa1qmy4kYYlz6hDD222JBDd6OKqG06L92hBdVv86RyWCtoDoV7dEaDVVUf/J/WoMXAtxkhvY1WoHKobq6eW7leO9ExBkb/pLwrenIeLzNq0LQ+4R45ra/nCiJBvIOWJxOMYcT5o/AFmuB7WRl8Rh5hnQlNIZv21WnfmeW2feF/tZSu/sL5jm+KgkR0eM= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:33 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 04/11] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Wed, 31 Jan 2024 12:20:10 +0200 Message-Id: <20240131102017.1841495-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789601825291857082 X-GMAIL-MSGID: 1789776039187779073 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 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 Jan 31 10:20:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 195695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp290019dyc; Fri, 2 Feb 2024 00:41:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGK7qyw1KxpmTXtcB0CGjE6OtUoL6/MA94FDt6qHYWovUFboSZ1n895Md74ZBZll2bDS4nl X-Received: by 2002:a17:90b:a55:b0:296:879:b113 with SMTP id gw21-20020a17090b0a5500b002960879b113mr5095419pjb.5.1706863307579; Fri, 02 Feb 2024 00:41:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706863307; cv=pass; d=google.com; s=arc-20160816; b=MQEYdrB3HdwbA9Qym+z/ScmbPLp9vmj6xhPduxlIbrlcMwoxNPCTxDityoZb7PkBp5 wAoXrFHSzuqaOiBg+uDRxvXbr2kPfs3zy/sZiougu/MnancdB0ixRjJjjM+pjPi2VJwr 2gZz5pZxHdg0dx3kKHOrxJ3Isd4DYKn3Aln5LRRKoA95TZqZN+X7XFE8yX7PzS6s9Ay1 DgwfsxNRrz1I+6DtPfkXQF7QcvouQ/ssP/k/9L5GEzGGgwcvoTQnAylCZottWfhju1MC o3BYUDOCLG6ME6KAiLzC1PCMD2Su3MOaHkwwHdRlTJxyIzYeUvyiQIKnlEqqn1a6aG51 B9MQ== 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=Ooh9H1my4f9HBXDuCfxTg/WHENrkeAM2CEvky+dksH0=; fh=61kIhSzWWSXuxBf2/bzlgTh0V9bvvcROxe6qKJGuMxU=; b=KciY/vnDzA/MZHr6TG/882ngqSQ34zvp5aB399bYPG0uB/xKB3fvIXtMbCFwjm66f8 8AgvZit5L4AlhaJV6SKfay1t7OZoBhRV3asia9PxOX9jt+pb6kTz7BxG/ImbBVEpIygZ h04qR2bfghSapJnYVzStTWgbppUIfWhtOku3nV8hQYeTSpoix6iVPva5d/foqGDcnb/L E9bQlGx8qktODT6jFnmS2O9EsWAh3GnhOJqW5fTOYNUqUppa9vpM2p01+HbeDLpYFTFh 5OgfGSZ/B8Ej2tEyyr8AM2JbTVS/3RxkRhnm0L9Nxvxto7lSunXthTXMMyCe7YAFfxHP TyfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=qVpoD5Q3; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46207-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWkXhggvz5aiTzMZksoittlMONns1q6bxP/CXndiHOUK5GNjslck9NA/22S2bLghJ4vr49hv5WLAUrHuoktB0djL97M7Q== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b4-20020a17090a800400b00296321c7fe5si1339844pjn.61.2024.02.02.00.41.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 00:41:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=qVpoD5Q3; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46207-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46207-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 436A0B27BE9 for ; Wed, 31 Jan 2024 10:22:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A12F768FC; Wed, 31 Jan 2024 10:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="qVpoD5Q3" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 46A686EB4A for ; Wed, 31 Jan 2024 10:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696439; cv=none; b=IpFKmeNk8vWEWD9F+UB2VgtTSE9cq+fLVeAUDtu3HX4bor50GF5LTW09RjxJ/4hBcvjwsup59KJg+qrZu6rVj4j4azp54VvtON/G3vd8x3UjgXZP8rV1YaZDvIRyDVRBh6wrJHt/1PRQpiv0OTCpIEP5/HsbJgse8iz0nhKxqyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696439; c=relaxed/simple; bh=sQDbOUHSkc20XDneBfwuR876rxx6hocXRG53pgHnEa4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ge06iK+qjPE2NCw5lZ07LVhhl5ksZ7DgUo/gbrFhXwlOZGY7NeNdfllhxl6pTdAaqi78gICY5rjzrcjUhaCTUQBwA1drohJqKFn+zqXs1OKQzbhN5vyc6d6EgeCe106SqES7f+XXODVe9nmVr25y5It84F9YVbIKIYbkKBf3Qos= 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=qVpoD5Q3; arc=none smtp.client-ip=209.85.218.48 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-f48.google.com with SMTP id a640c23a62f3a-a363961b96aso194880166b.3 for ; Wed, 31 Jan 2024 02:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696435; x=1707301235; 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=Ooh9H1my4f9HBXDuCfxTg/WHENrkeAM2CEvky+dksH0=; b=qVpoD5Q3TRqiH+ZJSwQBThNtv5vgIwJ+Gvcpby+huenLkkRYTMtTNaSA21LMRiAmDh 0oJiTfnCRbnr2jBJ33RjF0AZd4QMIX9OIHTAmr04ClXgyEW+54EAi5mvoIlrj8+3nK+k S0wmtTTq3phsxkpORZfO2r9fga8KdEzQPLWtUpNcWU6qGO4v/d/e7HBaojLsahLPNUWz htZkuqRL3duzQjiNooRKqFGBi9xoHEwyGwSRSBE3niD1LU5VUnSyQihpZyitNPlXoe6T n07hC1ghIjvlmIR0ftvHUB/lBUabZ9ixW6q5y1IdJne1YyaYM/vf/Ez+Ly3L68GD/u99 C+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696435; x=1707301235; 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=Ooh9H1my4f9HBXDuCfxTg/WHENrkeAM2CEvky+dksH0=; b=esQWmtBEomA/ohwrwV0xP9fb/cqVZntiXAwJlcph0tyYY96hUWZpmj9s4Coi28ZJNC 9JdFXO6SM7YPNjv0bs2CciIUnzCulPV5kIcD4E1x1Divs7cNDGNqHauR+l3auxkoLCGg UbNrqOstZr9HgS839fZcO0iB86W863J/lG+X5RW+wgdl1sbt7BeaFB0SerKrBHlbwYX1 3V94WFOcA+Ilhwfc82XfsDhFKxzpbaUpx20r0YZ11t7GNPaauetqY/DHPS/+tMlFNDsT tZoX1Ddk4bfHdsGfB6h29LjUKsrkGspBBMDP8f/XrIQbQiDOiUjHirwKugqrIiCz/jcG 7oLA== X-Gm-Message-State: AOJu0YxSqpz/KDYjCUSeGKtSoAykxqJvImeVRPXATLTsoW6ZdmHSC15N +P63fTuv7wnFX2hQE4woMIbP9Vii+3lFlL7HcccHDSJsgwObZQAuOWpSSUz68s4= X-Received: by 2002:a17:906:3598:b0:a36:3d9d:59e4 with SMTP id o24-20020a170906359800b00a363d9d59e4mr877872ejb.64.1706696435441; Wed, 31 Jan 2024 02:20:35 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXGMfTz9OxErq0VDb9MmafdDteHQcfYXNHT7XZZrVwJ3TfG6Rq0dyQdbG3Q3HZFcm3z7bEp6UwJFNKQV0+TAIG8iDmH5In6F620fE/QCMKkrKxVk3dudkBrURUhrJBBCtmU6JAjnYxEmm/Mzh9nNhDShtrNcHTiHBgNm/Moec+agD/8nbzAN8xKFeVLdU2fKcMK1smT6o8ecRJJ4ZWOGbnrEh/LdECScpzVnPhnTMRCjbwzSNpA3DVaEA0Be6f8NMI+grJVwgi31rDSKbz8V3QRpYntADtTYk9vUc0ucr74DWJRGEAin5oXyApiv/MZyNOEx2qTZ9zVO6Ns5SWJ4hxlhLvyq9aWBGwoAB9Zbf4SXQ47JHsig2KGx/RTWYibiV3Qs10bqgLo79U9IEPfix2nW2e2d4FHkBS7ULQJvGesz3+tEfNp66yWyjh23V5dzR50ZHkWfJ4UMCSpBDvn8SmD+KvVtbzpkamKn/OShtBNqSFyZoQ5/eXmvc41vH3tyHSNKOPbIe+LHDDeE4uFpiBMdBYXICJirKCNkd2FBUEKopy8KLqigVDuWrSe1qtUtYmzAd20Q4jPaH5AKdgyYinyOpSxAyeNt6mfa9vXwlVSKFQ= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:35 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 05/11] watchdog: rzg2l_wdt: Remove reset de-assert on probe/stop Date: Wed, 31 Jan 2024 12:20:11 +0200 Message-Id: <20240131102017.1841495-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789775899727104752 X-GMAIL-MSGID: 1789775899727104752 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 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 Jan 31 10:20:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 194794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1947344dyb; Wed, 31 Jan 2024 07:03:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6vy/xXOp8viTA4Jxu3gQvA2IkVAQ9jy+hdtcHQIQSChEXne1MuTXFU8C0xzo0XZE+w/0A X-Received: by 2002:a05:6a20:6726:b0:19c:a202:3f96 with SMTP id q38-20020a056a20672600b0019ca2023f96mr1608012pzh.51.1706713412104; Wed, 31 Jan 2024 07:03:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706713412; cv=pass; d=google.com; s=arc-20160816; b=NzsWbM1Hn6PNxJdDPRFxFqC9U5558zX+IN58fZaYTIoKJx/P5NL2Q0wx45bpvi66Cz zolILHNyMV/HQZDmVm1u14io09Ta//xjl/7vkXXCrOymJMNUBsjjAVCYYmYpxQ8q9LYe eMrZtF9pVZLpMT/qsX+izyiHSRrcI0yBiCg042Fz6dLVpDjw8AMcQtsqvYJ0sxQ16Svp PO0PpWtoAEAH7MYLU/eTiwavER+KUHIZ8653n80dGY+Rq+cATfrxH+vYXqvCP3xmz+n8 GA106A19einBAQZRmEp7Xh3J4jw2V1xwlIdzJHRLw5mSNy88f4IbIheLSaSZrc/Ypfaz j6LQ== 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=mO6jP/QWi6LCd6JhCn7qcYJB8RjfTTwNL1rKSjMisP8=; fh=3DiPzcuBY4HHYEPTgdzQ/cJytI0dywyvYKePPE4mZns=; b=LDvsTD3nJXYBQWqTu94BbXVP/c9We5D5/qppx4Bg5JsgtIKownJGXGK88lO5hpGLY6 VyPpOhMX1FipB5nDhCB2wOKaber0cmb4jH2j/Ebo72O+yrFwb7kwALZyL5VNRY4jfKqw zpQoKRnQuHa2VGrEdMDpYp+MlbUfzjnsfiff6Jp5HTBDnZkETyD9DvBzuKRFmzkIkIDO 5n6EqQTlU99dxXRUzyeYSha+QrPWfvyl/H88srrlLaGShp+yqyfnTnkeovcDrhZz1pnx eNVVWolDd8E4uekHTpb2t5N/ssSKGCed/FJkgAtdSiRiJlj028TTSBOT9LiKiRG6OB+b h41w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=RCEqASWB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46208-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46208-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVsvm42JA1xxoDGc9LL4nHHqmMbZj0H3vP6ctd92EM5LjjZ4JzKqhNlNwt8qND2s4sFjnORhXmp92iL4tRSfvJA+Iyl1w== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ck27-20020a056a02091b00b005cfbc9de943si10181998pgb.382.2024.01.31.07.03.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:03:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46208-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=RCEqASWB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46208-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46208-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 28D69287560 for ; Wed, 31 Jan 2024 10:22:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8049D78698; Wed, 31 Jan 2024 10:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="RCEqASWB" Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (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 5011674E2F for ; Wed, 31 Jan 2024 10:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696441; cv=none; b=E6RKBiUNVFKwgJvIEDAslmmc9eYD/dsvGIceKGG9BCv0laOLtQxGRKy43d9JBJDrVThyx5yjhAj+vRsAnfvFQJPB0Uf5exseIMeQc6O41vItZDVM76anH1/txqqAAgKCVNgCJ1vTv+FGS6bXvEDzaU2qaERBEpHYAjw5W5U6Asg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696441; c=relaxed/simple; bh=H6FcSZimBVudTaR4rGYjmB2bIv0NVLGFUOR4xJQdDQs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZEITGRXHMBkWK5OJ3JJmW9iFzGYd8/uJ6mPULg105FKTHAr0z4lwSk6A9QkKk5EE+v5H+kpZXGtHJvBOesj9V7xtqJQUIaMxKq5wuFSi6svfzoaCXBEesJNCD1SCIaCOrKI5lwRebKHMqKz05Z+IrdRZpWshZINN/VTLlM7NjVo= 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=RCEqASWB; arc=none smtp.client-ip=209.85.208.50 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-f50.google.com with SMTP id 4fb4d7f45d1cf-55c33773c0aso5262911a12.1 for ; Wed, 31 Jan 2024 02:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696437; x=1707301237; 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=mO6jP/QWi6LCd6JhCn7qcYJB8RjfTTwNL1rKSjMisP8=; b=RCEqASWB6pmjujSA/Mu4ks1gJWH7zk0hRn8sQWvIeu3vulKYqFDOIdbqnzhZXXdUYb KJh51rnVOGljOMdBNmlRZNv1T1Kp7ZZZpa39MRO3rlr9+/QFO22xI/dseksSZxR1VY34 d/Ew5xSNS1culhR1Yv1MTYjQiwBQw0L++06BVBQtuJTkX7NTLUktQtSYAu/d1BuGsgGn s3nKepGUHlKNQyinB1K04GORykgAHg1d68ulWpq43b92CyTzsgOVN3eq6SvBt909bUsc rAcjkzXCmrkOr78VWywVMxOivBcdMrb7rSY2LDEdumqqrhP0uQFedMpSKVcwxAY2Ou9v 4r0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696437; x=1707301237; 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=mO6jP/QWi6LCd6JhCn7qcYJB8RjfTTwNL1rKSjMisP8=; b=Yrsg04eZ02NwBXVxM14nC81NMw4E3JZyJJicsC7ORTZ1/8GpORxwIaFyJvNVrbGsHh 8J7QpfXcnLkW2uQC0SMwDdxG8gK0E1dVpjgzPjSu+guetR+bhmRJ4MF7D1DeDcJlUbmw Pk6T+7pk8R/oQP8qgKyF48cjq0mlrVih0ViB0earX2Ft0JC+NDrXcNoQpH8+MgJwgcch od/Q69WjQa5phYH2lvWEpf6D/ABM3XJXMe4XB9b98ZaSI3magFDM7iZznnseN8BzErSX bjcYQ60ZwEEEranS+pe8kRLtPHU02SpyLAIaIM9LhzhPtRkzDW8BDeiYo1KhLsmvLzjW LS1g== X-Gm-Message-State: AOJu0Yyvpyxzbmh77gPsa3k5NRLxbcyT/M4DaVx+cAhpOCxBj589Y1In tIDrLQXSI2DcLK2Xwog+TWHiiS1wqlaNUY++zRDequ8OzWcQG0vis1JZpGE9v20= X-Received: by 2002:a17:906:118a:b0:a35:88ad:e607 with SMTP id n10-20020a170906118a00b00a3588ade607mr839119eja.31.1706696437272; Wed, 31 Jan 2024 02:20:37 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXb5vxl7q0ujGxCfzWzXA0dChjsu9Kf97S3Ve32BMSyn4a1NBlfWCk3Wuif0En7CfdlWnancsZr1rNrLf3om04RD/LPCAEb+cGQbeOln+g1sQb5v2J23OD0y7me6quuIXZ5Yid90Xd2Z10lTnK+rq72d94ROsBN2lw6Oh8rurlBzj63CRqI3hr5jXY+FcK6XDlgoMXSABMRvUGxf+Nuea/BQ2ZZp7O5zCg3xi9L5hMjASYqN2/mgkD6GGgesBm+y0GWmkUbwAvcSIQ47TknFIg/P81lAqcVJRdrJYawL5kyqPFONXVtS+uGux7cOux5wQAvqAFa/ipD9uJXvGKreVR4hRsmnvs1OWOpzxtIxecU/+PP5MtpvudwdTjqstaBx2BtIEnvxFApFwA82x7HsoxgAJCeEErPr50vQJYeX+HXRCIS2ZDWtg+egoBMQJ0EHJscfSgvhOxeSXMoJJHTahswDp9K++71oexBmurSA0ijQwMHFthoNVz8juvuJFYK9SqtvilO+HHftEm7uO811iXko4x3ejuKgcPuHTROxtQiy5hMQqajeCmMx9cWMuy6lerTeBUbRnZ9MdCjYBIPAqctiynFSdteDn6OhwDlepM1onk= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:36 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 06/11] watchdog: rzg2l_wdt: Remove comparison with zero Date: Wed, 31 Jan 2024 12:20:12 +0200 Message-Id: <20240131102017.1841495-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789618722326934423 X-GMAIL-MSGID: 1789618722326934423 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 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 Jan 31 10:20:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 194831 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1988348dyb; Wed, 31 Jan 2024 08:03:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5RRXXYTwXXDCiN7DgiLOKv7hFdpIWH58H4xflGEAmOUsVR8qWs3j/FkDRgkbtOrUcw4Qt X-Received: by 2002:a05:6a00:1792:b0:6de:8ad:dad1 with SMTP id s18-20020a056a00179200b006de08addad1mr2683068pfg.19.1706716994386; Wed, 31 Jan 2024 08:03:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706716994; cv=pass; d=google.com; s=arc-20160816; b=MdhIaaSabuNHWfaykP3Ep7puQDBNgP0MzleI59o2ktjsaT7FSBjiSeBLVJezSJkcBO S/6ifB7EmxmcjG/QEBQhTWxCmwFA53FHC3K3AfcIPmLjc7LbssldKW9kln9jhF98FxoX AcLDkDLGRmJlArd3P/ndQHaRL0mQln7if1cLY64cTGfOhl2NO3I6S5cNGrheig3b9AKD UuoGVUnsr5BTXY+oAHTtyIEZcr/To8YP79koEEAy+8aAREPQWPTaYwvcpAUc1jtgWI+K ZjXXHwtVJn5vbB59LKrd+3kHcSUfI9C4TMistVXZPJq7AGdQz0x6EmmzU1N/8r41nDGN lsMg== 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=ylOo2w4JpdKbsiv3eDKS5wBqJdTApoM6QjMPUaO7jbM=; fh=J6vR/mXSM6I88nlg5GqID8WQH64hsGgYtpvCMn2bdRc=; b=h25lx6Zy2WoTiDSkEkfSNnM8WWZmCBSF3RrcoAf2GOf1VAO/QQnMejuLoTh63nU+WT wKYT08WFjhDe+c4nR9y2+a/pAh8HPYHRjiJUaOctY4qkvYQmcnv4XNTAbiGkSqHDi9Eu NQV3h6n/qOc+25tR6VYBWopfkg1ctZMzIVtLnbQ69kgkaXOFZpDbxpB88sDj9DzD/nfy njI7KzJVwc79UjYz55ZzCbRm3YgtjQLWQ12kZRw8H+SKhM9GT/pFF1jnPUIrPcr7nm+O p25n8eJ9f8JFm/aPQDZ1BulFTq2aOE26JDAkFmU6zPsr0fJs1KQaQSv0VYM4D2tENIYZ 1zaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=KoCg8CDe; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46209-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46209-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWz6KJXx8ergnpL6Ydw5BJu5gLNZaosjvfhjzjik3s3cEiQObNjIqR7bTnQCDivJEIlCipk22vQNkLiG3RBLcdCOWcDlw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jw16-20020a056a00929000b006dbcc2013aesi10149704pfb.137.2024.01.31.08.03.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:03:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46209-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=KoCg8CDe; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46209-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46209-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 5C9EA291E56 for ; Wed, 31 Jan 2024 10:23:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA1737BAF5; Wed, 31 Jan 2024 10:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="KoCg8CDe" 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 EE5C6768F4 for ; Wed, 31 Jan 2024 10:20:40 +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=1706696443; cv=none; b=AX4qe93SbiBuUgF6wWvrZfJsiGt4CYVQqdX+iF4/AtRQZ/Vfekd0Hh+GjY/G/E1XVV6DQIdIejc9m/c8GUuln9fjB68zci+Pye5QlRaT94rNXjIcRKgki5H817WliwrOyIfSx15uCTVw8X0wV1RJYzKnMMteyhKHouJMiLK91lY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696443; c=relaxed/simple; bh=AZzVusD5nkVLXNJ6AXM1LOfhGZ6jvjtVIAV7p2+5XX4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gIBeGu0vzAT4iZaEdtYa1n1Y78Rpw8/sFhXYJCVv5BvRBGrqw0bu28NU8IPtXV0RKWzyd/n1Mbl2NWd7gV4wEHlZfPuj/2jgDiVXsbp0cyC0hBc4gFu1OXgyXJRcJfoWR8VKx39JlKPfjhgEqzeHHJU8EmStPaVCXMG75AuGexM= 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=KoCg8CDe; 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-a366ad7ad45so67612266b.3 for ; Wed, 31 Jan 2024 02:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696439; x=1707301239; 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=ylOo2w4JpdKbsiv3eDKS5wBqJdTApoM6QjMPUaO7jbM=; b=KoCg8CDeY6M0vq6Ak+MusTWawpG2HgLjNIjD8TBF96P8/PhKgs4+mOlabbghnHZIXR iKthIaQSNmBO8aBTwiLXflcso8UznBmIeFNrgJ+2RQ9c9kz6wP91iwZMkMh8I5LX1jPO HmJKen9M3coBPlAxGWCSPSTQShpQrxJMdSGk7gE1zBzn/ax4IbOTX//7dmHMIrK1Tu4T 72DcmywcKYy8a58jSinalCwfJlRSpUDcHOnGg92KKp9CN6E9Fq/IKyqS4T2tyDF3cKJ7 hUJhQgxTOnmKW/tSytspRoCRM0WDk6qOgBw5wuUwDn0P3MZ/hivLsIJS3mo9Nvs0VKoH tcMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696439; x=1707301239; 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=ylOo2w4JpdKbsiv3eDKS5wBqJdTApoM6QjMPUaO7jbM=; b=KILtYde1kmc2uiMvL9YkfdpCrrff887Sp2/NhpIOH1k24Gis1dEW7+D1FtZl+lwj+I nRO2cywb/Kxp4+Vlg6oF/GSHj1SzWokIj0ys4fl5XifTv9TYSI6z7cm1dmCVo45tQOks vYlxUHbFEiMHZs0bhfgZ/K+BZKp/+0Xek1itxvAcDE5MMAYrnJQywn8AtSHuQbFUxXPo 1TtsXBtFlNveUVykuinyZnk93mjZ3Lxrp4MzIrg2cZVCqmLf+d3zW8anX9Oe3g81yBka ZDPu1aERXZZvB4K7n+Z+0qCcHYxa7lwL4VzcUx7yC0b2VRL7AE55jtdEHRqv991Utjzm tqOQ== X-Gm-Message-State: AOJu0YxbJHcsmYPlOP6ZqFkGAFTxHTV7JVkWwp88NDxGln8ytuAmTlAi l8oPHxzAZvMtPi5d8vRRSMzUzM8eWA4/ubM5JkE8hYlmW0UwYgoBKAw0PRObJm8= X-Received: by 2002:a17:906:e2cd:b0:a26:90a0:696e with SMTP id gr13-20020a170906e2cd00b00a2690a0696emr882233ejb.41.1706696439265; Wed, 31 Jan 2024 02:20:39 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVqSMxnOg7rmUg9Vvs+B2+6H9Rx95Ptd2+rLciAEOGtGb3DAYzL2mnycXNxSk1jupqtYtAzopyJmYh47A55nHukdtrhGZ9azudVEnDykUI99cT2TpvkprNATyZSxU9q8Qfiam/sgRBW4Cb3SY1dCb+WChl/t1CDik0E//GYlFQ38clHPWwOc0shexSD8PK0tXDEDG/MwbSBx34RDZAW5fr+xJ6RSO/wd626wKY4/DvRsasm5713bciIoZC9EUt7wrWVz7FHKPvSBhFpo4d6mIQudzqRFaST7m8QXp+Nemma7k2XQ4wXivairTKCAHEEjf9U9HRyzB6RLlZp5hr21uaDlvMJBG/aUmm6CAPU/mL+7FaEVqaUww6mJjPZTaujcYbbIle1ajWl5hKI6YgQhZ6S7zzFk7McEFTqKA3pXuIRILAis3b2gRdBNnwyrS8ykiSKKMA53cVBX5YfBdbvQA5aGpS7DsCW/5AGyCp1+JgE56Cn14YiFY2SR/YrJHOqdVHtkVYPHLFfM+iQo19MIHEzrzn7vIcjbdsn3VhDmEFYZPiSjVvAy9zhb+tCZFxFSxJjpoeyIlsKo8i9MXhXyPvoSQxDH70EzJGxPF4Xgwn7uUU= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:38 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 07/11] watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset Date: Wed, 31 Jan 2024 12:20:13 +0200 Message-Id: <20240131102017.1841495-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789622479058225523 X-GMAIL-MSGID: 1789622479058225523 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 --- 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 Jan 31 10:20:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 195412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp336481dyb; Thu, 1 Feb 2024 10:01:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5k2aw89qIfsZzqKflmsARfR0z/3XN8IRB5w/TxKXi/YepiwklgBAFWy77CpMoOzi06KgM X-Received: by 2002:a05:620a:4959:b0:783:cd88:c97a with SMTP id vz25-20020a05620a495900b00783cd88c97amr3376341qkn.16.1706810463783; Thu, 01 Feb 2024 10:01:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706810463; cv=pass; d=google.com; s=arc-20160816; b=PLIpvBNx3O6qYaQjZA54lcXvggsuWhgYWfXdLuPh8KO3aO8twrPngEizPXKbWD7n8b atJOS/mh8u5BDUxSxQL0dlb9ZnWy4C8Cp+TqZrpedLIqOo1HJuXfVM5n85+05RzNk2Zy KdtZFz7ceERX0x18AWSlO6K8ZbkHzgnGK/C69pHaqSXX8CQcnhfwWuKxxJ6oxUt2spXI ChJL93k+wkWfDX5mp6z2Vjwxux4Xy2RfyFNpMLlaMcbzmuZtJQR2AZLM99qOleRbz+Cs bSgy7tv9TwY+K/xhhltkYCuaoUN8K43m6764N4dh43V94WsTjTXaA6LBf4eEVTstK8B4 OdQQ== 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=SgNArjMTG2B25K1vBtzTn+gsQnVe7BBnkcg4e/Ahq2o=; fh=iU1ujEakN9BjGRRrn2ICTmc9HZ4tR4733IClp7LzfmI=; b=QkzL8bD4T1GmH1c0bQ06pThGIjZmtMKL3/XZQgm0h7Qm3BFI7IN9GpKVpsQIs90XjM Jj6lS4DlxbdHB84nDN34+TBqwj3s54ZHxjT7tTwwR9C/mitEi66KH4Hko9oxMd5ryMMt /YWq/qMvEjGlPUimKxvtwWke7BkT1ZVwQBbY/D78O2zRxX/EhqXhTmZ2O9v4q2T5Htj0 M47Y4wVZKTm/1R30jupzli1DCtUMEh9cP5xdsAN5Sy1Z5q2266Fty+Iv//9d21WJ+Oet rKg5hupBF/umyV/esSW9+t14qbh3UxQo9TE9W1Fd20F8QDUrclt3kH0VOFjw8+rD3bKk soOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=QwxbEmmq; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46214-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46214-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUb3sQk/18lNhXuRbT6LN/QnbeMDcaB/J+B4eOLNy3aqljmhAf10jcFv4NdkO9HsZt4ytVAP1CjBvndZLae0PNlZWLtXQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z10-20020ae9e60a000000b007853fc5d241si44602qkf.387.2024.02.01.10.01.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:01:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46214-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=QwxbEmmq; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46214-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46214-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 55FAC1C29852 for ; Wed, 31 Jan 2024 10:24:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54B427F486; Wed, 31 Jan 2024 10:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="QwxbEmmq" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.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 7D8AA78695 for ; Wed, 31 Jan 2024 10:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696446; cv=none; b=uDQ6bliwkFoTGEeGWmOz+wgg9MDVHNq2rJDNu+O4zkrKbwxYzFNYoQGET4oU4FTdPFTUGMe6hlD6RSzubukOecG+EhIVBI8G5A94YV7pqzJOq8yLejKds2U4diKaTlw1bJNa08edY1myLZydzUWaJLTwM/lSpmrAgXEPoDMc0QY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696446; c=relaxed/simple; bh=D8gjXJMBwEu6Dis5xP+vQKZU6PNq4qedBkn7bK1S18A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K6OAYC3DDYM4uUcbQkSR1DPtcLGaJmqSG2S8m+2n8veIvY0u51x2zZsSOYhnzVQpZTu7xz4SAJuxLoWmrtQ7V+TgOEEWTyC0y+FP/mwIIWPEYynMQIr01RIuwfJ7b1Sv7UKEO3GJ9Y3gxraiU5SVy9IKlpGOoJzWnaM8LP44Ij0= 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=QwxbEmmq; arc=none smtp.client-ip=209.85.218.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-ej1-f44.google.com with SMTP id a640c23a62f3a-a2d7e2e7fe0so142875466b.1 for ; Wed, 31 Jan 2024 02:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696443; x=1707301243; 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=SgNArjMTG2B25K1vBtzTn+gsQnVe7BBnkcg4e/Ahq2o=; b=QwxbEmmqr0VqsXf3Mi6K+SADd3t7jS7YES4uXmvhvqOv0y6RC4EZwBLBtyNd8Ukt5d vaUJT+RJYDIzAIpsIrJhyRz1460JEe4Ol03URPV9RGgpfyoLnRJLN5mYfjdzJfife38+ 26a2yCtPxSInR9NdeFFk7wFMMAoVdGBQ7mZcv4WZZdMcNbVcbsY3ckUoRemXBH1HQZU7 QzadgFLJl78d6O5taoLKOFwyCI3IYDlw9IjYr4SmXtcG2dULe6P1uJuporCIBKaJj4PO XlLpz4qqOfY5o7r/mbnX3Idk1OB+oPpo6A5cHroSNkHHi4Gic2pKrhwBMxJ41LAqw6HL gAeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696443; x=1707301243; 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=SgNArjMTG2B25K1vBtzTn+gsQnVe7BBnkcg4e/Ahq2o=; b=X5ewKwmvw7CLG2A87thfvXH1UQbVL5mOZtYgDJxsjt0jX3xHAYJqSN23e5ePGuPxK0 dyRjp3/j8pUytDJFDg/s7RrJKgHrAyIls635bEQDlyWF8KEFN8gbhxNKcL1jIa2xENr8 dqEoi3YfHavE5S+N1ExyN3DJ88d3WfVgUtaptmC7EmruZdUaFnzV/Keh1cBrMNQ+k1dI iuC850FOgkNvj5z/TCPI/WWC3x3dXtgz5SxAN0G+g6ePJdmrbq2n0sl/O44Yy09YN6br iqWuk7Gb6BFFILLTunJF2T3J4jz393zfHRpkRMnO6b6RuGt3HqQ1QVjhhbPSCkH39fEw lrsg== X-Gm-Message-State: AOJu0YyqnV2dOZ6Rvizyuv6vktxgXehcAgFMMjGizqNgK3b2AITg44nZ enSRvUL5MMuddEuPD7VngKN0CKIR4OcbGzaT1Lr3I1Y+u4oNF0AJVe+pPProDGs= X-Received: by 2002:a17:906:f884:b0:a29:b31d:1dc6 with SMTP id lg4-20020a170906f88400b00a29b31d1dc6mr1071696ejb.6.1706696442850; Wed, 31 Jan 2024 02:20:42 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV7VFoKeDrKm2dFeKrr3ueJSNIyWcAzVF2M60d+rWLrt+Ms3BMv+iBq1k9IesFPvSOL9cfyOEaE9Qyop64O4TIi91llTpqRYCoY/eWhFjwpvFeC0Joj++C2f2yr/mi5twG4gpp2NWGALqIZH8LZjL3jgNp7gBXYbddTEFx6oJRS6aKY2MAbSm3nwRukMsNdGpq2ARasM6aNgZwLtcJZt/KhJaHhzRwYWi7qmbv+7y8gEjBXDqJSayqp+kNs7wyCBILeeazMjOYPRuwHK/vet5rzEqM1vkM2UXYxR1YXwnYN/051xrQ6kFPqg82iQahCltrU8BfNbe5PFHdr72JgqqfXhVOPuOwCnUhNUL6Hz6mBxhSAERew9GMDNcEwRdtvza/MOEjg+rLSNXX6yXv5OC6CHVtYR1L+wPPEEgcG9T6uwkav6wmzKbOjTss1ehquFcK/DYAefz5MNnhueisHsz+DfnZhhNvarZdVKZY/XBrjODT/z8TUkv9/nR6diD+J9+8wVJJKFpR9oFY93VHDLwNAacIdObtH5LGmzLKecC+mIrue4ahgSJKp/RlvAcUyzEmvvTqSS+E33CbkaFBALPbv2Sk4vN7xF7BogntAeKIwCIDgJ/aBaIMfP3cbVX808YngUD0Tmq53f7Tv/T5A Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:42 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Conor Dooley Subject: [PATCH v2 09/11] dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Date: Wed, 31 Jan 2024 12:20:15 +0200 Message-Id: <20240131102017.1841495-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789720489079065104 X-GMAIL-MSGID: 1789720489079065104 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. Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- 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: From patchwork Wed Jan 31 10:20:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 194793 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1946035dyb; Wed, 31 Jan 2024 07:02:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkwzqeFDcSHt/hA22YumaMUt01r949+C7aDYuedgvdiNhZ4w/HqFS+sXnTx/RCgDlI6YCv X-Received: by 2002:a05:6a21:680d:b0:19c:8974:83bf with SMTP id wr13-20020a056a21680d00b0019c897483bfmr1752165pzb.54.1706713331828; Wed, 31 Jan 2024 07:02:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706713331; cv=pass; d=google.com; s=arc-20160816; b=1G4+/VTiumKPmnf4YbX1WdH7PK8Y1dH9amVZ3zv8LSjC+kaPy6mASR1G1TfPUf8Usx Em0x8S97/aKBLStgtoqDVvlM7spp3hm5ncYvS9ceARX7Y262LWRDDy8zB9WAQRaOc0od S6yueP/RY5rNbks4dRWcAIOAxqb3NCxf/2cmTetoHo3r93+zz5HI5jwd7dbzcZ5tisRK 0dH1spu9Yo511LMVSeqGeYXiEUzmksM+OShiGMOK7EFBQewMnd99MDCL7yLqYfvjt4X0 Udf8koI9Ifc7j3qBVrBM7e3uQOSlabCz3KIL41Y8NcikmgHiyBXkyOeuKUw390/BsK5W b+VQ== 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=DmXpMcL+a4xK2EumucI6WpPkZvFjtLKso9wLeHqAGmQ=; fh=T4JgxDPrCV4tyg0RCIVaX5O9lR7iosBuciYLw7bah6g=; b=lzkkR14xl50ei8QE4fCb+QZLXoBQXbeUQg+BJr7sF/XdMZdTrEMvwo1Q8PhJn+022Y yal7thXz4zwbgegAXw50gA9Iol0kfbNE2nL4pQhrSxO6eHBOp5DjsfXZFSrj0mwUpb9u q/K6LGtZjka+io+iC+ZF87wFTmKpOd23vLmlXPL8vl+69PupTW53PjiK8XHF3az0G+mw ZyznVVgLIylUAQiOYdykN07RGPfqJAcwraiKYtPEIg5DxihYwSQuBzjzMtMPZUQvdURG aE0Y6Jku2cWbUfnewBWOVRzWQaPTU/ZaUCbpdMEmKvFlsnOhsIhPVxyGiTOshgSbhUjD MBTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=XEVJrs2r; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46216-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46216-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXAMPFQCDjEhtCVP8ZGygXKPZx2rivfRA9tookGCWxoxxeeVapbETGn9vL+RWQfpF7y1DSDGt4RpSR4+6dam8bQY8bqfQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s24-20020a62e718000000b006ddcc9294ffsi9699598pfh.47.2024.01.31.07.02.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:02:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46216-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=XEVJrs2r; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-46216-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46216-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 7CF33B2A93A for ; Wed, 31 Jan 2024 10:24:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 986B780BE1; Wed, 31 Jan 2024 10:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="XEVJrs2r" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 416B479DC7 for ; Wed, 31 Jan 2024 10:20:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696448; cv=none; b=nhA51tU75UIkcl9gNV3sNIdQ9vvRB4OGwezXIIzv6NdPKFZnkyK07dIMh9/H0hmr3D/BV0CDuWDIDCpCaJKcNXnh3n7t8YQVGIztPl9h4q7AZc+GSZpTcKoBy4UqUhJAX4gwxN/MmN6kgdByYt4ebRA8y0U9XV0TT8CBQKgsX8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706696448; c=relaxed/simple; bh=0dftQtlTKzHuj9IWE9pWuTjh5YsJl4kUvn8K1blNlbI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nBi0SCwszzTWlljolHOp9Fh02jhS+/gul7x3KeSC62KDTUfRJeZuONVfIYgp6soEE3xu9kxkPAuGcQhB+e3ebP+MRdRFt/Vh1yyCRaS/OdeefswlDCyAu8u0Vl1czSSyp0vHMFtA3IutxCLpA4obYgjGG8rPgxbGXrEny8ZpxvU= 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=XEVJrs2r; arc=none smtp.client-ip=209.85.218.41 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-f41.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso630689966b.2 for ; Wed, 31 Jan 2024 02:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706696444; x=1707301244; 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=DmXpMcL+a4xK2EumucI6WpPkZvFjtLKso9wLeHqAGmQ=; b=XEVJrs2r+nuYOcX7zvgUVad15w4EXtJMwhuwpJ0Vxbv+TjPZZgaPabRXYCodA+zSo4 1sxUAMmk0pf+6aaSbWiQvCLmkrRXsUi5WcOSkaKM7+HqEedwLKVAWf7xwq0JjLDv0RYp YIpBz1mA2o1YFtynVC0SR39xpdI3rVNBFG8UZ0rxVXw/MgxiilO/OmXLH9Zf68cbYR48 kIgnT/cUYOCOI3DvipEWPBrGuu6gAKRpfMuL3ywUrNusCW7jhKzdeI5d55hEsKVYCxRt CRb9lRXEPVaqpPkGG95jrR4R++Mx+3VYiwb3I30lVjBiiWHAehQCBp+Et5K3rQ579kmj Fuxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706696444; x=1707301244; 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=DmXpMcL+a4xK2EumucI6WpPkZvFjtLKso9wLeHqAGmQ=; b=DJm8rdTbCn7/mIBQy9QmVjbkAvVw7GYgEz8a6n0xF5y50o3A8RTYdBBNjtFOwNexMI l3/RSJywXqvDNHF1xB50xyJaDYt/hqqWxlkJF04IzBrkOTcNCFuqPNVkLD3prMtkYLUI h0WoFtz2oiYF4BXiEvOBd8/3AOGcTJbMfWufCPF+feugfZ5mi1bsoohUnKuFD+LS4DBS wxBb55y96LhJ3762sTDcAOaIj8k6hqVm0A3fga4vjAQ/YVG2rxysqnIEUsqQ8X/WnBg7 p/hLW6t7re/6w/GWoyhPLsKSxJ7EkxQnZGpZsYNHqWAE/iaorleIxhOJfrsZ8j85bxMr ZvUA== X-Gm-Message-State: AOJu0YxqNvMv1dIUGs3ApyT3/M55/Ok0MigQUCCyQlybotOI2FSBZe/l Va5Ij8Ht8PlhS9GdYoOnNHDi2YG7ikU+ofGy4Xdp4K0/K8yn7XMAOU4qFYRerlk= X-Received: by 2002:a17:906:c30a:b0:a35:86ce:688a with SMTP id s10-20020a170906c30a00b00a3586ce688amr831060ejz.60.1706696444399; Wed, 31 Jan 2024 02:20:44 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUJfiUSNwUPkkDT9D3tyFM9Vl9zLiMWZOUFyRM6rIof/uQXZIHtxFDLd+1FerYw8jj0kxcx9YU7IGgsNZCa77/VrgZvOode/K8hFwgmjAfa11j9mmq/LBTy4o6irjpFbtvK5JdtazAOPK2DIVsMba5qb8vmPEKU99XBucjzarnjigcIK+YXTvnkdyCFN/2gd3e0G4Sav+iFK/vgPSsbh7uVLBizEJ8S9sXReZbUoyaAaWos98XjA6CMpLXMuL9uIq4pjTw5c6ZcuUbITEhI7IyZSI7WZMm/bR06CgTZRz1lG7scFs/dZMycnStuUEEmjSFQEkoNL5f9aLNof9TZ78NaCDHBx8ddvciMqOljCBSBQMcS6XTI5qqPJh5joe6YfN/PH5E9qbWLZW+kduL42le+rYyahtx9ZStC1yFYx0eDlT0QizBm7LYcV4MjKXpBj1Q1EHkEUyTgjiLXB2LmhDwsVx/Zg9zT5mTe1krzRBBQ0gdUVJlLw86Nt6siU4Ngv3zBxwqIR6LIS0weJCWOgwsfqn23IP23N01/S3N87I+n5IheLHpGlber42dtwGi8fgSpNGYgyIsAIITETpf1wGHP82+UVtYxcu1R4/n7p4T7Mxo= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a3524be5a86sm5212966ejc.103.2024.01.31.02.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:20:44 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, 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, linux-clk@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 10/11] arm64: dts: renesas: r9a08g045: Add watchdog node Date: Wed, 31 Jan 2024 12:20:16 +0200 Message-Id: <20240131102017.1841495-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131102017.1841495-1-claudiu.beznea.uj@bp.renesas.com> References: <20240131102017.1841495-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: 1789618638894197035 X-GMAIL-MSGID: 1789618638894197035 From: Claudiu Beznea Add the DT node for the watchdog IP accessible by Cortex-A of RZ/G3S SoC (R9108G045). Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index 5facfad96158..dfee878c0f49 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -264,6 +264,20 @@ gic: interrupt-controller@12400000 { <0x0 0x12440000 0 0x60000>; interrupts = ; }; + + wdt0: watchdog@12800800 { + compatible = "renesas,r9a08g045-wdt", "renesas,rzg2l-wdt"; + reg = <0 0x12800800 0 0x400>; + clocks = <&cpg CPG_MOD R9A08G045_WDT0_PCLK>, + <&cpg CPG_MOD R9A08G045_WDT0_CLK>; + clock-names = "pclk", "oscclk"; + interrupts = , + ; + interrupt-names = "wdt", "perrout"; + resets = <&cpg R9A08G045_WDT0_PRESETN>; + power-domains = <&cpg>; + status = "disabled"; + }; }; timer {