From: Brian Norris <briannorris@chromium.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Thierry Escande <thierry.escande@collabora.com>,
Rob Herring <robh@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Olof Johansson <olof@lixom.net>,
Stephen Warren <swarren@nvidia.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Julius Werner <jwerner@chromium.org>
Subject: Re: [PATCH 5/5] firmware: google memconsole: Add ARM/ARM64 support
Date: Fri, 24 Mar 2017 11:00:43 -0700 [thread overview]
Message-ID: <20170324180043.GC119093@google.com> (raw)
In-Reply-To: <20170324122858.GF22771@leverpostej>
On Fri, Mar 24, 2017 at 12:28:59PM +0000, Mark Rutland wrote:
> On Thu, Mar 23, 2017 at 10:04:29PM +0100, Thierry Escande wrote:
> > +static const struct of_device_id coreboot_of_match[] = {
> > + { .compatible = "coreboot" },
> > + {},
> > +};
> > +
> > +static struct platform_driver coreboot_table_of_driver = {
> > + .probe = coreboot_table_of_probe,
> > + .remove = coreboot_table_of_remove,
> > + .driver = {
> > + .name = "coreboot_table_of",
> > + .of_match_table = coreboot_of_match,
> > + },
> > +};
> > +
> > +static int __init platform_coreboot_table_of_init(void)
> > +{
> > + struct platform_device *pdev;
> > + struct device_node *of_node;
> > +
> > + /* Limit device creation to the presence of /firmware/coreboot node */
> > + of_node = of_find_node_by_path("/firmware/coreboot");
> > + if (!of_node)
> > + return -ENODEV;
> > +
>
> I don't beleive that you need this module init function. Please use the
> usual DT probing infrastrucutre instead, e.g. add:
>
> MODULE_DEVICE_TABLE(of, coreboot_of_match);
> module_platform_driver(coreboot_table_of_driver);
That doesn't work. If this node is placed under /firmware, which isn't a
proper "bus", then we have to explicitly look for the sub-device.
Due to this, the MODULE_DEVICE_TABLE() also isn't useful, because the
/firmware/coreboot/ device won't be generated automatically, and so no
matching uevent will occur.
Brian
next prev parent reply other threads:[~2017-03-24 18:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 21:04 [PATCH 0/5] firmware: google memconsole Thierry Escande
2017-03-23 21:04 ` [PATCH 1/5] firmware: google memconsole: Remove useless submenu in Kconfig Thierry Escande
[not found] ` <1490303069-13230-1-git-send-email-thierry.escande-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-03-23 21:04 ` [PATCH 2/5] firmware: google memconsole: Move specific EBDA parts Thierry Escande
2017-03-23 21:04 ` [PATCH 3/5] firmware: google memconsole: Add coreboot support Thierry Escande
2017-03-23 21:04 ` [PATCH 4/5] firmware: Add coreboot device tree binding documentation Thierry Escande
2017-03-24 12:21 ` Mark Rutland
2017-03-24 17:57 ` Brian Norris
2017-03-24 19:32 ` Julius Werner
[not found] ` <CAODwPW94vsaWF8+DrLduWhHpbBvdvynbDocXCv2ekZH178BHjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-24 19:33 ` Julius Werner
2017-03-23 21:04 ` [PATCH 5/5] firmware: google memconsole: Add ARM/ARM64 support Thierry Escande
2017-03-26 1:41 ` kbuild test robot
[not found] ` <1490303069-13230-6-git-send-email-thierry.escande-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-03-24 12:28 ` Mark Rutland
2017-03-24 18:00 ` Brian Norris [this message]
2017-03-24 19:50 ` Julius Werner
2017-03-27 16:56 ` Brian Norris
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=20170324180043.GC119093@google.com \
--to=briannorris@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=robh@kernel.org \
--cc=swarren@nvidia.com \
--cc=thierry.escande@collabora.com \
/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).