Message ID | 20230220081926.267695-1-xingyu.wu@starfivetech.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1190104wrn; Mon, 20 Feb 2023 00:22:03 -0800 (PST) X-Google-Smtp-Source: AK7set8A5eNPvnmVw6UZaqbao23P8qMy44669knvQB/p9rtBt5OLMGFdki0U3M/9lmKXSHY6Bxvo X-Received: by 2002:a62:1a57:0:b0:58d:d546:8012 with SMTP id a84-20020a621a57000000b0058dd5468012mr1982530pfa.0.1676881323149; Mon, 20 Feb 2023 00:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676881323; cv=none; d=google.com; s=arc-20160816; b=J/CQfG+F2r/bgOSIJsPn1JusCCPxdpc0ygmDW4Is/kpn4o3PSsNdmS+X4rcChMBUFD 7TxnmC6j2pcBT+rddmUSMUZO3sU2jr+dBGmzBLf8sBr18iGm6vh7IqSd+kcHqeeiNtFw vY8N+5LumEWZtDJ2lThuonr+FJJ23dWocqpyGrTvOlOOa77DtmhbD/jXkdGbe39bHA9V qmEvITufROPi8+wOSlAqIFEUC1JSFFiEdlYsqUg+xspTkiX3H5viHjAmN6d70xz42aiC GobHFZ5hKQ2U1uIa7NfqvhIZEg8gpFFaDXqBPbLfdwKZeXCCxu77OSptdfOUM+aJ6YQ8 DXxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Y7VCfHOB3Lu4CauVVTsPLuCljF/FJyZ8S8QzxY3jTIo=; b=wwAlq7XPJgn+wfNa2z9wU0nICnjaqh3PzbAyEKww91eEqoaNWtlB9z3GtpsUy0ey5c BTKFZnxwbm8A2eswM/SENECs1z8qNPyQpJt9pZD6dmFGSEaTKgqBmy3EORtQcKlF2bvD hU3W4HX3Y5ZKuwd7gwG7teVGDw0/mwC3kYflxS9KLoCgtDeSHoEb/Pi9wmFeumwlklD6 B2ZZvj5FQGpfONq34ioIdWu+DSVsdp5ZYtE7XeSWlFea7Ui4WLBwqs18BGp9rk39N0Cd iad4ugsK/GAX7PvYWrCGGZuuZZHElDS+n2ZDPqbGDkDWNvUcUrQuugUHwrFw5EBERkyM WICA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a62cd04000000b0058623296e77si11131042pfg.327.2023.02.20.00.21.50; Mon, 20 Feb 2023 00:22:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbjBTITK convert rfc822-to-8bit (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Mon, 20 Feb 2023 03:19:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjBTITG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Feb 2023 03:19:06 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFE53FF24; Mon, 20 Feb 2023 00:19:02 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 1832C24E2BC; Mon, 20 Feb 2023 16:19:01 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 20 Feb 2023 16:19:01 +0800 Received: from localhost.localdomain (183.27.98.67) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 20 Feb 2023 16:18:59 +0800 From: Xingyu Wu <xingyu.wu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-watchdog@vger.kernel.org>, Wim Van Sebroeck <wim@linux-watchdog.org>, Guenter Roeck <linux@roeck-us.net>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> CC: Rob Herring <robh+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Philipp Zabel <p.zabel@pengutronix.de>, Xingyu Wu <xingyu.wu@starfivetech.com>, Samin Guo <samin.guo@starfivetech.com>, <linux-kernel@vger.kernel.org>, Conor Dooley <conor@kernel.org> Subject: [PATCH v3 0/2] Add watchdog driver for StarFive JH7110 RISC-V SoC Date: Mon, 20 Feb 2023 16:19:24 +0800 Message-ID: <20230220081926.267695-1-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.98.67] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758337510293138025?= X-GMAIL-MSGID: =?utf-8?q?1758337510293138025?= |
Series |
Add watchdog driver for StarFive JH7110 RISC-V SoC
|
|
Message
Xingyu Wu
Feb. 20, 2023, 8:19 a.m. UTC
This patch serises are to add watchdog driver for the StarFive JH7110 RISC-V SoC. The first patch adds docunmentation to describe device tree bindings. The subsequent patch adds watchdog driver and support JH7110 SoC. And the addition of device tree node will be submitted after the JH7110 dts merge. This patchset is based on 6.2. The watchdog driver has been tested on the VisionFive 2 boards which equip with JH7110 SoC and works normally. Changes since v2: - Added watchdog.yaml and unevaluatedProperties in the dt-binding. - Removed some unnecessary include files. - Changed the 'module_param' name and dropped 'soft_noboot'. - Rrmoved 'CONFIG_OF'. - Added a check if clock rate is 0. - Modified the max_timeout calculation formula. - Removed restart function. - Removed duplicate checks on the upper and lower bounds of 'count'. - Removed 'started' variable. - Added pm_runtime_get_sync() and pm_runtime_put_sync(). - Removed 'firmware_version = 0' variable. - Drop the device tree node commit. Changes since v1: - Renamed the dt-binding 'starfive,wdt.yaml' to 'starfive,jh7110-wdt.yaml'. - Dropped the '_clk' and 'rst_' about the 'clock-names' and 'reset-names' in the dt-binding. - Updated the example context in the dt-binding 'starfive,jh7110-wdt.yaml' to be independent of other patchset. - Deleted unused macros like 'JH7110_WDOG_INT_EN'. - Changed the type of 'freq' in the struct from u64 to u32. - Used 'devm_clk_get_enabled()' instead of 'devm_clk_get()' and 'clk_prepare_enable()'. - Removed the operation to get the frequency from the device tree. - Added watchdog_stop_on_unregister() and watchdog_stop_on_reboot(). - Removed any operations about interrupt. v2: https://lore.kernel.org/all/20221219094233.179153-1-xingyu.wu@starfivetech.com/ v1: https://lore.kernel.org/all/20221202093943.149674-1-xingyu.wu@starfivetech.com/ Xingyu Wu (2): dt-bindings: watchdog: Add watchdog for StarFive JH7110 drivers: watchdog: Add StarFive Watchdog driver .../watchdog/starfive,jh7110-wdt.yaml | 74 ++ MAINTAINERS | 7 + drivers/watchdog/Kconfig | 9 + drivers/watchdog/Makefile | 2 + drivers/watchdog/starfive-wdt.c | 651 ++++++++++++++++++ 5 files changed, 743 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/starfive,jh7110-wdt.yaml create mode 100644 drivers/watchdog/starfive-wdt.c base-commit: c9c3395d5e3dcc6daee66c6908354d47bf98cb0c