Re: [PATCH 1/7] drivers: bus: Add ti-sysc bus driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> 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@xxxxxxxxx>
> > ---
> > 
> > +
> > +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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux