mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/7] drivers: bus: Add ti-sysc bus driver
Date: Tue, 12 Feb 2019 14:13:26 +0100	[thread overview]
Message-ID: <cce155c6376da68152e9e2e6771c873a0027ba3a.camel@phytec.de> (raw)
In-Reply-To: <CAHQ1cqGq51BYSwNZ+8YDWHxgeBTEkpVBMguu5_P-SiqkBRoDXg@mail.gmail.com>

Hello Andrey,

Am Montag, den 11.02.2019, 18:57 -0800 schrieb Andrey Smirnov:
> On Mon, Feb 11, 2019 at 7:16 AM Teresa Remmet <t.remmet@phytec.de>
> wrote:
> > 
> > Adds minimal support for the sysc interconnect target module found
> > on many TI SoCs. With this device tree includes have been
> > rearagned.
> > We need the driver to probe the child devices of the bus.
> > 
> > Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
> > ---
> > 
> > +
> > +static const struct of_device_id sysc_match_table[] = {
> > +       { .compatible = "simple-bus", },
> > +       { /* sentinel */ },
> > +};
> > +
> > +static int ti_sysc_probe(struct device_d *dev)
> > +{
> > +       int ret;
> > +
> > +       ret = of_platform_populate(dev->device_node,
> > sysc_match_table, dev);
> 
> Is sysc_match_table really necessary? AFAIK that argument can be NULL
> unless on of the child nodes needs to be treated like a platform bus
> as well.

My first attempted was using NULL but this does not work. As for
example the pinmux node (pinmux@800) is child of a simple-bus. And the
simple-bus itself is a child of a ti-sysc node. See dts/src/arm/am33xx-
l4.dtsi.
The kernel does it the same way. 

> 
> > +       if (ret)
> > +               dev_err(dev, "%s fail to create devices.\n",
> > +                                       dev->device_node-
> > >full_name);
> > +       return ret;
> > +};
> > +
> > +static struct of_device_id ti_sysc_dt_ids[] = {
> > +       { .compatible = "ti,sysc-omap4",},
> > +       { .compatible = "ti,sysc-omap4-simple",},
> > +       { .compatible = "ti,sysc-omap4-timer",},
> > +       { .compatible = "ti,sysc-omap2",},
> > +       { },
> > +};
> > +
> > +static struct driver_d ti_sysc_driver = {
> > +       .name = "ti-sysc",
> > +       .probe = ti_sysc_probe,
> > +       .of_compatible = DRV_OF_COMPAT(ti_sysc_dt_ids),
> > +};
> > +
> > +static int ti_sysc_init(void)
> > +{
> > +       return platform_driver_register(&ti_sysc_driver);
> > +}
> > +postcore_initcall(ti_sysc_init);
> 
> postcore_platform_driver()?

Thanks! I will update this.

Teresa

> 
> Thanks,
> Andrey Smirnov


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-12 13:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 15:16 [PATCH 0/7] " Teresa Remmet
2019-02-11 15:16 ` [PATCH 1/7] drivers: bus: " Teresa Remmet
2019-02-11 15:41   ` Sam Ravnborg
2019-02-12  8:09     ` Sascha Hauer
2019-02-12 13:23       ` Teresa Remmet
2019-02-12 16:32         ` Sam Ravnborg
2019-02-12  2:57   ` Andrey Smirnov
2019-02-12 13:13     ` Teresa Remmet [this message]
2019-02-13  0:56       ` Andrey Smirnov
2019-02-13  8:19         ` Teresa Remmet
2019-02-12  8:10   ` Sascha Hauer
2019-02-12 13:25     ` Teresa Remmet
2019-02-11 15:16 ` [PATCH 2/7] arm: configs: omap_defconfig: Enable " Teresa Remmet
2019-02-11 15:16 ` [PATCH 3/7] arm: configs: am33xx_mlo_defconfig: " Teresa Remmet
2019-02-11 15:16 ` [PATCH 4/7] drivers: of: Add function to enable and register a device by alias Teresa Remmet
2019-02-11 15:16 ` [PATCH 5/7] arm: mach-omap: am335x_generic: Enable nodes by alias where needed Teresa Remmet
2019-02-11 15:16 ` [PATCH 6/7] net: ethernet: cpsw: cpsw-phy-sel: Use phandle for phy sel Teresa Remmet
2019-02-11 15:16 ` [PATCH 7/7] arm: dts: am335x-phytec: Use phy-handle instead of phy_id Teresa Remmet

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=cce155c6376da68152e9e2e6771c873a0027ba3a.camel@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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