From: Stephen Boyd <swboyd@chromium.org>
To: Julius Werner <jwerner@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Wei-Ning Huang <wnhuang@chromium.org>,
Julius Werner <jwerner@chromium.org>,
Brian Norris <briannorris@chromium.org>,
samuel@sholland.org, Sudeep.Holla@arm.com
Subject: Re: [PATCH v2 2/2] firmware: coreboot: Collapse platform drivers into bus core
Date: Wed, 08 Aug 2018 16:42:29 -0700 [thread overview]
Message-ID: <153377174946.220756.11492509142148153962@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CAODwPW_sP2=w-qRmVTAm+HCgomxj7C1Z_tLtLzUy-eSp8QrZeA@mail.gmail.com>
Quoting Julius Werner (2018-08-08 12:07:30)
> > +config GOOGLE_COREBOOT_TABLE_ACPI
> > + tristate
> > + default GOOGLE_COREBOOT_TABLE
>
> I don't think this helps in upgrading (as your commit message says)
> unless you also keep the 'select GOOGLE_COREBOOT_TABLE' here, right?
Oh yes should be select, not default.
>
> > -int coreboot_table_init(struct device *dev, void __iomem *ptr)
> > +static int coreboot_table_init(struct device *dev, void __iomem *ptr)
>
> nit: There's little reason to keep coreboot_table_init() a separate
> function now. Could maybe compact the code a little more if you merge
> it into probe()? (Also could then do the signature sanity check before
> trusting the length values to map the whole thing, which is probably a
> good idea.)
Sure. I can make another patch for squashing that all together.
>
> > if (ptr_header) {
> > bus_unregister(&coreboot_bus_type);
> > iounmap(ptr_header);
>
> Could ptr_header be handled by devm now, somehow?
Yes. It hasn't been devmified yet because that would be more things in
one big patch. This is quickly blowing up!
> Also, don't you have
> two bus_unregister() now (here and in coreboot_exit())? Or is that
> intentional?
That's nice. I didn't notice that module_init() was registering the bus
and then platform drivers could remove the bus later with the driver
unbind. I'll move them both into the driver bind/unbind path, in another
patch.
>
> > +static struct platform_driver coreboot_table_driver = {
> > + .probe = coreboot_table_probe,
> > + .remove = coreboot_table_remove,
> > + .driver = {
> > + .name = "coreboot_table",
> > + .acpi_match_table = ACPI_PTR(cros_coreboot_acpi_match),
> > + .of_match_table = of_match_ptr(coreboot_of_match),
>
> Who takes precedence if they both exist? Will we have two
> coreboot_table busses? (That would probably not be so good...)
I'm not aware of a system that has both ACPI and devicetree, so this
isn't a problem.
next prev parent reply other threads:[~2018-08-08 23:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 17:24 [PATCH v2 0/2] firmware: coreboot: Fix probe and simplify code Stephen Boyd
2018-08-08 17:24 ` [PATCH v2 1/2] firmware: coreboot: Let OF core populate platform device Stephen Boyd
2018-08-09 9:15 ` Sudeep Holla
2018-08-08 17:24 ` [PATCH v2 2/2] firmware: coreboot: Collapse platform drivers into bus core Stephen Boyd
2018-08-08 19:07 ` Julius Werner
2018-08-08 23:42 ` Stephen Boyd [this message]
2018-08-09 19:33 ` kbuild test robot
2018-08-09 22:13 ` kbuild test robot
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=153377174946.220756.11492509142148153962@swboyd.mtv.corp.google.com \
--to=swboyd@chromium.org \
--cc=Sudeep.Holla@arm.com \
--cc=briannorris@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel@sholland.org \
--cc=wnhuang@chromium.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).