Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8578196rwb; Thu, 24 Nov 2022 01:12:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf5f2cmpH1K2mjovgVHllJUtTSjH//pLfKx2jrZncKCyrSV+/v5umC0HkkbNGAe2VS5p5A/V X-Received: by 2002:a17:906:7ac8:b0:7ad:c8d6:bc7f with SMTP id k8-20020a1709067ac800b007adc8d6bc7fmr26656560ejo.118.1669281165325; Thu, 24 Nov 2022 01:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669281165; cv=none; d=google.com; s=arc-20160816; b=KBz01Otx5+x0GJzAH4Xk2iTfR5783QJzi7J6FhNaPutOXgKgq/1lby/fopmtjJFXLo cOAFVpqJaVAUmmt0u8a6hUQNaEOhdzjnUb5NbcdUMd7zQKVkhcsKgCQ3eU7mR1olmDNc E1Sowp5xxjKIhDGFryUQT1B4ReaWLFe4ZbOaK+QO3vOqfzcrwIQ8GJFcu7aydBNjARbe /bmCE0+28z8MFM8W70cOsSpT/ad7pBW7gN//28VUGcUmQ39DtTQWOPdIVVCQwI3u19ho RcSJEg/PQUlULt0GpxLQ/EgGllGWgZ4Ht7uysdcdH0iRG/DGV0O8fb5wAP5GtWtgx8tQ g10A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zvetRScBq/s0DVGZvJBwJ/1K4SpuPcPyxQYleNpibXI=; b=SE8bcgcROVo0yDsLPk9C/viVSLn6A/wJsdGL4G2a53DkhiJZs7hIrwpxlbYpILYX8d xy4sr9VnkFXo2ysLxIBwPgZhKEHLWTeCg+NGrU+0sXOneR7JtCXChQ+uiqbXmSHHZRYN vtNZ3OUFCGLdPR8VzoMmEnGK/KNjUJyi8Igwq4iZupL0qMxnYi+IlWdRbgXs7krzDvnE 6PCm2y7HPDw2U6Gr2SjIJ3a8+8VBmMdYFsyNX30WLvTh9/15kYfqIIzUNzSkqf97BBV3 AFo5QpN7pyWka+0to4GFfH29M8CGotwEt1aLz2IFC0S+UtkINPVn+Rs23W22GRREmYQX xocQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=pMsdQNoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd11-20020a1709069b8b00b007af15567a5bsi496727ejc.432.2022.11.24.01.12.24; Thu, 24 Nov 2022 01:12:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=pMsdQNoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbiKXJBb (ORCPT + 88 others); Thu, 24 Nov 2022 04:01:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbiKXJBQ (ORCPT ); Thu, 24 Nov 2022 04:01:16 -0500 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A188B1121C6 for ; Thu, 24 Nov 2022 01:01:14 -0800 (PST) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-3938dc90ab0so9720967b3.4 for ; Thu, 24 Nov 2022 01:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zvetRScBq/s0DVGZvJBwJ/1K4SpuPcPyxQYleNpibXI=; b=pMsdQNoNfU0rh35srANZFehK2wR2DJibDRvhXsvvfKZ8dc3tGsVZjZVSIPWC5hKFs/ uc1NmsQNUv9fA/iisY/7dVUrr3aZBLnDhKIaNL29ixmth1THZj5O2b9+MnsQwJz+hHVx /BA0B/VEn1O/ntePJbEdtq1cZljTbYpDd1P/T9vld1cF1gZ0C5n1+myyrNVYvAcyTwX3 VtGdPeddM8QzCW12kdaKtM64JsTBiilk+JpTomOMbKej1a5+VFhh79hNu53U1VHeRiJz pzq3jHy3cZg4E7LZ7FsB6zjnq9KvDwps09ezFsqc6Yn9RyKeLl0b4DW6beWlxeaPfYl+ 6Cqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zvetRScBq/s0DVGZvJBwJ/1K4SpuPcPyxQYleNpibXI=; b=vh7l+XiVtX3cvn5iF9FwF0roPGKQaxD5yLckopYUFUccsNGqI0qBb3KrrdDqVkiod5 YAd5cvtwdfmUfJbVnnMDpvLvMXMEeFd9YT8cf1G58Vjieq4AQJfapmkNZygkcMGF9UO5 Cli+vX8JKNlRpT1BGAFlxAvJU4aJIYTagkbM9eJVqtRVIeydyqaCix/yShFqaTzAgetd 7oeF4kraqL0q7Jy8VufxmQOuqXF0H/KGLR9YM5fOcI3Lr0XkRZTrhpVKcgiiCdI+6nPf pA1YFgdejR+HFPt0tYJd/XKCHuOwHgIWQaV9JXmXqqFMBBGJUPL1crsOEIMIFSidEYR2 nOKA== X-Gm-Message-State: ANoB5plBWsXWOXALBC9nDgLrshoQvTck9/I7HnPLXALRS7GL322gMOtj 0PdNVq7Y0l1Ox5JJwcw8hy4/r7vyMjVEnC7P+7dUnw== X-Received: by 2002:a81:7909:0:b0:36f:d2d9:cdc4 with SMTP id u9-20020a817909000000b0036fd2d9cdc4mr14926932ywc.380.1669280473638; Thu, 24 Nov 2022 01:01:13 -0800 (PST) MIME-Version: 1.0 References: <20221108181144.433087-1-nfrayer@baylibre.com> <20221108181144.433087-3-nfrayer@baylibre.com> <7775f7ff-b297-eeab-dd46-e7ac5e1c14fb@gmail.com> In-Reply-To: <7775f7ff-b297-eeab-dd46-e7ac5e1c14fb@gmail.com> From: Nicolas Frayer Date: Thu, 24 Nov 2022 10:01:02 +0100 Message-ID: Subject: Re: [PATCH v4 2/4] soc: ti: Add module build support To: =?UTF-8?Q?P=C3=A9ter_Ujfalusi?= Cc: nm@ti.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vkoul@kernel.org, dmaengine@vger.kernel.org, grygorii.strashko@ti.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, khilman@baylibre.com, glaroque@baylibre.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le jeu. 24 nov. 2022 =C3=A0 08:53, P=C3=A9ter Ujfalusi a =C3=A9crit : Hi Peter, > > > > On 08/11/2022 20:11, Nicolas Frayer wrote: > > Added module build support for the TI K3 SoC info driver. > > Subject: "soc: ti: k3-socinfo: ..." > > > > > Signed-off-by: Nicolas Frayer > > --- > > arch/arm64/Kconfig.platforms | 1 - > > drivers/soc/ti/Kconfig | 3 ++- > > drivers/soc/ti/k3-socinfo.c | 11 +++++++++++ > > 3 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platform= s > > index 76580b932e44..4f2f92eb499f 100644 > > --- a/arch/arm64/Kconfig.platforms > > +++ b/arch/arm64/Kconfig.platforms > > @@ -130,7 +130,6 @@ config ARCH_K3 > > select TI_SCI_PROTOCOL > > select TI_SCI_INTR_IRQCHIP > > select TI_SCI_INTA_IRQCHIP > > - select TI_K3_SOCINFO > > help > > This enables support for Texas Instruments' K3 multicore SoC > > architecture. > > diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig > > index 7e2fb1c16af1..1a730c057cce 100644 > > --- a/drivers/soc/ti/Kconfig > > +++ b/drivers/soc/ti/Kconfig > > @@ -74,7 +74,8 @@ config TI_K3_RINGACC > > If unsure, say N. > > > > config TI_K3_SOCINFO > > - bool > > + tristate "TI K3 SoC info driver" > > + default y > > Why it is a good thing to have this driver as module compared to always > built in? > It has no dependencies, just things depending on it. > It is small, just couple of lines long > > I don't really see the benefit of building it as a module, not even an > academic one... > Just to give an update, this series will be dropped as it introduces dependency issues with consumer drivers. The reason why I've enabled the module build support is because it is required to build vendor drivers as modules for Android GKI feature. > > > depends on ARCH_K3 || COMPILE_TEST > > select SOC_BUS > > select MFD_SYSCON > > diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c > > index 19f3e74f5376..98348f998e0f 100644 > > --- a/drivers/soc/ti/k3-socinfo.c > > +++ b/drivers/soc/ti/k3-socinfo.c > > @@ -13,6 +13,7 @@ > > #include > > #include > > #include > > +#include > > > > #define CTRLMMR_WKUP_JTAGID_REG 0 > > /* > > @@ -141,6 +142,7 @@ static const struct of_device_id k3_chipinfo_of_mat= ch[] =3D { > > { .compatible =3D "ti,am654-chipid", }, > > { /* sentinel */ }, > > }; > > +MODULE_DEVICE_TABLE(of, k3_chipinfo_of_match); > > > > static struct platform_driver k3_chipinfo_driver =3D { > > .driver =3D { > > @@ -156,3 +158,12 @@ static int __init k3_chipinfo_init(void) > > return platform_driver_register(&k3_chipinfo_driver); > > } > > subsys_initcall(k3_chipinfo_init); > > subsys_initcall for a module? By including module.h, the subsys_initcall() is redefined as module_init() when built as a module. When built-in, it is redefined as the usual __initcall. > > > + > > +static void __exit k3_chipinfo_exit(void) > > +{ > > + platform_driver_unregister(&k3_chipinfo_driver); > > +} > > +module_exit(k3_chipinfo_exit); > > + > > +MODULE_DESCRIPTION("TI K3 SoC info driver"); > > +MODULE_LICENSE("GPL"); > > -- > P=C3=A9ter