On Tue, 2012-09-11 at 19:27 +0000, Blue Swirl wrote:
> On Mon, Sep 10, 2012 at 12:20 AM,  <crwu...@gmail.com> wrote:
> > From: Chris Wulff <crwu...@gmail.com>
> >
> > +/*
> > + * Xilinx ethernetlite device
> > + */
> > +static void xilinx_ethlite_probe(void *fdt, int node)
> > +{
> > +    uint32_t eth_addr = fdt_get_int_from_array(fdt, node, "reg", 0);
> > +    uint32_t eth_irq = fdt_get_int_from_array(fdt, node, "interrupts", 0);
> > +
> > +    xilinx_ethlite_create(&nd_table[++eth_dev_index], eth_addr,
> > +                          irq[eth_irq], 0, 0);
> 
> The device should not access nd_table, this should be handled at board level.
> 

This is board level isn't it? This function calls
xilinx_ethlite_create() which in turn does the qdev_create so this is
pre device creation. Im open to suggestions on how to do this in a
non-global hacking way however as I have the same problem in my tree.

Regards,
Peter

> > +}
> > +
> > +devinfo_t xilinx_ethlite_device = {
> > +    .probe = &xilinx_ethlite_probe,
> > +    .pass = 1,
> > +    .compat = (const char * []) { "xlnx,xps-ethernetlite-2.00.b", NULL }
> > +};
> > +



Reply via email to