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
diff --git a/hw/tsc210x.c b/hw/tsc210x.c
index da2efed..e512087 100644
--- a/hw/tsc210x.c
+++ b/hw/tsc210x.c
@@ -939,11 +939,15 @@
}
}
-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 @@
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 @@
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;