diff options
author | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-06 10:58:48 +0000 |
---|---|---|
committer | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-06 10:58:48 +0000 |
commit | 3d29e2a7289ab8f4d68ad10cc2d7e90d19517bb2 (patch) | |
tree | 59407b8954a31326586b52bbcf2096987d8c0710 /hw/etraxfs_dma.c | |
parent | fdff344370c99005bebd4d5e4e707d1ff3cabcc7 (diff) | |
download | qemu-3d29e2a7289ab8f4d68ad10cc2d7e90d19517bb2.tar.gz qemu-3d29e2a7289ab8f4d68ad10cc2d7e90d19517bb2.tar.bz2 qemu-3d29e2a7289ab8f4d68ad10cc2d7e90d19517bb2.zip |
ETRAX machine updates.
* Move DMA_run into the dma controller to allow for multiple ETRAX/CRIS machines.
* Support both ELF and kimage kernel images.
* Correct emulation of the DMA RW_DATA register.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4678 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/etraxfs_dma.c')
-rw-r--r-- | hw/etraxfs_dma.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/etraxfs_dma.c b/hw/etraxfs_dma.c index a090a6d6b0..0a5562b9c5 100644 --- a/hw/etraxfs_dma.c +++ b/hw/etraxfs_dma.c @@ -273,6 +273,7 @@ static void channel_load_d(struct fs_dma_ctrl *ctrl, int c) sizeof ctrl->channels[c].current_d); D(dump_d(c, &ctrl->channels[c].current_d)); + ctrl->channels[c].regs[RW_DATA] = addr; ctrl->channels[c].regs[RW_SAVED_DATA_BUF] = (uint32_t)ctrl->channels[c].current_d.buf; } @@ -561,7 +562,7 @@ dma_writel (void *opaque, target_phys_addr_t addr, uint32_t value) switch (addr) { case RW_DATA: - printf("RW_DATA=%x\n", value); + ctrl->channels[c].regs[addr] = value; break; case RW_CFG: @@ -658,6 +659,13 @@ void etraxfs_dmac_connect_client(void *opaque, int c, } +static void *etraxfs_dmac; +void DMA_run(void) +{ + if (etraxfs_dmac) + etraxfs_dmac_run(etraxfs_dmac); +} + void *etraxfs_dmac_init(CPUState *env, target_phys_addr_t base, int nr_channels) { @@ -686,6 +694,8 @@ void *etraxfs_dmac_init(CPUState *env, ctrl->channels[i].regmap); } + /* Hax, we only support one DMA controller at a time. */ + etraxfs_dmac = ctrl; return ctrl; err: qemu_free(ctrl->channels); |