Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3003378ybt; Mon, 29 Jun 2020 12:38:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCxxCqzgqmK0wk0sSKX7ojRKr6GqLcRYlnVtrsUbuf0mr+W9rNGK9GxCRcmP/8THpmmeJ5 X-Received: by 2002:aa7:dcc8:: with SMTP id w8mr19796072edu.305.1593459486206; Mon, 29 Jun 2020 12:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593459486; cv=none; d=google.com; s=arc-20160816; b=JRvXJxcDhv/gp2+kxPvzwRDQBMuGakfM/Ghv1VPiYm7YhNc+odBxYWkwyE2apLG7Jf nUAveNol0YGCCwxF8VDdYd2E8fSj3caUZytMWn4bUx5Ke8jPjUe8q8Z7rJJDDA2qaHVs b478jjo0EdwnPqIHzzcS7mQsKgrh19rEciEXokaMqD+Ke7whUfBICs543kDpvzU2sOIR d2tfcqSBAXJzVPNyIRQ5HZq5bW2jw1wUvTMaRUwpDm6uyO4zAA8EXGsknQPHIM1rKsW5 hnmOvTegUALYQBGI43oZDGPMTPqWH32gx166C73PXr9LszdE4Y+yaifKeqnk2CrmUdDd 1OVQ== 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; bh=qMLPncdL/tNyN421Y1ZjEV401HrBQoe6K7xKcCYXqnQ=; b=gMJEHcFwKhXCQLpkggUA5MqvFPk4QIVzWGo6VvQrE0srhTia2pDO2wUuFZfqqMNYvE OoOpUDAP7VpcH3FA3nq1Y+TF7WDLpbo1WWObN8pAAsLrtDrCPz7pXZFhFCDGBYXXlzLr 861F7e3agl7TEpzMYeXNJuIjHtpjvhzp4J5qzdcxITigA4Lb2FVZdt78CPT226Ltiny3 k2Y6LTGyNJe1KtRwVg12NCeYvtYVTMCNFVCPQ+BeKW/jA8xiGdqT+wdxR/YcNfXyEI05 UServ/i2mNolYEZN/phzi3LHG32xOHWpivAGU7zr3qQHWcl5PKM6EzB4V4SG+jKm/497 P+Ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si339043ejk.677.2020.06.29.12.37.43; Mon, 29 Jun 2020 12:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387412AbgF2Tfk (ORCPT + 99 others); Mon, 29 Jun 2020 15:35:40 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44357 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732113AbgF2Tfh (ORCPT ); Mon, 29 Jun 2020 15:35:37 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MBDva-1jgVWL1PeY-00Cj1w; Mon, 29 Jun 2020 15:20:31 +0200 Received: by mail-qk1-f175.google.com with SMTP id z63so15126119qkb.8; Mon, 29 Jun 2020 06:20:31 -0700 (PDT) X-Gm-Message-State: AOAM533ZJSAok7jlSRbfwQAVTrEvXLc3dVAIhoX5VLL1+Q5z2k/tWNzy T4GhrP7N1EOYyFVhxReaWoqgPPE1ZF8cSiw2KMk= X-Received: by 2002:a05:620a:1654:: with SMTP id c20mr8459703qko.138.1593436830130; Mon, 29 Jun 2020 06:20:30 -0700 (PDT) MIME-Version: 1.0 References: <1593410042-10598-1-git-send-email-Anson.Huang@nxp.com> <1593410042-10598-5-git-send-email-Anson.Huang@nxp.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 29 Jun 2020 15:20:13 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as module To: Anson Huang Cc: Russell King - ARM Linux , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , Michael Turquette , Stephen Boyd , "oleksandr.suvorov@toradex.com" , Stefan Agner , Peng Fan , Abel Vesa , Aisheng Dong , Andy Duan , Daniel Baluta , YueHaibing , Stephen Rothwell , Al Viro , Linux ARM , "linux-kernel@vger.kernel.org" , linux-clk , dl-linux-imx Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:b0yzQOCCTZd+elNc6Q7/QnHIpomX4vV3bgG68HT+lCfG2Nqxz3e /zY+elPSL+xd/FENBfREHS5z8zguV4CZ4fu0uXzi4XgkTJrpt15zzhYwqfY1tHD3fAdqNCy IBQRTe1wgQC3h0RioRLhfmMdeNc9mJjD/qwF/ViXQFyGpmvBTCtdbOgnt6oxE6o2/l70F44 3nklo4nCtdNnUcN1EjhVQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wddScc3gBbY=:9FLiBjsnYjWwOT967YuGO4 w2nnLLAiCIfa6CWXrxz84prDuuhyXcNo2xeq/0jRjcY2JdeW+2YUEtKgzCySiE+vPsrOGEy/Z pvQe5DCMGnquQqdIO1XbvammKJFYu5+QoRAzdxhjvMeRtYjv2B+pZC/XJQ6Of4L1/N3r04IXr iZ3cYn21LM8U6iC2PLMK6+Ocl34z6gcBXJRHfCgn9kW+aX1EjZPEkhpQYgCId1DgFAnx6hBhu akrABzMT37m1RviASSy+qgpJfmq5aAEmV4vc9C1KAjt2dUaAtsgrh0L2p0iv/CwAw3Jaq7ygE mLX+d74y1eubmRHlkyPfADHX3Y0TMAR2dNTE8GQIyJdMyrUvWBdyqNweEyDGfozRJjyIw70aO s4ONdC0irEp0910DdpXDrwdHS3YJp0xQMcipSW1xZYGEBAVPCJ4ItcoIE3NHri06LPeQJiUso x+seJ6Wj+41cCjs3lbJShLb0MCyAAbKUxmHUrKa4hwUp7RFZqGhpD15fJpTA4qtgQ8fGAu4lp 1kPar2/dzsDbmamtgQAKbv5iI7/mevZw5h0rk+zjhdpDtxiaDB+DM8ewGeIngvUjSZUWeucVt KA8wdjmyhPRWGpug0Sx/pMwRDKBzWKFHgpMv/nOWPwWYRwmk3PDjmc9vJt6WjT4x7CC0Lmkry DhtKtzpWQlI4mLhXXur8uP98w/ALKS9U1KsZce4Az8pNyiFVc4OIrY5FQWtjzbTxCoaa2V7tz 29Y2Fc6F614fp4yqFy8p9iMrkeDt++iTU+u0EeXYJHfOk3qbSLWNpv4Y4sD79ZMw4oMgdpLji YOCrK4C4MSZzRd+IvWOBi4O7QMd8gjIVg3U26WogEFvWJfkEqWYBn3sey+TQt9j0wTwkwoHK/ CSm3lXcCsKPgDq+RWjAks7uhbOkb5z+RNmwXDcFPj3eXAqZk7zFlUMJMhn9iGXtR6dKSShO/g 1/GSk+L6ezhrodyMxXsUzocEbwXvYTCOpXzLWW9sO0MHv1OjvJaDz Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 2:53 PM Anson Huang wrote: > > Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as > > module > > > > On Mon, Jun 29, 2020 at 8:06 AM Anson Huang > > wrote: > > > > > --- a/drivers/clk/imx/Makefile > > > +++ b/drivers/clk/imx/Makefile > > > @@ -21,9 +21,9 @@ obj-$(CONFIG_MXC_CLK) += \ > > > clk-sscg-pll.o \ > > > clk-pll14xx.o > > > > > > -obj-$(CONFIG_MXC_CLK_SCU) += \ > > > - clk-scu.o \ > > > - clk-lpcg-scu.o > > > +mxc-clk-scu-objs += clk-lpcg-scu.o > > > +mxc-clk-scu-objs += clk-scu.o > > > +obj-$(CONFIG_MXC_CLK_SCU) += mxc-clk-scu.o > > > > It looks like the two modules are tightly connected, one is useless without the > > other. How about linking them into a combined module and dropping the > > export statement? > > > > From HW perspective, the SCU clock driver and LPCG SCU clock driver are different, > SCU clock driver is for those clocks controlled by system controller (M4 which runs a firmware), > while LPCG SCU clock is for those clock gates inside module, which means AP core can > control it directly via register access, no need to via SCU API. Sorry, I misread the patch in multiple ways. First of all, you already put clk-scu.o and clk-lpcg-scu.o files into a combined loadable module, and I had only looked at clk-scu.c. What I actually meant here was to link clk-scu.o together with clk-imx8qxp.o (and possibly future chip-specific files) into a loadable module and drop the export. > So, I think it is NOT that tightly connected, it is because they are both for i.MX8 SoCs with SCU > inside, so they are put together in the Makefile. > > If the export statement is acceptable, I think it is better to just keep it, make sense? There is nothing wrong with the export as such, this was just an idea to simplify the logic. Arnd