[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 8/9] MicroBlaze: Add a config that is dynamicall
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH 8/9] MicroBlaze: Add a config that is dynamically set up by a device tree file. |
Date: |
Wed, 12 Sep 2012 10:17:36 +1000 |
On Tue, 2012-09-11 at 19:27 +0000, Blue Swirl wrote:
> On Mon, Sep 10, 2012 at 12:20 AM, <address@hidden> wrote:
> > From: Chris Wulff <address@hidden>
> >
> > +/*
> > + * 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 }
> > +};
> > +