Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1602404ybc; Sun, 17 Nov 2019 03:31:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzvihZuICFnEVyT7N20o6v4HyU4QAGODHQKwmSefpY8rfCWN0i3hKkP9hiZEonwAFz1DNU0 X-Received: by 2002:a17:906:6403:: with SMTP id d3mr17814679ejm.258.1573990292745; Sun, 17 Nov 2019 03:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573990292; cv=none; d=google.com; s=arc-20160816; b=akbpaKOFjd1rpEN4sOcSeGkbL48q+n7j8FZMAqJTtCbB2Dbf3Hkw4G0bXrvCAZN9Pu eFoX5LOuUyD67p5oEQgNItTYXsjJqMVp6vEmxNLd5G1zX1qHgZkyBFU9NglrsnzWM+hG r01N0ONw97B2/KnhavrlDhz6iKl0AP9/MZs8XWtdCpl+26B4LMUaiTs8r6l2ku1sqnN6 RMhuKmLzSiTKc/IXYUcUpdRXo+59CZ1AG+d8ISylYa631znuOUx6jrfKrV4HXeVkwXvx Mjsf9DvCUIDz8YFx7OG7xy8jQyseGvwn4tKiQLDvd0ZhsRjfzR6firdrAV24ijvbUiDY eVWQ== 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=yRb4rHk+wMDKet5bHxbNKk76HRcEuXGmjVUHzgEq0xw=; b=IMCm2SICYnR6SRUl+MgwG0ouXwBwQunynlUWirY+QX2K1mYxGk+eYoQbvgJk6ejk2Y SbWdF4QNOovCDgA+j78sD8nYW9KCnYKyMNkUUc9UkjKa4fNWUfwF60f1DYkRhyqcz806 i7bdAkS7zDNxFODtufJA55EYYTwoKP0bp2XlMS+w4AQeWNytTbtAGPNb7yHe9SoJ4C+I 58f68TLMvCCGr+ynLFPlj3xzWnJ505zImxETUlh7hoox/CsaUVuRSpqyIpuj12mxSjb4 5RLbbLFusXY+26Em2T8bOripUEKIhBYArAi01ZZJWjTagD9hIFq5xJML8Y2rHgvIgL/Q ODhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=slVeQhdy; 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 f50si7624596edb.422.2019.11.17.03.31.07; Sun, 17 Nov 2019 03:31:32 -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=slVeQhdy; 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 S1726127AbfKQL1y (ORCPT + 99 others); Sun, 17 Nov 2019 06:27:54 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:43146 "EHLO mail-wr1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbfKQL1x (ORCPT ); Sun, 17 Nov 2019 06:27:53 -0500 Received: by mail-wr1-f49.google.com with SMTP id n1so16093833wra.10; Sun, 17 Nov 2019 03:27:51 -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=yRb4rHk+wMDKet5bHxbNKk76HRcEuXGmjVUHzgEq0xw=; b=slVeQhdyt+sqLBrGn6439IEhrCPW6xHrtN3CTNUYWaCIcBLhfotFK1CU97BPZ9MljW oepHugZNkm0/EG42xxpa46EZjR6hMr1eY1Do/+n1eOpQHfUJ11NRqFbcaWDHkO9IMP6Z i/pRxCfMDmACYsQhBiYTfNmKBskXrh/W3Xb6zjKrE8xKj6w2+16dzuy3serZyBk5gz3H pB6wrqlZdeuHxsN7m7FFKp65M7f8vyv2BE3ZZfmd7jiPAvV0Lb3KD3LCskVb3bx3mrp7 3lUTjflfaK3rgA6Ya/M7QZYVQl2tmCn0CFrTseVJNAMdWzB7IJ0BhLgTq2YE8mcCFql8 S7Uw== 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=yRb4rHk+wMDKet5bHxbNKk76HRcEuXGmjVUHzgEq0xw=; b=uSVQFTRmcK5jEVUytZtTdyi/crOJ9KeRXdIRZ5ZgFxRA5UNxvDNoqTEQFi5FYe32RP K04r2Z/aXryct8iZNJYC3cXhPEAxvNJD7y64q5P2EWrwwd3nsGWMuHav7bqCkrtAG3YZ gUcCucVuRJ0fjb3+FKc0A2t1s0lG7rrxVpu3bRt2c/m2jaN/1DbI9Z1TmAGjCtRKpajt v66aCtF2t6FlpgF9aWEtnGIWerjJMLcSt7ZNy3H8h6RKPZ531Uy8RW+V9pzt1hRRC/Zs 9/yeNu7B1MXUnWM4qnuI17Uzhd4JYti+Jpb8lumIfWbgoktC7wn52Z/4K0EgXS1vBJSh FeXg== X-Gm-Message-State: APjAAAWhXd1Ba6Nnj8f1zE2JsxsNfhUWkenzse5GslOcHPsb61E75D5s dPP9SMgB+zJ6tP3RsgMHsehGJX7DdC8MpnaAcs4= X-Received: by 2002:adf:8b01:: with SMTP id n1mr26544555wra.227.1573990071310; Sun, 17 Nov 2019 03:27:51 -0800 (PST) MIME-Version: 1.0 References: <20191025111338.27324-1-chunyan.zhang@unisoc.com> <20191025111338.27324-6-chunyan.zhang@unisoc.com> <20191113221952.AD925206E3@mail.kernel.org> In-Reply-To: <20191113221952.AD925206E3@mail.kernel.org> From: Chunyan Zhang Date: Sun, 17 Nov 2019 19:27:15 +0800 Message-ID: Subject: Re: [PATCH 5/5] clk: sprd: add clocks support for SC9863A To: Stephen Boyd Cc: Chunyan Zhang , Mark Rutland , Michael Turquette , Rob Herring , linux-clk , DTML , Linux Kernel Mailing List , Orson Zhai , Baolin Wang 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 Hi Stephen, On Thu, 14 Nov 2019 at 06:19, Stephen Boyd wrote: > [cut] > > > +static const u64 itable_dpll[5] = {4, 1211000000, 1320000000, 1570000000, > > + 1866000000}; > > +static SPRD_PLL_WITH_ITABLE_1K(dpll0_clk, "dpll0", "dpll0-gate", 0x0, > > + 3, itable_dpll, f_dpll, 240); > > +static SPRD_PLL_WITH_ITABLE_1K(dpll1_clk, "dpll1", "dpll1-gate", 0x18, > > + 3, itable_dpll, f_dpll, 240); > > + > > +static CLK_FIXED_FACTOR(dpll0_933m, "dpll0-933m", "dpll0", 2, 1, 0); > > +static CLK_FIXED_FACTOR(dpll0_622m3, "dpll0-622m3", "dpll0", 3, 1, 0); > > +static CLK_FIXED_FACTOR(dpll1_400m, "dpll1-400m", "dpll1", 4, 1, 0); > > +static CLK_FIXED_FACTOR(dpll1_266m7, "dpll1-266m7", "dpll1", 6, 1, 0); > > +static CLK_FIXED_FACTOR(dpll1_123m1, "dpll1-123m1", "dpll1", 13, 1, 0); > > +static CLK_FIXED_FACTOR(dpll1_50m, "dpll1-50m", "dpll1", 32, 1, 0); > > + > > +static struct sprd_clk_common *sc9863a_dpll_clks[] = { > [...] > > +static SPRD_COMP_CLK(core0_clk, "core0-clk", core_parents, 0xa20, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core1_clk, "core1-clk", core_parents, 0xa24, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core2_clk, "core2-clk", core_parents, 0xa28, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core3_clk, "core3-clk", core_parents, 0xa2c, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core4_clk, "core4-clk", core_parents, 0xa30, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core5_clk, "core5-clk", core_parents, 0xa34, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core6_clk, "core6-clk", core_parents, 0xa38, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(core7_clk, "core7-clk", core_parents, 0xa3c, > > + 0, 3, 8, 3, 0); > > +static SPRD_COMP_CLK(scu_clk, "scu-clk", core_parents, 0xa40, > > + 0, 3, 8, 3, 0); > > +static SPRD_DIV_CLK(ace_clk, "ace-clk", "scu-clk", 0xa44, > > + 8, 3, 0); > > +static SPRD_DIV_CLK(axi_periph_clk, "axi-periph-clk", "scu-clk", 0xa48, > > + 8, 3, 0); > > +static SPRD_DIV_CLK(axi_acp_clk, "axi-acp-clk", "scu-clk", 0xa4c, > > + 8, 3, 0); > > + > > +static const char * const atb_parents[] = { "ext-26m", "twpll-384m", > > + "twpll-512m", "mpll2" }; > > +static SPRD_COMP_CLK(atb_clk, "atb-clk", atb_parents, 0xa50, > > + 0, 2, 8, 3, 0); > > +static SPRD_DIV_CLK(debug_apb_clk, "debug-apb-clk", "atb-clk", 0xa54, > > + 8, 3, 0); > > + > > +static const char * const gic_parents[] = { "ext-26m", "twpll-153m6", > > + "twpll-384m", "twpll-512m" }; > > Can you use the new way of specifying clk parents instead of using these > big string lists? That will hopefully cut down on the size of this code > by reducing all these string lists. Not sure if I understand correctly - do you mean that switch to use a reference to clk_parent_data.hw in the driver instead? like: https://elixir.bootlin.com/linux/v5.4-rc7/source/drivers/clk/qcom/gcc-sm8150.c#L136 Since if I have to define many clk_parent_data.fw_name strings instead, it seems not able to reduce the code size, right? Thanks, Chunyan