qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] TSC2005 interrupt handling fix


From: andrzej zaborowski
Subject: Re: [Qemu-devel] [PATCH] TSC2005 interrupt handling fix
Date: Mon, 5 Jan 2009 06:33:06 +0100

2008/12/19 Riihimaki Juha (Nokia-D-MSW/Helsinki) <address@hidden>:
> Fixing couple of timing related issues in the TSC2005 emulation.
>
> Problems:
> 1) Setting DAV bits while previous conversion results are being read results
> in PINTDAV interrupt line never being released.
> 2) Altering PINTDAV state during SPI data transfer can result in an
> inconsistent interrupt state.

Is that because the read happens in two steps (write register number,
read value)?

The specs say that the DAV bit is not reset, and new conversion
doesn't start until the result is completely read out, I assumed that
means it starts after the read command is written, rather than after
both steps finished.  If this wrong, then I see how this can cause
problems.

>
> Solution proposal:
> Moved PINTDAV altering code from tsc2005_pin_update to tsc2005_timer_tick
> and prohibited setting of DAV bits unless PINTDAV is to be set.

You moved the qemu_set_irq to the timer callback while the irq can be
set/reset in other situations too (e.g. on reset). I thinkt he correct
thing to do might be to leave tsc2005_pin_update as it and not reset
the dav bit immediately (adn thus not deassert PINTDAV) until the
value is also fully read.  Only then we would assign s->dav and call
tsc2005_pin_update again and start a new conversion.

Same might apply to tsc2102.

Cheers




reply via email to

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