Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21101699ybl; Sun, 5 Jan 2020 20:18:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxVMig6Re0sbtcnzO0iWQLnexaOo5doOsLIGn4J9Dq2/RQzmqmrFcQaGj7sSao8rQNHq6Jk X-Received: by 2002:a05:6830:1248:: with SMTP id s8mr112361678otp.202.1578284300059; Sun, 05 Jan 2020 20:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578284300; cv=none; d=google.com; s=arc-20160816; b=aMU5JYEIQJnIutsBNIx0+A2zGg/elAUOWk40cJ6FVkrPiA1CJ2skhGwyBH1bG9FkSz Q/8+kuKeVIEFsC8FvTUhEFBkfj+5pyoNzQISn7bkeq56sSS1MIm9B6MW1A4hmH2KHoQn ByRTRoDA9mFP+Zgep42PGxiMJR0rkWdiUQ+Hlxl//YduqR8BapbxqDFAipQo3xskOW/o dICH7iEpcdLjWgPpTydSoNhqVmUUWneJIzfE81CJKQJyEhux34Rjb0Rc0c0vnjSGJ+yQ fUBIWWVrz0xd2snYEGzMl1M+qy4/ovTI2RKsBd+QAbP8hr0voXrMk0GDRacSDua3qTha 4eTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NM4cO7yx6XHdWkikFjcDmehOMtjxSh2FAaet+Jaova8=; b=nV1ohxyGfzbzheQ7laYc/nlefiGxytPF0Co2b+TAAvo5O7xggnjdtryLVQL81eDbbE HXm/t0SikFgCDxEnDEdWIH7dJSk50v5kC6XnZCpABvhzN5BIkWprlrR6zCyk3k27PYuy Mp+TkMYydxDhVotGaMPKuN4ojUQCkrFmQaZgzClCYyKXC8Vi/teGhBfQ8ilP47d4O8ow VNE0Cb636qxSyt8sk6c+846rhhie2PE1CK2UBpT1jQn3O/nOXU+orcwaUwP/YygoiNLe rFVqx3mSI70ed8PRWs6sy8YvGBOiBNzhsIPKGrK3txkv/re1FLPxM+mWRjVLQYZm3C+z ZTmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="flUVars/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94si38505513ott.8.2020.01.05.20.18.07; Sun, 05 Jan 2020 20:18:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="flUVars/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727487AbgAFER3 (ORCPT + 99 others); Sun, 5 Jan 2020 23:17:29 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43622 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727432AbgAFER3 (ORCPT ); Sun, 5 Jan 2020 23:17:29 -0500 Received: by mail-ed1-f66.google.com with SMTP id dc19so46368540edb.10; Sun, 05 Jan 2020 20:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NM4cO7yx6XHdWkikFjcDmehOMtjxSh2FAaet+Jaova8=; b=flUVars/F3OZbs1fd3Xo4NX+NdYi1GzRjlkAfssV8o73ZLfhUhSAFWX7ic15uGaFSK 1/iw1VTwqJhgM6Ze6NYcH/2chJJKw4SEDpqwhX8tW4dEkG5hO9YtP1cjNj0khmkvf3ow ia3j4yquQawETubpeFmIXil8yekYP1yQmHAgiMEdN4PI2TvyXMxDFfe/r0Jhzub/txkq BFEISeSvPO2RQ5PJhmyHKIRa7ZFlyD6f8GzxGl1AsLU9TgxgKx96jCgwFXzvx3xXaflJ GxEvkE7HpOD+72FF6cFjh0BhzPWZ2DyXjw4FftC61WR62E3TRSt1l7FdAjtu11ipXO6o W+8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NM4cO7yx6XHdWkikFjcDmehOMtjxSh2FAaet+Jaova8=; b=fTcfXfYZDE5hPphO+uXhCRncVfgCPbD61bG9y+8R+0pkvt48gkvpZYFZKdYJlEBgYi iuYNJ1Ls/wJqgs23rN4vLVM1q19JHA4XSRzbMhu8SblqjwDYCeawuC1/phr71lc6IgK6 zvQEBa1Tw0PpLGEeY8xaIx9C39B7QKjgc4RIhVLnmdFOdi9xwjQw2DJPFVWXwP3gHB9T HrXNMkToRPzkU4UQ+oSaPYN9TZk0HeFXznnM3qhTsO+T12mB4YX7IYmumJJRXAAcEPpS M36uyFusTNpB7u5kENTx71RpKztHlBSrpqFJHBlzQEK7A+A69QS47YNu3tJvIvPigXKU 9Zaw== X-Gm-Message-State: APjAAAVDwWTfqec3RBy4FYjvjStYQ0SIHt3PTYejx/2QJxTcnDbpJVvb PrQvkaM4HCINjbTbWYCfgZFfQrSlyU1eklsj+OM= X-Received: by 2002:a05:6402:12d1:: with SMTP id k17mr105414587edx.291.1578284247470; Sun, 05 Jan 2020 20:17:27 -0800 (PST) MIME-Version: 1.0 References: <55183b0a7c466528361802fabef65a57f969d07b.1574922435.git.shubhrajyoti.datta@xilinx.com> <20200105200014.4904320678@mail.kernel.org> In-Reply-To: <20200105200014.4904320678@mail.kernel.org> From: Shubhrajyoti Datta Date: Mon, 6 Jan 2020 09:47:16 +0530 Message-ID: Subject: Re: [PATCH v3 07/10] clk: clock-wizard: Update the fixed factor divisors To: Stephen Boyd Cc: devel@driverdev.osuosl.org, linux-clk@vger.kernel.org, linux-kernel , Greg Kroah-Hartman , Mike Turquette , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , =?UTF-8?Q?S=C3=B6ren_Brinkmann?= , Shubhrajyoti Datta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 6, 2020 at 1:30 AM Stephen Boyd wrote: > > Quoting shubhrajyoti.datta@gmail.com (2019-11-27 22:36:14) > > From: Shubhrajyoti Datta > > > > Update the fixed factor clock registration to register the divisors. > > > > Signed-off-by: Shubhrajyoti Datta > > --- > > drivers/clk/clk-xlnx-clock-wizard.c | 17 +++++++++++------ > > 1 file changed, 11 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/clk/clk-xlnx-clock-wizard.c b/drivers/clk/clk-xlnx-clock-wizard.c > > index 4c6155b..75ea745 100644 > > --- a/drivers/clk/clk-xlnx-clock-wizard.c > > +++ b/drivers/clk/clk-xlnx-clock-wizard.c > > @@ -491,9 +491,11 @@ static int clk_wzrd_probe(struct platform_device *pdev) > > u32 reg, reg_f, mult; > > unsigned long rate; > > const char *clk_name; > > + void __iomem *ctrl_reg; > > struct clk_wzrd *clk_wzrd; > > struct resource *mem; > > int outputs; > > + unsigned long flags = 0; > > struct device_node *np = pdev->dev.of_node; > > > > clk_wzrd = devm_kzalloc(&pdev->dev, sizeof(*clk_wzrd), GFP_KERNEL); > > @@ -564,19 +566,22 @@ static int clk_wzrd_probe(struct platform_device *pdev) > > goto err_disable_clk; > > } > > > > - /* register div */ > > - reg = (readl(clk_wzrd->base + WZRD_CLK_CFG_REG(0)) & > > - WZRD_DIVCLK_DIVIDE_MASK) >> WZRD_DIVCLK_DIVIDE_SHIFT; > > + outputs = of_property_count_strings(np, "clock-output-names"); > > + if (outputs == 1) > > + flags = CLK_SET_RATE_PARENT; > > What does the number of clk outputs have to do with the ability to > change the rate of a parent clk? The commit text doesn't inform me of > what this is for either. Please help us understand. If there are multiple clocks then changing the rate of the parent changes the rate of all the outputs so we donot allow changing the rate of the parent if there are multiple clocks. If there is only one output then that is not an issue. I will update the description in the next version. > > > clk_name = kasprintf(GFP_KERNEL, "%s_mul_div", dev_name(&pdev->dev)); > > if (!clk_name) { > > ret = -ENOMEM; > > goto err_rm_int_clk; > > } > >