From 775616c3ae8c9bdd43d57274f259b09ae87217b0 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sat, 24 Nov 2007 23:35:08 +0000 Subject: Partial SD card SPI mode support. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3731 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pl061.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'hw/pl061.c') diff --git a/hw/pl061.c b/hw/pl061.c index d9a6f50f86..3ac0a4c100 100644 --- a/hw/pl061.c +++ b/hw/pl061.c @@ -48,6 +48,7 @@ typedef struct { uint8_t slr; uint8_t den; uint8_t cr; + uint8_t float_high; qemu_irq irq; qemu_irq out[8]; } pl061_state; @@ -56,18 +57,22 @@ static void pl061_update(pl061_state *s) { uint8_t changed; uint8_t mask; + uint8_t out; int i; - changed = s->old_data ^ s->data; + /* Outputs float high. */ + /* FIXME: This is board dependent. */ + out = (s->data & s->dir) | ~s->dir; + changed = s->old_data ^ out; if (!changed) return; - s->old_data = s->data; + s->old_data = out; for (i = 0; i < 8; i++) { mask = 1 << i; - if ((changed & mask & s->dir) && s->out) { - DPRINTF("Set output %d = %d\n", i, (s->data & mask) != 0); - qemu_set_irq(s->out[i], (s->data & mask) != 0); + if ((changed & mask) && s->out) { + DPRINTF("Set output %d = %d\n", i, (out & mask) != 0); + qemu_set_irq(s->out[i], (out & mask) != 0); } } -- cgit v1.2.3