Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4706133rwb; Mon, 8 Aug 2022 05:55:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Cmanrz0nAO/63M85biYoTzFSlzp0rCzA47RMfJIu69aTqh53r3jw0xPa9D9XD38t3Q+H7 X-Received: by 2002:a17:907:8a1a:b0:731:6475:68f7 with SMTP id sc26-20020a1709078a1a00b00731647568f7mr2767679ejc.359.1659963341129; Mon, 08 Aug 2022 05:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659963341; cv=none; d=google.com; s=arc-20160816; b=fXwnrXyK8+EXQYJTu6u4XIJtkke3m0suD4g1UwosJWIJc/aRJrmbX+ADKK2Hq08dHB h9uqwa4weQVecyh/sA9gE1ovqG1AtnSkhJZHfyxq6iCmqbQOXNJmfyA7Mmfy4nHla+EY zCZs4sXyfF8U8E8wD/quyi9CLP0f+rqf2jO1MXhv1hCLdZImfGUH35LtosAbz8FicREX q2A/lWnrETym0IqlOi1+V4/5CNRxSk/mn+ES1fbUhcFFapa/S8XzIllvjKKS9tGLYu2A cu1D3IxQIH7j621gbzrMrZFyqsYel8f6QWqOFro26LpkGu3fqcBhNAob6aMqE9upLIlG ZlJQ== 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=/MHU6eLy/HH6PnrXo470+5XMlsFXh1eKam/uKQ3OWjc=; b=xzhH6qp0q9S4YL1F4f/73aiAPhBE0J62beVavmORlzdibxAgK1TbhHaIqmOO1GrA86 PJQcYqiDOr/MycKYa7Bz/rr71GmLysddfU5Nfx25OVltoWYLVea2Pt7OC0A1kXi7fbYT hmmc7AWvJFV2nvGJ43tnR/8ffj3jqemtfpxW5P3SoTv0XgsqL4TzMYmlooedF2C8y1iB i0ystRgqAQ51kL/oe5AfhKDJOcrGIBq5E8FOTUlUdBNWvhFr9owqNfrmXlbK7ilQYGEi X9RDGnHRwMnxBDCNW6s2u1xQ3tb5TB+K9GFsI+jHPkXSYW3w6NFKHkmFaZeKfU+d7m1s KuWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HkQQdjli; 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 qk15-20020a1709077f8f00b007310a8a411csi3093412ejc.843.2022.08.08.05.55.15; Mon, 08 Aug 2022 05:55:41 -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=HkQQdjli; 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 S242074AbiHHMhU (ORCPT + 99 others); Mon, 8 Aug 2022 08:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232981AbiHHMhS (ORCPT ); Mon, 8 Aug 2022 08:37:18 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56086AE60; Mon, 8 Aug 2022 05:37:17 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id r14so9677838ljp.2; Mon, 08 Aug 2022 05:37:17 -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=/MHU6eLy/HH6PnrXo470+5XMlsFXh1eKam/uKQ3OWjc=; b=HkQQdjli/MeTyeCv25A1kZqw2Jlhf/xncGOTm1Zf1lUG9Z9b3QQZoMgcxLY8SXqGXE FbUvss9tHtCdiJV/n3LVpTLfJAwkbFceRlTNVsuFFqwqvLEocIRfXn+6eHTD9i/lv8T3 AnOoK1232oW+myjAPuIicLPqwRNFEHJIx1bdCFKS4xpDT6d0xWea7WDxj/USi8Wd1+no xigweofxVveM5eV3qF8JPM8cdd0a8VacQXZFCCn4CDIyd81IpzNLPtm7L0gnkXfiLLFL bAwhanXLSZIIj4+JsEXC2i3SnkPFHZJMrGGT9JRFV1hsBZQwxMqjvxaRPJ+SKrJKqWLp Z5dg== 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=/MHU6eLy/HH6PnrXo470+5XMlsFXh1eKam/uKQ3OWjc=; b=zQcN9ipzQWAvQ3kSgzHLnldQDrqP/pk998pBY5znEJO0y7B6sRzKfYt1ntytXJcAOF ngLIiFO0gYLO+6aU/FfoRB4j3AG8YBdw8WqnUxEKhqGQQzr0mLmnnBfdfJUirfWKvLpJ JGTXUxh9JBiprwCw5PFRFkCxc6J7IB6g3HZw6AxDssE2cgWLgx9uzTRK5bO8aD2LIbXT jnMemHMcgVYAUQ3bztUjHL7i9ak17qbVU/QoW5I5SxW7uAUPA2Dy5bbW4VxEgXbGeswB qevqlGHxynWwx5v+A06NQ8ZSO4H8EYDpVYTdgqUtQsW4zqhSwYYyJb7RsQFNDxt5Oni+ t/8w== X-Gm-Message-State: ACgBeo2hOgdbWODeMRXvDeYH1ximzOCC1TpwghwX+/byFo+n/rD4Tsma Ouv5QgvJrzGQEGjp39qRzTHdTCmEFkzl3SBSkTI= X-Received: by 2002:a05:651c:2d0:b0:25e:6c94:59d5 with SMTP id f16-20020a05651c02d000b0025e6c9459d5mr6055592ljo.488.1659962235606; Mon, 08 Aug 2022 05:37:15 -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: <20220804200549.60512C433C1@smtp.kernel.org> From: Tomer Maimon Date: Mon, 8 Aug 2022 15:37:04 +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, 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. > > 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