linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Aisheng Dong <aisheng.dong@nxp.com>, Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Baluta <daniel.baluta@nxp.com>,
	Peng Fan <peng.fan@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"krzk@kernel.org" <krzk@kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH] soc: imx-scu: Support module build
Date: Fri, 19 Jun 2020 07:39:57 +0000	[thread overview]
Message-ID: <DB3PR0402MB3916B7B5E730E2D2B93C5ECCF5980@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <AM6PR04MB496696A8695FA85D1EEE276B80980@AM6PR04MB4966.eurprd04.prod.outlook.com>



> Subject: RE: [PATCH] soc: imx-scu: Support module build
> 
> > From: Arnd Bergmann <arnd@arndb.de>
> > Sent: Thursday, June 18, 2020 3:21 PM
> >
> > On Wed, Jun 17, 2020 at 11:41 AM Anson Huang <anson.huang@nxp.com>
> > wrote:
> >
> > > > >
> > > > > I'm ok with the change. But I'm curious how can this module be
> > > > > autoloaded without MODULE_DEVICE_TABLE.
> > > > > Have you tested if it can work?
> > > > >
> > > >
> > > > I ONLY tested the manual insmod, if want to support auto load, may
> > > > need some more change, will try it later and send out a V2 if needed.
> > >
> > > The further check shows that, if want to support auto load, the
> > > platform device register needs to be done in somewhere else which is
> > > built-in (in my test, I move it to clk-imx8qxp.c's probe), and also
> > > need to add below module alias in this driver, because it has no
> > > device node in
> > DT and no device table in driver.
> > >
> > > +MODULE_ALIAS("platform:imx-scu-soc");
> > >
> > > Since this driver has no device node in DT, and the target is to
> > > build all SoC specific drivers as module, so the best way is to add
> > > a virtual device node in DT in order to support auto load?
> >
> > I see that there is indeed a driver for the device node in
> > drivers/firmware/imx/imx-scu.c, the only reason for this module using
> > device_initcall() with a manual
> > platform_device_register_simple() seems to be that we cannot have two
> > platform drivers bind to the same device node.
> >
> > I think a cleaner way to handle this would be to just move the entire
> > soc driver into the firmware driver and then remove the duplication.
> >
> 
> Yes, sounds like a good idea to me.

So the idea is to remove this driver and implement the soc id/revision/serial_number etc.
in drivers/firmware/imx/imx-scu.c, right?

Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-19  7:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  4:53 [PATCH] soc: imx-scu: Support module build Anson Huang
2020-06-17  7:57 ` Aisheng Dong
2020-06-17  8:00   ` Anson Huang
2020-06-17  9:41     ` Anson Huang
2020-06-18  7:20       ` Arnd Bergmann
2020-06-19  6:20         ` Aisheng Dong
2020-06-19  7:39           ` Anson Huang [this message]
2020-06-19 12:09             ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB3PR0402MB3916B7B5E730E2D2B93C5ECCF5980@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=arnd@arndb.de \
    --cc=daniel.baluta@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).