Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2383208rdb; Mon, 20 Nov 2023 09:21:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmb1YpG4rhX9ssxozzay8uAuAZyxrXgZow3sSENCfcLzAVXLk1d+x7CiuPYmfrVVlGnNI/ X-Received: by 2002:a05:6a00:9a1:b0:6cb:a18a:22b5 with SMTP id u33-20020a056a0009a100b006cba18a22b5mr3181109pfg.2.1700500886256; Mon, 20 Nov 2023 09:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700500886; cv=none; d=google.com; s=arc-20160816; b=X0Iys9eotF0sXloWsevCPo8mL8zLKunCkqWQGKXkD9Qe66L1/q8W7jAwiKypxFjJ5L YCoeXCuzYSKb553o+ZfjGzwkGdo/OoZtUt7YJI6C2VzbPDbQNhNeYYlHtyXSpWsaSjuV mL06NFy1YzCMQw1IaY4QyKuPzWtmP61HZIHv7zdXUKeDEyKkIr4wSTrHXjhs4wQK8Gd0 Nv/JwHAzGbFrnteV8xrvMn1G0U4U5h5uTjS1omkqaYHa8gVgWqP8Z57JethIohRMj/fe Ks+d/MRUvLqhRcRo9ixRlC6wM/B+0W96rLAleV+/CLd5wfYg2F38m3IEHCvhcLvmPpXW 0tlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=R82qYWgHzyabWKd11HpcZVo2+/o3FL2YzV126Cd5vsM=; fh=EnQhkFMB0jkFsK+Gxi9DaBXkFMbXTmx+Gc1S6CvmAbA=; b=ZYvl1aN4wbb9O0Ql7bJN3UxeAuCzIT1Wlpg2kG83ddKfredPuqcCeU+CAIwhrdfU4t wf0ic6DdJwaqtD6t5Rq8N5nwpSsBV9CedcPzjm7p8c3eGsU+pC6JH4e378+DGal3XiaL N6Yq588UeEH2qGjwJp2esBYI0MleThZ5FIgCMJMgFCNf4YGwkCGDWrZ4CWhZzo5qbYSh pnnPfz8ijRDy/+aDA0p/YWBLw27gEUpxAr6em3giqTnW4fFyvtzH8WvP2Q5Q/2HKG5n9 UcxjdhBxrisgwIKbtqgdUGv7oi8zebalA9omLoBw+OQqC2iTT/4NO19aogmHPbvPKefH KBUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ntX58tdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x124-20020a626382000000b006cbb804ad46si500244pfb.242.2023.11.20.09.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ntX58tdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D4AAA8084966; Mon, 20 Nov 2023 09:20:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233564AbjKTRUH (ORCPT + 99 others); Mon, 20 Nov 2023 12:20:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233728AbjKTRTw (ORCPT ); Mon, 20 Nov 2023 12:19:52 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0744D124; Mon, 20 Nov 2023 09:19:49 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1cf669b711fso5001095ad.2; Mon, 20 Nov 2023 09:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700500788; x=1701105588; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=R82qYWgHzyabWKd11HpcZVo2+/o3FL2YzV126Cd5vsM=; b=ntX58tdBFmujOOIPdK2U5cvqgj2F3uz5vb0JnpXSNJxOducsyUX7NnOk2x0Oo6zxus puDkmnaGIazspUr6og9sNXj4HMZsjb4PnHrudMBMu3ThRAxqlQhkFXhh/8s0yGUkMOy+ QNFH3oswyyIdqXbIjXyFN7zYeRy/80dBCJqwVJXmEyaFBJC9p2B1Xpk1DZMgvxvbuosw OOwhY/1e0kU8rVLFEzGdjeYd8MPYzf/idQXaiGeBsg36D3mZ6hO6iiBAB70F5gJkXPQP wteL4ZxFw1ySSxANse2LfJqegp0nw2j/GoxqUWg6BFlMPgyrGWXpfK+C2doc2nVWqqnh Sy/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700500788; x=1701105588; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R82qYWgHzyabWKd11HpcZVo2+/o3FL2YzV126Cd5vsM=; b=hhcmwz5jT21uLX0RFqASfVV8hwo3XqPptDU+gBYBsr1puNxhdfhEEXRPaEvrD/uYzy 316dpN/H2i5JbPaFnDi3MRG1nD+WJQ9fblcYvhxuMavD+ew9WOqWPNfZqtGsvOyiFZNB oWWGUUIqLRnCoRyTUBDgaB8vnudvSm2/Z5XGE4ut3EOSoEGof/RauS7YP6wdEN/DB470 zMHkujD5pvwu4BNdNJv/ZbIuFPO9Tjmqme7/peQQzlBVOmQnm0AguICSIVhrOwvzxhA0 TiLVChsrNEXYNe4UT+BR2nxG0LQfEf0MhrtPCa2XngXwJbAbpLN+MPiBfGbVzde3tDTM NHNA== X-Gm-Message-State: AOJu0Yw4hkW8bUsZNLhsBtpmNFkIM1nU7cIz13arkWw5bSbVr0DBPQQA CdlFOEDYNwYtuj3B0iV86DkDkzQJljs= X-Received: by 2002:a17:902:7c8f:b0:1cc:3de0:bcc4 with SMTP id y15-20020a1709027c8f00b001cc3de0bcc4mr5706484pll.44.1700500788281; Mon, 20 Nov 2023 09:19:48 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id h18-20020a170902f7d200b001cf5d425244sm2420579plw.298.2023.11.20.09.19.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 09:19:47 -0800 (PST) Sender: Guenter Roeck Message-ID: Date: Mon, 20 Nov 2023 09:19:46 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] watchdog: mediatek: mt7988: add wdt support Content-Language: en-US To: Daniel Golle , Wim Van Sebroeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <4d7db8786dce35273db516f3d41228bc27a08fe9.1699980962.git.daniel@makrotopia.org> <3f5ed9656ea66637d259e9771ed852511369ba9b.1699980962.git.daniel@makrotopia.org> From: Guenter Roeck Autocrypt: addr=linux@roe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DyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <3f5ed9656ea66637d259e9771ed852511369ba9b.1699980962.git.daniel@makrotopia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:20:42 -0800 (PST) On 11/14/23 09:04, Daniel Golle wrote: > Add support for watchdog and reset generator unit of the MediaTek > MT7988 SoC. > > Signed-off-by: Daniel Golle > --- > v3: fix wrong function parameter name in kernel-doc comment > v2: call new toprgu_reset_sw_en_unlocked from toprgu_reset_update while > holding lock. > > drivers/watchdog/mtk_wdt.c | 40 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c > index b2330b16b497a..3b4ee7185feed 100644 > --- a/drivers/watchdog/mtk_wdt.c > +++ b/drivers/watchdog/mtk_wdt.c > @@ -58,6 +58,8 @@ > #define WDT_SWSYSRST 0x18U > #define WDT_SWSYS_RST_KEY 0x88000000 > > +#define WDT_SWSYSRST_EN 0xfc > + > #define DRV_NAME "mtk-wdt" > #define DRV_VERSION "1.0" > > @@ -71,10 +73,12 @@ struct mtk_wdt_dev { > struct reset_controller_dev rcdev; > bool disable_wdt_extrst; > bool reset_by_toprgu; > + bool has_swsysrst_en; > }; > > struct mtk_wdt_data { > int toprgu_sw_rst_num; > + bool has_swsysrst_en; > }; > > static const struct mtk_wdt_data mt2712_data = { > @@ -89,6 +93,11 @@ static const struct mtk_wdt_data mt7986_data = { > .toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM, > }; > > +static const struct mtk_wdt_data mt7988_data = { > + .toprgu_sw_rst_num = 24, Kind of odd to have this defined locally, while the others are in include files, but not worth arguing about. Please make it a define at the top of the file, though. Thanks, Guenter