diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-07 14:30:38 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-07 14:30:38 +0000 |
commit | e927bb0070c9f946cfe4a276ebccfab9c5f03e0e (patch) | |
tree | a58e2d43a294d72e9c713ce9f36a1f5f277383d8 /hw/tsc210x.c | |
parent | a350e694245c1ce9492c67db83e1fd325e767769 (diff) |
Nokia N810 basic system emulation.
Add TSC2005 touchscreen controller.
Add N810 machine definition.
Unify N800 and N810 ATAG list generation.
Pass a word length parameter on every SPI transfer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4374 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tsc210x.c')
-rw-r--r-- | hw/tsc210x.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/hw/tsc210x.c b/hw/tsc210x.c index da2efeda89..e512087238 100644 --- a/hw/tsc210x.c +++ b/hw/tsc210x.c @@ -939,11 +939,15 @@ static void tsc210x_write(struct tsc210x_state_s *s, uint16_t value) } } -uint32_t tsc210x_txrx(void *opaque, uint32_t value) +uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len) { struct tsc210x_state_s *s = opaque; uint32_t ret = 0; + if (len != 16) + cpu_abort(cpu_single_env, "%s: FIXME: bad SPI word width %i\n", + __FUNCTION__, len); + /* TODO: sequential reads etc - how do we make sure the host doesn't * unintentionally read out a conversion result from a register while * transmitting the command word of the next command? */ @@ -1124,12 +1128,12 @@ struct uwire_slave_s *tsc2102_init(qemu_irq pint, AudioState *audio) s->tr[0] = 0; s->tr[1] = 1; - s->tr[2] = 0; - s->tr[3] = 1; + s->tr[2] = 1; + s->tr[3] = 0; s->tr[4] = 1; s->tr[5] = 0; - s->tr[6] = 0; - s->tr[7] = 1; + s->tr[6] = 1; + s->tr[7] = 0; s->chip.opaque = s; s->chip.send = (void *) tsc210x_write; @@ -1178,12 +1182,12 @@ struct uwire_slave_s *tsc2301_init(qemu_irq penirq, qemu_irq kbirq, s->tr[0] = 0; s->tr[1] = 1; - s->tr[2] = 0; - s->tr[3] = 1; + s->tr[2] = 1; + s->tr[3] = 0; s->tr[4] = 1; s->tr[5] = 0; - s->tr[6] = 0; - s->tr[7] = 1; + s->tr[6] = 1; + s->tr[7] = 0; s->chip.opaque = s; s->chip.send = (void *) tsc210x_write; |