From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38A6DC433EF for ; Fri, 24 Jun 2022 04:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TvGFiARN/iS+4ZWVPfKPcHhFjs+RpXFmRH3Dj7+9gmI=; b=R9Z7AvtGh4bdNY VhbPw8HYPbfLsOJ1A2JBdGhpg635y+3QUu+wvwkDqug4qha4RUY1v+XvcSmRJ8hdMRJctfazmRlt7 XLgOgsBFmiLQrtU+Meos71nBdSLnPe3obmuTACerextBL8VbjA5gxfD838vgfTpEoDUPfb7jMmFNE nBgJs9ovEW0b4JRQ0fKZrb0r7edlghb+1ylR6yuh4Qo1tV7woEG6sHkyJN6GXfoqmOd2zpEP2iK/Q ej9Jg3SlvWGKSjxX+ly+grm37kJfy/fKEbXKBbA81vuHyvHq1FnqS9k6ta31p4fg6gKLeVopxC15l 0Yym5W7lo30RtvEpN7BA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4aZk-0009O8-Qe; Fri, 24 Jun 2022 04:05:44 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4aZg-0009Ms-Ag for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2022 04:05:43 +0000 Received: by mail-oi1-x229.google.com with SMTP id bd16so2131543oib.6 for ; Thu, 23 Jun 2022 21:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5Jjrq7awYQaeFzIlST9+9YCiK3puRVXguo52HCZEX/o=; b=Jg2HxYha/NIZgJEWtC/HRXceJtHhMZJ1yOl23yPzbXLoV3kc+hbn3kalj7vjH7MEeO X1r5KUBpuZf+MJ05ptSbldK4EcmucQBgQKOiDVQE97ktDpdmRFTP/U+k1TETkoNaB3P6 hZa36XQdTinfQ54HLNL5l+448dkt6dRoQzc/3ofXBFb09cMqV3woXsh6dp7cEiCZoC/G lRahLFQCIy2WLmOBj7wogMP+PAeFUuALqD9YqkC5YubrwI71wDJ9ytlZloBGYRMPClhB UT4ySd4lyfz4hVYYWwR1z2rfzQx0FIiG25vPy6+pjl6Yeux7xwtNz/YhqqqIq/F0U48/ fE4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5Jjrq7awYQaeFzIlST9+9YCiK3puRVXguo52HCZEX/o=; b=PZLqDeeHjUE0zTfe00GIhL6QLua1kpyvaJme2FfznV5fzpoQkVtv1SQd8TB5BOo58P C8IQkvyZ6TB6X9QPcE+W4iphpJO+Ig+wJgHQxMgEUoEHqHa1rvr4Fu2TYAhMMzEHdR6x CmPmkQhw6cmMfWmTWbamTbZcLxFqYUmB62Kyn8Gf6QXaMFA6LjKqxIOMeq7Hqph5ziE2 i9ZpvHrHv+giiQi0/72t1vh99pKuv/lZRa7rqtxDOfk/dmuhEDlljgPckol52tSggvrA kuz6hJC9qopS3xdSmL6LXIWPXesAkUOKuf/hUY3yRdRGXEfduwJtd8ozH9QcdsceqAyp 8h2w== X-Gm-Message-State: AJIora/5w0kfL56nlCRqaX2BHLa7DQl1bt5cYv6oIywNB63RdpNnq87c W6SCLy36S7yEwGl+xM46BSTnjA== X-Google-Smtp-Source: AGRyM1vDeI5MEyL2hISaemwrekGndBtHUjrULdlHJG/uc5iI8LR6oGhEiG9J6lfWw7kjbDqmUp1kDA== X-Received: by 2002:a05:6808:20a8:b0:32e:d283:2dfa with SMTP id s40-20020a05680820a800b0032ed2832dfamr791710oiw.279.1656043538330; Thu, 23 Jun 2022 21:05:38 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id s64-20020acaa943000000b0032f51af1999sm542996oie.42.2022.06.23.21.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 21:05:37 -0700 (PDT) Date: Thu, 23 Jun 2022 23:05:35 -0500 From: Bjorn Andersson To: Sricharan R Cc: agross@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, linus.walleij@linaro.org, catalin.marinas@arm.com, p.zabel@pengutronix.de, quic_varada@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2 3/8] clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018 Message-ID: References: <20220621161126.15883-1-quic_srichara@quicinc.com> <20220621161126.15883-4-quic_srichara@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220621161126.15883-4-quic_srichara@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_210540_415614_90DF6FF8 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue 21 Jun 11:11 CDT 2022, Sricharan R wrote: > diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c [..] > +static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = { > + { .fw_name = "xo", .name = "xo", }, Please replace .fw_name with .index based lookup, in line with what was done in gcc-sc8280xp.c recently. There's no reason to include global name lookup (.name) in new drivers, so please omit this part. > + { .fw_name = "gpll0", .name = "gpll0", }, > + { .fw_name = "gpll0_out_main_div2", .name = "gpll0_out_main_div2", }, > +}; > + [..] > +static struct clk_alpha_pll gpll0_main = { > + .offset = 0x21000, > + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], > + .clkr = { > + .enable_reg = 0x0b000, > + .enable_mask = BIT(0), > + .hw.init = &(struct clk_init_data){ > + .name = "gpll0_main", > + .parent_data = &(const struct clk_parent_data){ > + .fw_name = "xo", > + .name = "xo", Are you referring to the board XO here, or the CXO pin on the SoC? On many platforms these are not the same... Please omit the .name here as well and as this is used a few times, please create a struct clk_parent_data for this parent. > + }, > + .num_parents = 1, > + .ops = &clk_alpha_pll_stromer_ops, > + .flags = CLK_IS_CRITICAL, > + }, > + }, > +}; > + > +static struct clk_fixed_factor gpll0_out_main_div2 = { > + .mult = 1, > + .div = 2, > + .hw.init = &(struct clk_init_data){ > + .name = "gpll0_out_main_div2", > + .parent_data = &(const struct clk_parent_data){ It would be nice to have a space inbetween ) and { in all these. > + .fw_name = "gpll0_main", > + .name = "gpll0_main", > + }, > + .num_parents = 1, > + .ops = &clk_fixed_factor_ops, > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; [..] > +static struct clk_branch gcc_gephy_tx_clk = { > + .halt_reg = 0x56014, > + .halt_check = BRANCH_HALT_DELAY, > + .clkr = { > + .enable_reg = 0x56014, > + .enable_mask = BIT(0), > + .hw.init = &(struct clk_init_data){ > + .name = "gcc_gephy_tx_clk", > + .parent_data = &(const struct clk_parent_data){ > + .fw_name = "gmac0_tx_div_clk_src", > + .name = "gmac0_tx_div_clk_src", > + }, This parent_data is repeated multiple times, but more importantly it's not an external clock, so you should use .parent_hw instead of .parent_data. Please review the parent for all your clocks. Regards, Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel