Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1690287rwi; Thu, 27 Oct 2022 20:15:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5dNIlDaDlZP2QQpDswMmVN9srrhp0Tt/mAOXlLmLGE8N7uHKVD+XjHJSzXC1B6/KnbdOQe X-Received: by 2002:aa7:dc06:0:b0:461:b683:5fba with SMTP id b6-20020aa7dc06000000b00461b6835fbamr23384383edu.72.1666926921307; Thu, 27 Oct 2022 20:15:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666926921; cv=none; d=google.com; s=arc-20160816; b=bdItw186dGkI50vuPwMgfNP29eSqxvNLynB+9lbRgOoIUMN9tXL7Q3YbsHrj8SCQ6M CouSoBWZwbhwHvW8IZpbxdQilIElj6R0e74velmKQIDdG55eB1YvwO0Ug6uvV/oPd/2Q 9P7zYYah7kxHrUaOrACiR1GLaFWVLJgiq1XMr5+3lYWr/trFcuTf5OAFBk0PuAyEXDBk D/eq0tlZR86P3XJNlexh30vWEPkdU0IuFmq8JxKIOuWbhiCFHKoEPicOfgtiTZSpSWQM uhSanyBKpwvAvhaq54Jku/R0k4HTtNCQ7odGhQRGAbPTZbiDwW3kQwQ0i6mNL++qF3eB fwWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id; bh=thZtvRH3JEGs6J//70LBJ2M1R/Zwc7Qcjfq/tkCHCUQ=; b=mjXGCUz2c7R6WPXmnSe9mw95o5oxO3YAa4fqhUxRMQXMxUlptkxtN6YdOLR3+s2pM8 NVk3kEZ9gzwOdm7A8nk3wgeVvKk1CYtgl5yOkLZiRQwUoZT98y75luGwSGfHSG41gs8o zKnzuHmkMST8FaG93dy8Gr504LpHGyqeoon1s12YCyKSmAq6FKWSe+Sgdc+dJ5dkO/Xo 6v18dFFLMlpKlbXFSKg+/rGwkTfUVU18eceE4YKA81XT8fgCFX1M2WXWpRGVohhTodDF iKaM645sP8M3DAY7oQ3ADziRXGgGGeFhIRszVw8DGTItQ0fo2hrD1nDkanmHUgr68SSD ymjg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb37-20020a1709071ca500b007919d2f6517si3640135ejc.737.2022.10.27.20.14.55; Thu, 27 Oct 2022 20:15:21 -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 S235577AbiJ1Cq7 (ORCPT + 99 others); Thu, 27 Oct 2022 22:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234884AbiJ1Cq5 (ORCPT ); Thu, 27 Oct 2022 22:46:57 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A19DA9F34F; Thu, 27 Oct 2022 19:46:55 -0700 (PDT) X-QQ-mid: bizesmtp77t1666925205trdp212h Received: from [192.168.125.106] ( [113.72.144.82]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Oct 2022 10:46:44 +0800 (CST) X-QQ-SSF: 01000000000000B0B000000A0000000 X-QQ-FEAT: vqhsT3OOnzRLiM/g5o2j2J4W/+or9KnaRTkPOvebYDLsCzhWkN0QrHZbnLoVo M/MhoZK0UtjJIzkdUkWy4KmfRps7PNjYdykPWjVgdeMBJDreHNWrZMezfqTdsGEQquL+rFb bmLVfCjfEiL/+WJfDfk3jvnIf+Mtl4nNT2g+DLQWcFIuhFdJIyG9shL42UPYIg2EYp8oML4 j1tm8oPF9yK8KRRh1/eEQ/iVfNvLwQa5yq1FdOiprbOuuaq5NwJ5mrXE0UKN3NpH62Yiu76 oFMMYkeOM98R+3htFcuNmJl2IKijsoe/pbTbXo1LF2dk00BGpQzOL4MnonpcpXB7qW+C8e4 q1v0Idjt3wIZ5is6IV5KeliQKK7/6UH3LpI8VYY X-QQ-GoodBg: 0 Message-ID: <44B201EE232142D8+724bfbd1-f1aa-a13d-fd38-655df7d7036e@linux.starfivetech.com> Date: Fri, 28 Oct 2022 10:46:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v1 15/30] clk: starfive: Use regmap APIs to operate registers To: Stephen Boyd Cc: Emil Renner Berthing , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-riscv@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Philipp Zabel , Michael Turquette , Linus Walleij , Emil Renner Berthing , linux-kernel@vger.kernel.org References: <20220929143225.17907-1-hal.feng@linux.starfivetech.com> <20220929175602.19946-1-hal.feng@linux.starfivetech.com> <20220930214824.A14ACC433D6@smtp.kernel.org> <20221012230525.C6E58C433D7@smtp.kernel.org> <07B628ED6CABEF1D+932737cc-7d4b-4071-531e-82f88d89a872@linux.starfivetech.com> <20221027012605.B6769C433C1@smtp.kernel.org> Content-Language: en-US From: Hal Feng In-Reply-To: <20221027012605.B6769C433C1@smtp.kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:linux.starfivetech.com:qybglogicsvr:qybglogicsvr2 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no 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 On Wed, 26 Oct 2022 18:26:03 -0700, Stephen Boyd wrote: > Quoting Hal Feng (2022-10-22 21:11:41) > > On Wed, 12 Oct 2022 16:05:23 -0700, Stephen Boyd wrote: > > > I think we should use auxiliary bus and split the driver logically into > > > a reset driver in drivers/reset and a clk driver in drivers/clk. That > > > way the appropriate maintainers can review the code. There is only one > > > platform device with a single reg property and node in DT, but there are > > > two drivers. > > > > Yes, I agree that the reset driver and the clock driver should be split. > > However, I think using auxiliary bus is a little bit complicated in this > > case, because the reset is not a part of functionality of the clock in > > JH7110. They just share a common register base address. > > That is why auxiliary bus exists. > > > I think it is > > better to use ioremap for the same address, and the dt will be like > > > > syscrg_clk: clock-controller@13020000 { > > compatible = "starfive,jh7110-clkgen-sys"; > > reg = <0x0 0x13020000 0x0 0x10000>; > > ... > > }; > > syscrg_rst: reset-controller@13020000 { > > compatible = "starfive,jh7110-reset-sys"; > > reg = <0x0 0x13020000 0x0 0x10000>; > > ... > > }; > > > > What do you think of this approach? I would appreciate your suggestions. > > > > We shouldn't have two different nodes with the same reg property. Please > ioremap in whatever driver probes and creates the auxiliary device(s) > and then pass the void __iomem * to it. Okay, I will use auxiliary bus for clock and reset driver on the next version. Best regards, Hal