It's a trivial wrapper for soc_dma_port_add_mem(), which makes the memory API conversion more difficult because it takes a ram addr_t. Drop.
Signed-off-by: Avi Kivity <a...@redhat.com> --- hw/omap1.c | 8 ++++---- hw/omap2.c | 6 ++++-- hw/soc_dma.h | 6 ------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/omap1.c b/hw/omap1.c index 09eb363..4b2abb9 100644 --- a/hw/omap1.c +++ b/hw/omap1.c @@ -3848,10 +3848,10 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory, 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); + soc_dma_port_add_mem(s->dma, qemu_get_ram_ptr(emiff_base), + OMAP_EMIFF_BASE, s->sdram_size); + soc_dma_port_add_mem(s->dma, qemu_get_ram_ptr(imif_base), + OMAP_IMIF_BASE, s->sram_size); s->timer[0] = omap_mpu_timer_init(system_memory, 0xfffec500, s->irq[0][OMAP_INT_TIMER1], diff --git a/hw/omap2.c b/hw/omap2.c index ca088d9..3d529ce 100644 --- a/hw/omap2.c +++ b/hw/omap2.c @@ -2284,8 +2284,10 @@ struct omap_mpu_state_s *omap2420_mpu_init(unsigned long sdram_size, 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); + soc_dma_port_add_mem(s->dma, qemu_get_ram_ptr(q2_base), + OMAP2_Q2_BASE, s->sdram_size); + soc_dma_port_add_mem(s->dma, qemu_get_ram_ptr(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], diff --git a/hw/soc_dma.h b/hw/soc_dma.h index c0ebb8d..026479e 100644 --- a/hw/soc_dma.h +++ b/hw/soc_dma.h @@ -105,9 +105,3 @@ static inline void soc_dma_port_add_fifo_out(struct soc_dma_s *dma, { return soc_dma_port_add_fifo(dma, virt_base, fn, opaque, 1); } - -static inline void soc_dma_port_add_mem_ram(struct soc_dma_s *dma, - ram_addr_t offset, target_phys_addr_t virt_base, size_t size) -{ - return soc_dma_port_add_mem(dma, qemu_get_ram_ptr(offset), virt_base, size); -} -- 1.7.6.3