qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.


From: Jean-Christophe DUBOIS
Subject: Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.
Date: Mon, 9 Jan 2017 22:19:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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 ?

Regards.

JC

Le 09/01/2017 à 21:05, Jean-Christophe DUBOIS a écrit :
Le 09/01/2017 à 20:06, Peter Maydell a écrit :
On 9 January 2017 at 19:04, mar.krzeminski <address@hidden> wrote:

W dniu 09.01.2017 o 11:46, Peter Maydell pisze:
Calling qemu_set_irq() in a device reset function is a bit
tricky, because in a full system reset the device at the other
end might have already reset or might not, and calling into
its handler function for the irq line change might provoke
an unwanted change of its state. We don't really have a coherent
model here but for the moment we just try to avoid calling
set_irq in a reset method.
JC, if you remove qemu_set_irq() call from reset, at least m25p80 behavior should not change since m25p80 reset handler will reset it's whole internal
state.
I noticed the reset function is also called from within the
register emulation too, so it's maybe not quite that simple...
OK, I'll fix it.

JC


thanks
-- PMM









reply via email to

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