From patchwork Tue Mar 7 02:46:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 65211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2209229wrd; Mon, 6 Mar 2023 19:06:15 -0800 (PST) X-Google-Smtp-Source: AK7set//jnr5OdQP+bc7jzqkUkVx6CdHkeStnBSHnEgoNEV1cBCTboGexSEt5xuynW3X+s0DDYFi X-Received: by 2002:a17:902:eccd:b0:19c:f232:21ca with SMTP id a13-20020a170902eccd00b0019cf23221camr16752559plh.3.1678158375311; Mon, 06 Mar 2023 19:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678158375; cv=none; d=google.com; s=arc-20160816; b=MGzC25NFJtLzaZH4Jd8/Mmif6Os5CSf3zCwApCXbxwJj13dfT29DCYafVDlHSeBO5H V7nvtBnJYe0q8zUvRVNmCzuh8vdG3tXo5pzzr3X/FAv/zuIhlJ+kydiB0uim3ed+bPjD rEXCvEHyF0Rwz6oSie8goRRYfUT5EFKqmtgiAtmFbI5UJiWAumhBgNH3D9c7GHhHnhsH nNbjEqoTKQJJYkQzgei/jZHh51+DUSfMmlVRgwmwYFXpYch1UTmkx1etbpZ9bEl/QmDO /RoIm28AuHqOEb1fnlM2v+jRsP8z5uZFoCEsQ1Nr0tGbSUE8SQxa/zLIErYz8jqFF6CB Hd/Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BIuY9ixykGsvJYCxucSdL2h0WVZ3fQ/T67/8CnsdCUI=; b=kfAsNOs8Ct1qP2Z1ZN/+DYmT9kaBtOEuYfaGzKSayyaAJPYzuepa/t4chLW/XwkpRh 7SCX+mWDD1gaZ1iBwFPMGcf+FlQf7K0HAFIGMrnd7AmsgjsQCrxMz7h9JT0myBnSIYHt KG82JdYUOScqzbMHXwbJr6pGAaD73yLh8fXCMGDYy2LEEU+bMh37VrLq4Oktt/f/j8NA 3XOBHqUnl9NRdONC3DqSJMq1EKStsS6VYZR0ajoompJqZGW60u7N2Kqv051OiDzYuPl+ +rH1U1d37gT3ECuxgr4ANqizS21UdfyR8pqP7z//vXIv8yunRuvliLuGf5F/9PgHs/Ek 20bw== 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 a3-20020a170902710300b0019639b61586si9676782pll.469.2023.03.06.19.06.01; Mon, 06 Mar 2023 19:06:15 -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 S230137AbjCGCrB convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Mar 2023 21:47:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjCGCqx (ORCPT ); Mon, 6 Mar 2023 21:46:53 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0E165111; Mon, 6 Mar 2023 18:46:51 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id C160424E23C; Tue, 7 Mar 2023 10:46:48 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:48 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:47 +0800 From: William Qiu To: , , CC: Rob Herring , Krzysztof Kozlowski , Jaehoon Chung , Ulf Hansson , William Qiu , Conor Dooley , Subject: [PATCH v5 1/2] dt-bindings: syscon: Add StarFive syscon doc Date: Tue, 7 Mar 2023 10:46:45 +0800 Message-ID: <20230307024646.10216-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307024646.10216-1-william.qiu@starfivetech.com> References: <20230307024646.10216-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759676596152883641?= X-GMAIL-MSGID: =?utf-8?q?1759676596152883641?= Add documentation to describe StarFive System Controller Registers. Signed-off-by: William Qiu Reviewed-by: Conor Dooley --- .../bindings/soc/starfive/jh7110-syscon.yaml | 41 +++++++++++++++++++ MAINTAINERS | 5 +++ 2 files changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml diff --git a/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml new file mode 100644 index 000000000000..72c8850602b5 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/starfive/jh7110-syscon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JH7110 SoC system controller + +maintainers: + - William Qiu + +description: | + The StarFive JH7110 SoC system controller provides register information such + as offset, mask and shift to configure related modules such as MMC and PCIe. + +properties: + compatible: + items: + - enum: + - starfive,jh7110-aon-syscon + - starfive,jh7110-stg-syscon + - starfive,jh7110-sys-syscon + - const: syscon + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + syscon@10240000 { + compatible = "starfive,jh7110-stg-syscon", "syscon"; + reg = <0x10240000 0x1000>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 644ac9479a6e..fc9d1781516a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19665,6 +19665,11 @@ F: Documentation/devicetree/bindings/reset/starfive,jh7100-reset.yaml F: drivers/reset/starfive/reset-starfive-jh71* F: include/dt-bindings/reset/starfive?jh71*.h +STARFIVE JH7110 SYSCON +M: William Qiu +S: Supported +F: Documentation/devicetree/bindings/soc/starfive/jh7110-syscon.yaml + STATIC BRANCH/CALL M: Peter Zijlstra M: Josh Poimboeuf From patchwork Tue Mar 7 02:46:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 65209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2208475wrd; Mon, 6 Mar 2023 19:04:19 -0800 (PST) X-Google-Smtp-Source: AK7set+XrikzVs7BwgoMGZS8qpfzX4TGdW6UG9PmhboAJxXCfEWhKDqGIxT8gsCfSzLni6QwiiLC X-Received: by 2002:a62:3001:0:b0:5a8:d987:d012 with SMTP id w1-20020a623001000000b005a8d987d012mr10666069pfw.11.1678158258748; Mon, 06 Mar 2023 19:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678158258; cv=none; d=google.com; s=arc-20160816; b=z0JNRsP1wiZzD/CqF+zzM2Ak93sOop3gL3c3VYB7mbgGO6c3t82VcreI0tQ7mq3rtS VgKwnUX1tdUk7Bo67NrIZxK3FqEOAS+gchqzuxwedvRk9plKEjtuWnEDCd6mgRAqMsON nRsB1oqt8yuO0kYuFsW5ZORl14vGQYNrutWGBZp4cgjPsFl1VJi9endlbn0kmF7Uy4TQ ubk+yuTRTE6mzgwi5r3dwUyVJLhKv+SnEgC/M151/d77l07hDyWZvy0cKOmFCOSxw+Yl E3SXm4hxuThoW78QlfFyUC+vEcTtFxBI9rkenuKmBr+FW3o6POz+VFAK4PmC9DAVUyWB HdSg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jCCcuYzeW1O6inmr5nM3+ljybE5AxvUPgKB9CxjMvhI=; b=tUaUfzhnVZNAymumAZtJpKcYIJy8cjEfjDqJCDy5hMSUj5wYJ/nZ886uuBtPOUoR+O 6kMWnSCLrDkmqy4BCviR+hyCIWsd3YtnqhM52pb5I5uARKX4AaYHG16dn9YVu8A53uh+ /DRLhp1Z0wxNc702CWawFvCwFBf8KiaLBQajrSEQcaGOXOZncn3f8iromqBIFmm/ceQF 6/ZdZLOHj2Gc1eec2ZmiQme3flLlwoJezpGplRJ7t/ed7FI4ZIhyCgfYnOd6ajDMN25p fkAgzRt/BMtepfdkG7oObuz4/rfkQ0wk9f/jKYXDNL+50ORohHwLhyKz8+8dEKaxOdA6 WEsg== 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 t1-20020a63eb01000000b00502f2846ad0si10817002pgh.840.2023.03.06.19.04.04; Mon, 06 Mar 2023 19:04:18 -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 S230119AbjCGCqy convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Mar 2023 21:46:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjCGCqx (ORCPT ); Mon, 6 Mar 2023 21:46:53 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D56FA69059; Mon, 6 Mar 2023 18:46:51 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 6419824E287; Tue, 7 Mar 2023 10:46:49 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:49 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:48 +0800 From: William Qiu To: , , CC: Rob Herring , Krzysztof Kozlowski , Jaehoon Chung , Ulf Hansson , William Qiu , Conor Dooley , Subject: [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err Date: Tue, 7 Mar 2023 10:46:46 +0800 Message-ID: <20230307024646.10216-3-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307024646.10216-1-william.qiu@starfivetech.com> References: <20230307024646.10216-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759676474335007961?= X-GMAIL-MSGID: =?utf-8?q?1759676474335007961?= Add a incremental updates to fix a bug that prev_err is uninitialized. Signed-off-by: William Qiu Reported-by: Dan Carpenter Reviewed-by: Emil Renner Berthing --- drivers/mmc/host/dw_mmc-starfive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c index 40f5969b07a6..dab1508bf83c 100644 --- a/drivers/mmc/host/dw_mmc-starfive.c +++ b/drivers/mmc/host/dw_mmc-starfive.c @@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot, struct dw_mci *host = slot->host; struct starfive_priv *priv = host->priv; int rise_point = -1, fall_point = -1; - int err, prev_err; + int err, prev_err = 0; int i; bool found = 0; u32 regval;