Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4749626rwb; Mon, 8 Aug 2022 06:31:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4KN5LcxNPMq7MNfFsOBy+bVdySMdX+NdeqloqQG18SyMNeKmEfhN/9HMm/Qn2/UoVVhE+f X-Received: by 2002:a17:90a:f48d:b0:1f7:2e00:f7f8 with SMTP id bx13-20020a17090af48d00b001f72e00f7f8mr10388715pjb.94.1659965477284; Mon, 08 Aug 2022 06:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659965477; cv=none; d=google.com; s=arc-20160816; b=BD6OqBpqgyVRktjMZfR7YcDvc3xyxr7zKjZXbnF5Pbs9JJ0VyFBLOPN2CYlBxq7Mf6 I3L/ymBNLTFxfjZSk+T1Viv1UC7IJWY/N8nAXMQKZOQfzJLb9v7BQKjdWlJBLZf0y6xk 22y++xg/m+jeHXMmsWmeDq6wYWeHRGK/LR6T1jZfb/VZ+DpOXmFtWA6lJ6iDBwABm/jI 3ygvyN3V6imWts0iWVM/hXWnhqJUtNVQXaHQoQHC+VUSh9n4BM6dXDdKGx+uK5KoAWEp sqEQv2DcAna2+RFFAzkstkxLLEpzYza7Ke/tHQVeULm4APkLvl3+3XLE+bQxwpZOntaZ amBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kuwKOcuHMSa3dQs4wZk02jLSCcVnoSCO8BTxrJsZ3Y4=; b=gmjqKd5glhO693zMfj5lSQ1BowLR2UytBpzA39aSTHKuH7L5J+5G/1Gpf3P+60eATG mqRruCfjK1NySW3/rsIQKK14GfFlmxVXT6uKdluWgBXzIkTuaRiDZGvRhCU6ys/hF4zM iPcjrhMZr+HokNAZ2uTlAp+vjxCpXbZOJmBX5R0o0//KVuGLd0E0dzQEaweI1FNGBmeQ YwaReb4U6ifF9LTYpbKVt2/9Zpf3nPx4AZEKnWCHEdwygRu1YEuV6FP4L8NunZ8f9eWq 8JFUveM3OtK+LvTUiLhH6XohHT/iu4JndbfpPnxODE/8HuAeKzj0qy/RlAiXzc3a/o6v 1FDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IYwHZ8LA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170902e54b00b0016d6e9cb213si15100013plf.564.2022.08.08.06.31.01; Mon, 08 Aug 2022 06:31:17 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IYwHZ8LA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243106AbiHHNIY (ORCPT + 99 others); Mon, 8 Aug 2022 09:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbiHHNIX (ORCPT ); Mon, 8 Aug 2022 09:08:23 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00F785FC3; Mon, 8 Aug 2022 06:08:21 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id v2so3953756lfi.6; Mon, 08 Aug 2022 06:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=kuwKOcuHMSa3dQs4wZk02jLSCcVnoSCO8BTxrJsZ3Y4=; b=IYwHZ8LA2fZ7gErBWUeZRWrXrXcZ6uS3hcMeDarJm6ToovrHlgcqqP/eWdXpacp202 xwIn6d7/Luovgbo/HgFzReARSGvhONTCDx3JdOr1llSLDhQvdWzfS1mN9sl34zCdZJNd 1DsRdBdoDF92Eradj/s/i375nOTe+T1T7Ep8I2/DuzbVE16Hxdl/6cIyXh02/TY/roNi W/zIpQ6rXCnZTLS+TJPf7acziyb2sJboIX+OLKAvLwFm5y6kABAFEV2ync5FcUqoMnIa kW9ueMp78HO9crFMJURQp9Zi7SAyTfOTP0Rqk41mQXUhVvc/gy/Z+cgBDOe27t6VLZM8 N+rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=kuwKOcuHMSa3dQs4wZk02jLSCcVnoSCO8BTxrJsZ3Y4=; b=FmtHphtqTPjVu33qb9c921RBQChXSsn/7LaG47eH4tZb9Rr5PUvAGrl9uHmlzdxQeJ ok5/dGhGH6zBTgK9vpVyDAG+YpKAZFE49FEmasJq7sXWWTvPlXkmEa8tLgIx/qgpke9i YcQhiAhqMpWOcLfAjCwEaPrxw42bEzTiy7W90Srhg4HzIxUdfqot7ffFs//Lsv9VfqYQ FURJpSxVBsRq60ka0ysdxsYE5kM+MuKQ8lLPfZ4iLL5jLbN7I/9Ctw43CIQoGusENWB3 MCyJkcdn66FRLF2mefltlJeTVKJLXIsDoFVohJJBaflqffTT64LlnFlWsDToH+J6bPGh GgvA== X-Gm-Message-State: ACgBeo27Su7+SjptgJdQb5t9yxO3s8q4HGnMX5WaM6X2y1swVNKR72jG pzQTJz9Mw/6HxU+LwJ6Ev5TfUw/72sllrusMDlg= X-Received: by 2002:a05:6512:168b:b0:48a:9f4a:9d37 with SMTP id bu11-20020a056512168b00b0048a9f4a9d37mr6462916lfb.576.1659964100152; Mon, 08 Aug 2022 06:08:20 -0700 (PDT) MIME-Version: 1.0 References: <20220711123519.217219-1-tmaimon77@gmail.com> <20220711123519.217219-5-tmaimon77@gmail.com> <20220711195544.70A30C34115@smtp.kernel.org> <20220718191454.5B5D3C341C0@smtp.kernel.org> <20220723030226.8E43CC341C6@smtp.kernel.org> <20220729225603.12528C433D6@smtp.kernel.org> <20220804200549.60512C433C1@smtp.kernel.org> In-Reply-To: From: Tomer Maimon Date: Mon, 8 Aug 2022 16:08:08 +0300 Message-ID: Subject: Re: [PATCH v8 04/16] clk: npcm8xx: add clock controller To: Stephen Boyd Cc: Arnd Bergmann , Avi Fishman , Benjamin Fair , Biju Das , Bjorn Andersson , Catalin Marinas , Daniel Lezcano , Geert Uytterhoeven , Greg KH , =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= , Jiri Slaby , Joel Stanley , Krzysztof Kozlowski , Guenter Roeck , Lubomir Rintel , Marcel Ziswiler , Michael Turquette , Nobuhiro Iwamatsu , Olof Johansson , Philipp Zabel , Robert Hancock , Rob Herring , Shawn Guo , Tali Perry , Thomas G leixner , Patrick Venture , Vinod Koul , Will Deacon , Wim Van Sebroeck , Nancy Yuen , devicetree , Linux Kernel Mailing List , linux-clk , SERIAL DRIVERS , LINUXWATCHDOG , Linux ARM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Hi Stephen, Sorry, just to make it clear. On Mon, 8 Aug 2022 at 15:37, Tomer Maimon wrote: > > Hi Stephen, > > Thanks for your reply. > > On Thu, 4 Aug 2022 at 23:05, Stephen Boyd wrote: > > > > Quoting Tomer Maimon (2022-08-04 07:01:30) > > > On Sat, 30 Jul 2022 at 01:56, Stephen Boyd wrote: > > > > > > > > Because it is jumbled in some range? > > > Yes. > > > > > > > > > > > > > > I do see a way to combine the clock and the reset driver, the NPCM > > > > > reset driver is serving other NPCM BMC's. > > > > > Should we use regmap to handle the clock registers instead of ioremap? > > > > > > > > Sure? Using regmap or not looks like a parallel discussion. How does it > > > > help use platform APIs? > > > I mean to use regmap API instead of platform API for handing the clock > > > and reset registers. > > > the regmap API gives only one user access to R/W (lock). > > > I will be happy to get more suggestions, on how should we solve this situation. > > > > > > > Using platform APIs means using platform_*() functions, not of_*() > > functions, which are open-firmware/DT related. Regmap can be used to > > operate on registers mapped as __iomem, which is different from platform > > APIs. > I will use platform_get_resource() and devm_ioremap_resource() > functions in the next version. I will use platform_get_resource() and ioremap() function next veriosn, is it fine? > > > > > Is having a lock even necessary? Do the reset and clk controls live > You are right, lock use is not necessary. > > within a shared register where we would need to prevent one driver from > > accessing that register at the same time as the other? > reset and clk drivers are living fine with shared registers, we don't > need to handle the register access between the clk and the reset > drivers. > > Best regards, > > Tomer Best regards, Tomer