On 9 January 2017 at 21:19, Jean-Christophe DUBOIS <j...@tribudubois.net> wrote: > Hum, ... I think I have a problem. > > With the default register value (that I get a reset) the CS line is > deselected when the CS is high. > > So at reset I would need to set my 4 CS lines to high in order to be able to > drive them low later. > > So during the "reset" I need to set my 4 CS line to 1 but according to you > feedback I should not do it with qemu_set_irq()... > > Is there another way than qemu_set_irq() to do set my lines to high level ?
"Line should be asserted at device reset" is an awkward case that we can't really handle cleanly at the moment, unfortunately. Assuming that the device at the other end comes out of reset as "not selected" it should still work, though -- there is no state stored in a qemu_set_irq(), so if both ends believe that the reset state of the line is 1 then there's no need to call qemu_set_irq(). thanks -- PMM