[4920] Handle on-chip DMA controllers in one place, convert OMAP DMA to use it.
Revision: 4920
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4920 Author: balrog Date: 2008-07-21 20:40:22 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Handle on-chip DMA controllers in one place, convert OMAP DMA to use it.
Modified Paths:
--------------
trunk/Makefile.target
trunk/hw/omap.h
trunk/hw/omap1.c
trunk/hw/omap2.c
trunk/hw/omap_dma.c
Added Paths:
-----------
trunk/hw/soc_dma.c
trunk/hw/soc_dma.h
Modified: trunk/Makefile.target
===================================================================
Makefile.target +1 -1
@@ -594,7 +594,7 @@ OBJS+= pflash_cfi01.o gumstix.o OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o -OBJS+= omap2.o omap_dss.o +OBJS+= omap2.o omap_dss.o soc_dma.o OBJS+= palm.o tsc210x.o OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o OBJS+= tsc2005.o
Modified: trunk/hw/omap.h
===================================================================
hw/omap.h +6 -6
@@ -417,14 +417,14 @@ omap_dma_4, }; -struct omap_dma_s ; -struct omap_dma_s *omap_dma_init (target_phys_addr_t base,qemu_irq *irqs, +struct soc_dma_s ; +struct soc_dma_s *omap_dma_init (target_phys_addr_t base,qemu_irq *irqs,qemu_irq lcd_irq,struct omap_mpu_state_s *mpu,omap_clk clk,enum omap_dma_model model); -struct omap_dma_s *omap_dma4_init (target_phys_addr_t base,qemu_irq *irqs, +struct soc_dma_s *omap_dma4_init (target_phys_addr_t base,qemu_irq *irqs,struct omap_mpu_state_s *mpu,int fifo,int chans,omap_clk iclk,omap_clk fclk); -void omap_dma_reset (struct omap_dma_s *s); +void omap_dma_reset (struct soc_dma_s *s);struct dma_irq_map {int ih;
@@ -494,7 +494,7 @@ram_addr_t phys_framebuffer[2 ];qemu_irq irq;struct omap_mpu_state_s *mpu; -} *omap_dma_get_lcdch(struct omap_dma_s *s); +} *omap_dma_get_lcdch(struct soc_dma_s *s);/* * DMA request numbers for OMAP1
@@ -882,7 +882,7 @@/* MPU private TIPB peripherals */ struct omap_intr_handler_s *ih[2 ]; -struct omap_dma_s *dma; +struct soc_dma_s *dma;struct omap_mpu_timer_s *timer[3 ];struct omap_watchdog_timer_s *wdt;
Modified: trunk/hw/omap1.c
===================================================================
hw/omap1.c +7 -0
@@ -24,6 +24,7 @@#include "sysemu.h" #include "qemu-timer.h" #include "qemu-char.h" +#include "soc_dma.h" /* We use pc-style serial ports. */ #include "pc.h"
@@ -4704,6 +4705,12 @@ s->port[local ].addr_valid = omap_validate_local_addr; s->port[tipb_mpui].addr_valid = omap_validate_tipb_mpui_addr; +/* Register SDRAM and SRAM DMA ports for fast transfers. */ +soc_dma_port_add_mem_ram (s->dma, + emiff_base,OMAP_EMIFF_BASE , s->sdram_size); +soc_dma_port_add_mem_ram (s->dma, + imif_base,OMAP_IMIF_BASE , s->sram_size); + s->timer[0 ] =omap_mpu_timer_init (0xfffec500 , s->irq[0 ][OMAP_INT_TIMER1 ],omap_findclk (s,"mputim_ck" ));
Modified: trunk/hw/omap2.c
===================================================================
hw/omap2.c +5 -0
@@ -26,6 +26,7 @@#include "qemu-timer.h" #include "qemu-char.h" #include "flash.h" +#include "soc_dma.h" #include "audio/audio.h" /* GP timers */
@@ -4493,6 +4494,10 @@ omap_findclk(s, "sdma_fclk")); s->port->addr_valid = omap2_validate_addr; +/* Register SDRAM and SRAM ports for fast DMA transfers. */ +soc_dma_port_add_mem_ram (s->dma, q2_base,OMAP2_Q2_BASE , s->sdram_size); +soc_dma_port_add_mem_ram (s->dma, sram_base,OMAP2_SRAM_BASE , s->sram_size); + s->uart[0] = omap2_uart_init(omap_l4ta(s->l4, 19), s->irq[0][OMAP_INT_24XX_UART1_IRQ], omap_findclk(s, "uart1_fclk"),
Modified: trunk/hw/omap_dma.c
===================================================================
hw/omap_dma.c +389 -150
781 lines not on this page · raw message
Added: trunk/hw/soc_dma.c
===================================================================
hw/soc_dma.c +366 -0
366 lines not on this page · raw message
Added: trunk/hw/soc_dma.h
===================================================================
hw/soc_dma.h +115 -0
115 lines not on this page · raw message