Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3260899ybt; Mon, 29 Jun 2020 20:51:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzwr9lAlVJRKLiNbqrUAjRVd6s+0zDH+zR4EFPBAriy3YmDqofqtACTP7mcEfziUBg+reY X-Received: by 2002:a05:6402:1766:: with SMTP id da6mr20230010edb.48.1593489081139; Mon, 29 Jun 2020 20:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593489081; cv=none; d=google.com; s=arc-20160816; b=PJWi17yz0VMZBPFZiHTJl5+pCqucJpbsa67YlWmzRSC/GWIRxXBX3Tc2mrlEPOFN7G U3QebquA2oBXVvPl7JIxCBcmhO6Mi15wQiHV8gjJGqtj1KxmQFaHhY7Eoa7JHeIaSOgL OU7spFTMvASO/MQh5EM9mTdKCvIWvibeQ+3ZyIsfBsG3nNHSbtqCCQjBqJFoKd3vvchC mhoFZ4j5/ihteQ8mQb0DilNDFSos/EsGxUrANbu4Q+Om+j3U1UbKV8Li7fhydMUb88Wh B0bR8OZu6CRpgG8MVd8tH+MfKa0sIc8Zf9hAIX+/bAGkU0YFFkG/o79ZBAV6w1hLFROi 9fBw== 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=q0B1RnHxaLtY6cPxcW/Ojh88m5bGWKbr1d+gTGuWAH4=; b=uU4vcIokguzLZHzxfHWVaoXI+2ndpXjWRpzKVz0xw2INtYSTnCxJjiWYvuwhNC/fIQ 5716LTfMtC7ufGVlFy1AHC0815FIqkLKpZ8D/aURkrhMmQ8gYR0qFLhnTVItWw2q805m G12tkMD62taYXJfRfEnmuxAzZE5PKEkio87sfP8C1ORPAZqkSQWCJCS9c7VMypV6lZlw BAxODdilVqtzy5fI5wRou/19ImxJvSRk0UKyZElCbUBfhfTdXw99cIt5AclgJXJ34G7d FLPcDhKkUmHpKxVKTU2SDTbxWytUWp6NjszQC1ItGjWlsA7h8r5R9C/6+VtIhp10E4HD hxaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UHgFgfX7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si982966edx.125.2020.06.29.20.50.57; Mon, 29 Jun 2020 20:51:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UHgFgfX7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729289AbgF3Dul (ORCPT + 99 others); Mon, 29 Jun 2020 23:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbgF3Duk (ORCPT ); Mon, 29 Jun 2020 23:50:40 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37B59C061755; Mon, 29 Jun 2020 20:50:40 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id dg28so14827196edb.3; Mon, 29 Jun 2020 20:50:40 -0700 (PDT) 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=q0B1RnHxaLtY6cPxcW/Ojh88m5bGWKbr1d+gTGuWAH4=; b=UHgFgfX7LZ4HvRfMESq2Kq8n0hJPcIL804yKZ55/1FpVeZjsjDu3/v0ekUElUaBrwC E2lOhbXNVHnWJdE4+QBO76QdX3lETzQdqjCoWiDj+j01cPw/AKE7n8qTlFNit9skHKvn f/cF4+zHTicz1LcoxUhBXinMrXP+Bqwex0rVjYYBgwpSiAUFz0ESDiTIx3Z1pt48Lz86 2IykvzdL475X5mqDgDMGKtqXZeNhzglhOkviJvmU+Tgl15O7xhgbfC+2fYIpOd36BFxk /ZYYoLnk5JLiIxuzQ/RQqM73ypMCZsx2pyNkTFEKUjnCuf5dXvR2WeJn4Jwuj5Et92jV 8mPg== 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=q0B1RnHxaLtY6cPxcW/Ojh88m5bGWKbr1d+gTGuWAH4=; b=IrtVY2OX01vWk2Et0oakxHf0ajVrJaIvZU02Ukgr6bUf9oduPC9F73R+63ihTU1hwz d26d04KsoAoYbcX7YYFSkefCzC6K0ZYfQbtCEgkGpOVQF3qBXPeJvb5Li0/RqSJvJDc5 b4lHGtN4R+HwhpHhv8tF0bTbc2dv7ua6mB74LMMFqWPFpTEbvumkVqHkUyYNnAuATuiD ONW0Ke7gbs0Qo3LhSCutOfvNChTlG3TSHpORGuXeZxs4B7Xbp9J8IzIxRkhdcf0fhc9V DVnQ64jPzxKw7OL9Z2KBi/QWuz9WtrAdcbBedhSE4klLUqj3SLLFIHUBo0VhyiJGDzXs 5P4A== X-Gm-Message-State: AOAM531dmUQz5rUiRbUwdb99XtBpjUpMPds3aVJ9uJdCHS2q5nDo2JjI MiRsW0K8EhP2woYzHvvULjxBLKtEV73+TYcyIsw= X-Received: by 2002:a50:f08c:: with SMTP id v12mr20517050edl.119.1593489038902; Mon, 29 Jun 2020 20:50:38 -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: Dong Aisheng Date: Tue, 30 Jun 2020 11:36:40 +0800 Message-ID: Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as module To: Arnd Bergmann Cc: Anson Huang , 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 3:36 AM Arnd Bergmann wrote: > > 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. It sounds like a good idea to me. Actually I planned to combine them into one driver in the future. Regards Aisheng > > > 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