[Top][All Lists]

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

[Qemu-devel] Re: Extending qemu_irq for reset signals

From: Paul Brook
Subject: [Qemu-devel] Re: Extending qemu_irq for reset signals
Date: Wed, 15 Aug 2007 18:21:16 +0100
User-agent: KMail/1.9.7

> Okay, more explaining. This is the case where I'd want to use the
> signal: DMA controller ("upstream") can reset the slave device (ESP or
> Lance). DMA controller is created first and I also want to allocate
> reset signals at that point. Later when ESP is created, it should be
> possible to put ESP reset function and opaque data to the signal given
> but this is not possible with current API. Currently the DMA data
> would be passed to qemu_allocate_irqs.

Ah, I see. The problem here is that you've got a cyclic dependency. For DMA 
operations the ESP is in charge, so it makes sense to create the subservient 
DMA device first. For the reset signals the DMA controller is in charge so 
ideally you create the ESP device first. Because the DMA interface is most 
complicated, it's probably takes precedence.

I think you need to modify or use sparc32_dma_set_reset_data to take a 
qemu_irq rather than a callback and opaque argument. Alternatively you can 
move things around a bit and have the sun4m code do something similar. i.e. 
the ESP and lance devices return the reset lines, then the sun4m code pokes 
into the DMA device state.


reply via email to

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