aboutsummaryrefslogtreecommitdiff
path: root/hw/esp.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-07-09 12:02:26 +0200
committerBlue Swirl <blauwirbel@gmail.com>2012-07-14 10:12:09 +0000
commitd32e4b3d73faa143ed006b2345130d94648dcde6 (patch)
tree560563810c043e7bddc0b7d4a50ef006fb8cd035 /hw/esp.c
parent6915bff1a853196479c7c9427abb434919ef362d (diff)
esp: support future change of chip_id
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/esp.c')
-rw-r--r--hw/esp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/esp.c b/hw/esp.c
index 85078e047a..a1f5b8a28f 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -50,6 +50,7 @@ struct ESPState {
uint8_t wregs[ESP_REGS];
qemu_irq irq;
uint32_t it_shift;
+ uint8_t chip_id;
int32_t ti_size;
uint32_t ti_rptr, ti_wptr;
uint32_t status;
@@ -475,7 +476,7 @@ static void esp_hard_reset(DeviceState *d)
memset(s->rregs, 0, ESP_REGS);
memset(s->wregs, 0, ESP_REGS);
- s->rregs[ESP_TCHI] = TCHI_FAS100A; // Indicate fas100a
+ s->rregs[ESP_TCHI] = s->chip_id;
s->ti_size = 0;
s->ti_rptr = 0;
s->ti_wptr = 0;
@@ -759,6 +760,7 @@ static int esp_init1(SysBusDevice *dev)
sysbus_init_irq(dev, &s->irq);
assert(s->it_shift != -1);
+ s->chip_id = TCHI_FAS100A;
memory_region_init_io(&s->iomem, &esp_mem_ops, s,
"esp", ESP_REGS << s->it_shift);
sysbus_init_mmio(dev, &s->iomem);