From patchwork Tue Mar 14 12:43:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 69614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1750446wrd; Tue, 14 Mar 2023 06:14:44 -0700 (PDT) X-Google-Smtp-Source: AK7set8D2yRbB638phqWSDGK0JnLVDOXJxE55XJ8AG/Bql0vhFWfdTHxkFFf103rMnkLqpspDxmO X-Received: by 2002:a17:90b:3508:b0:23d:4a40:e794 with SMTP id ls8-20020a17090b350800b0023d4a40e794mr391567pjb.10.1678799684219; Tue, 14 Mar 2023 06:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678799684; cv=none; d=google.com; s=arc-20160816; b=AhmgjCkVblvNyBK7E6M9gDRGeTJyKuw37DZxAYKnIyAYxinJc6dgLHS9BqfgnOrQFj 5V55/n3MlIobstz01L5np3iFQkwoFp5gUAfrD0z1tYOehEnXmaAxJ8GYwJ5PbbaK4xGz xOxoHwUKJe5aeyU/tYsIN88OgemWpYa1O14ldfSIHqapxV7Aca15CzwA4SH5Vvgs5wpD sT/Uj03pLT4CJtnVzQfjb4TUrJRkol/ule8lg4uGPza+fexV3Yuzke2wacSxzovXiirn m+Iyp0InpXeZoWMjZ+4+5IWZBT1RKI865cBv8Cjn6dufTcD8Bfab+4GweASedS0vHU+6 kCOQ== 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=c8cBvxTqAhtuuRWh+HENugMcljWQnJQ+84Xtx9WU+3s=; b=yoLLvteuU6G/kSO7WmmfSt+m78AdzwLEj5SevqUKn1YjT0kf5mVP5nbSblxi5Ej9zz ZsVMEC+71Bu/sdPhpnz0H10IIu2RfG6qO5xl/EqILpgnY/nBj6QrGdJgsiA7D8kCM2s4 m2hA7oxTkRJmSU81V37vb7Xk8mNM4wAHCDHH9S78UsXQWM+lUnx4V9Tch/vXXLkWQj6Q gOEeS778plft337p3wQNOUq8c6ZND9C1U7dkqoqfAbSlMAoLF4yqKk2Ma2VSDxlNRHKM +tHGe9CkawcEg5ZJaJ8k8FnlJxMG1tybNHRJ3CJwBornVNSSV+XBEvxVFY2jQXiwPQlq BuHA== 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 p2-20020a170902780200b0019e8928b3besi2428790pll.248.2023.03.14.06.14.31; Tue, 14 Mar 2023 06:14:44 -0700 (PDT) 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 S232413AbjCNMwa convert rfc822-to-8bit (ORCPT + 99 others); Tue, 14 Mar 2023 08:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232395AbjCNMwD (ORCPT ); Tue, 14 Mar 2023 08:52:03 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0522A8C7A; Tue, 14 Mar 2023 05:47:53 -0700 (PDT) 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 D7DA624E3C6; Tue, 14 Mar 2023 20:44:07 +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; Tue, 14 Mar 2023 20:44:07 +0800 Received: from localhost.localdomain (113.72.145.194) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 14 Mar 2023 20:44:06 +0800 From: Xingyu Wu To: , , "Michael Turquette" , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel , Emil Renner Berthing CC: Rob Herring , Conor Dooley , "Paul Walmsley" , Palmer Dabbelt , Albert Ou , Hal Feng , Xingyu Wu , , Subject: [PATCH v3 02/11] reset: starfive: jh7110: Add StarFive System-Top-Group reset support Date: Tue, 14 Mar 2023 20:43:55 +0800 Message-ID: <20230314124404.117592-3-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314124404.117592-1-xingyu.wu@starfivetech.com> References: <20230314124404.117592-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.145.194] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) 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?1760349057669136140?= X-GMAIL-MSGID: =?utf-8?q?1760349057669136140?= Add auxiliary_device_id to support StarFive JH7110 System-Top-Group resets of which the auxiliary device name is "clk_starfive_jh71x0.reset-stg". Signed-off-by: Xingyu Wu --- drivers/reset/starfive/reset-starfive-jh7110.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/reset/starfive/reset-starfive-jh7110.c b/drivers/reset/starfive/reset-starfive-jh7110.c index 4ccb3f72ca83..2dc46d91a244 100644 --- a/drivers/reset/starfive/reset-starfive-jh7110.c +++ b/drivers/reset/starfive/reset-starfive-jh7110.c @@ -29,6 +29,12 @@ static const struct jh7110_reset_info jh7110_aon_info = { .status_offset = 0x3C, }; +static const struct jh7110_reset_info jh7110_stg_info = { + .nr_resets = JH7110_STGRST_END, + .assert_offset = 0x74, + .status_offset = 0x78, +}; + static int jh7110_reset_probe(struct auxiliary_device *adev, const struct auxiliary_device_id *id) { @@ -55,6 +61,10 @@ static const struct auxiliary_device_id jh7110_reset_ids[] = { .name = "clk_starfive_jh71x0.reset-aon", .driver_data = (kernel_ulong_t)&jh7110_aon_info, }, + { + .name = "clk_starfive_jh71x0.reset-stg", + .driver_data = (kernel_ulong_t)&jh7110_stg_info, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);