aboutsummaryrefslogtreecommitdiff
path: root/hw/omap2.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-07 14:30:38 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-07 14:30:38 +0000
commite927bb0070c9f946cfe4a276ebccfab9c5f03e0e (patch)
treea58e2d43a294d72e9c713ce9f36a1f5f277383d8 /hw/omap2.c
parenta350e694245c1ce9492c67db83e1fd325e767769 (diff)
downloadqemu-e927bb0070c9f946cfe4a276ebccfab9c5f03e0e.zip
qemu-e927bb0070c9f946cfe4a276ebccfab9c5f03e0e.tar.gz
qemu-e927bb0070c9f946cfe4a276ebccfab9c5f03e0e.tar.bz2
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/omap2.c')
-rw-r--r--hw/omap2.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/hw/omap2.c b/hw/omap2.c
index 32c8cc7..8ace422 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -1109,7 +1109,7 @@ struct omap_mcspi_s {
struct omap_mcspi_ch_s {
qemu_irq txdrq;
qemu_irq rxdrq;
- uint32_t (*txrx)(void *opaque, uint32_t);
+ uint32_t (*txrx)(void *opaque, uint32_t, int);
void *opaque;
uint32_t tx;
@@ -1157,7 +1157,8 @@ static void omap_mcspi_transfer_run(struct omap_mcspi_s *s, int chnum)
if (!(s->control & 1) || /* SINGLE */
(ch->config & (1 << 20))) { /* FORCE */
if (ch->txrx)
- ch->rx = ch->txrx(ch->opaque, ch->tx);
+ ch->rx = ch->txrx(ch->opaque, ch->tx, /* WL */
+ 1 + (0x1f & (ch->config >> 7)));
}
ch->tx = 0;
@@ -1408,7 +1409,7 @@ struct omap_mcspi_s *omap_mcspi_init(struct omap_target_agent_s *ta, int chnum,
}
void omap_mcspi_attach(struct omap_mcspi_s *s,
- uint32_t (*txrx)(void *opaque, uint32_t), void *opaque,
+ uint32_t (*txrx)(void *opaque, uint32_t, int), void *opaque,
int chipselect)
{
if (chipselect < 0 || chipselect >= s->chnum)
@@ -1476,7 +1477,8 @@ static uint32_t omap_sti_read(void *opaque, target_phys_addr_t addr)
case 0x24: /* STI_ER / STI_DR / XTI_TRACESELECT */
case 0x28: /* STI_RX_DR / XTI_RXDATA */
- break;
+ /* TODO */
+ return 0;
case 0x2c: /* STI_CLK_CTRL / XTI_SCLKCRTL */
return s->clkcontrol;
@@ -1527,6 +1529,9 @@ static void omap_sti_write(void *opaque, target_phys_addr_t addr,
case 0x24: /* STI_ER / STI_DR / XTI_TRACESELECT */
case 0x28: /* STI_RX_DR / XTI_RXDATA */
+ /* TODO */
+ return;
+
default:
OMAP_BAD_REG(addr);
return;