lkml.org 
[lkml]   [2020]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2] firmware: imx: Move i.MX SCU soc driver into imx firmware folder
On Thu, Jun 25, 2020 at 2:27 AM Anson Huang <Anson.Huang@nxp.com> wrote:
>
> The i.MX SCU soc driver depends on SCU firmware driver, so it has to
> use platform driver model for proper defer probe operation, since
> it has no device binding in DT file, a simple platform device is
> created together inside the platform driver. To make it more clean,
> we can just move the entire SCU soc driver into imx firmware folder
> and initialized by i.MX SCU firmware driver.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Looks good except for one irritating issue:

> index 17ea361..b76acba 100644
> --- a/drivers/firmware/imx/Makefile
> +++ b/drivers/firmware/imx/Makefile
> @@ -1,4 +1,4 @@
> # SPDX-License-Identifier: GPL-2.0
> obj-$(CONFIG_IMX_DSP) += imx-dsp.o
> -obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o rm.o
> +obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
> obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o

This makes separate loadable modules out of the driver when CONFIG_IMX_SCU=m,
including the badly named misc.ko and rm.ko modules that might conflict
with other modules of the same name (module names are a global namespace
for modprobe).

The way to make this a single module from four files is

obj-$(CONFIG_IMX_SCU) += imx-scu-mod.o
imx-scu-mod-y := imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o

> +EXPORT_SYMBOL(imx_scu_soc_init);

Consequently, there should not be an EXPORT_SYMBOL here.

Arnd

\
 
 \ /
  Last update: 2020-06-25 10:14    [W:0.052 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site