qemu-devel
[Top][All Lists]
Advanced

[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: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 8/9] MicroBlaze: Add a config that is dynamically set up by a device tree file.
Date: Fri, 14 Sep 2012 19:13:58 +0000

On Wed, Sep 12, 2012 at 12:17 AM, Peter Crosthwaite
<address@hidden> wrote:
> 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.

OK, the device code is mixed with the board code and that was
confusing me. It could be better to move the device part to a separate
file.

>
> 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

[Prev in Thread] Current Thread [Next in Thread]