ESP : Fix status register update
PATCH 1/1 ESP : Fix status register update
The Count to zero flag (STAT_TC) must not be cleared after an Interrupt Status register read.
Signed-off-by Olivier Danet <[email protected]>
---
hw/esp.c 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hw/esp.c +1 -1
@@ -525,9 +525,9 @@ static uint32_t esp_mem_readb(void *opaque, target_phys_addr_t addr)except TC */ old_val = s->rregs[ESP_RINTR]; s->rregs[ESP_RINTR] = 0; - s->rregs[ESP_RSTAT] &= ~STAT_TC; s->rregs[ESP_RSEQ] = SEQ_CD; esp_lower_irq(s); + s->rregs[ESP_RSTAT] &= STAT_TC STAT_MI; return old_val; default:
Signature · 1 line
1.6.2.4
Quoted 3 lines · Olivier DANET
The Count to zero flag (
STAT_TC) must not be cleared after an Interrupt Status register read.
This is not what the patch is supposed to do, STAT_TC is already not cleared. I think you are trying to save Phase bits (2 to 0).
Quoted 11 lines
Signed-off-by Olivier Danet <[email protected]>---
hw/esp.c 2 +-1 files changed, 1 insertions(+), 1 deletions(-)hw/esp.c +0
-0@@ -525,9 +525,9 @@ static uint32_t esp_mem_readb(void *opaque, target_phys_addr_t addr)
Quoted 7 lines
except TC */
old_val= s->rregs[ESP_RINTR];
s->rregs[ESP_RINTR] = 0;
- s->rregs[ESP_RSTAT] &= ~STAT_TC;
s->rregs[ESP_RSEQ] =SEQ_CD;
esp_lower_irq(s);
+ s->rregs[ESP_RSTAT] &=STAT_TCSTAT_MI;
This seems to miss something, like ~( | ). Why move the line?