aboutsummaryrefslogtreecommitdiff
path: root/hw/pxa2xx_lcd.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-10 03:36:49 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-10 03:36:49 +0000
commitd758525180e0efff8a59cfea11f5f8348014ff6a (patch)
tree2a6da1aeb63128e8f2837ba481cec8d1e8fd0a98 /hw/pxa2xx_lcd.c
parentb584726df971c1238a5249cc21121cf2ebbcaf55 (diff)
More phys_ram_base elimination.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7064 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pxa2xx_lcd.c')
-rw-r--r--hw/pxa2xx_lcd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c
index 49eafa7226..4fb7d4f722 100644
--- a/hw/pxa2xx_lcd.c
+++ b/hw/pxa2xx_lcd.c
@@ -283,12 +283,11 @@ static inline void pxa2xx_dma_rdst_set(struct pxa2xx_lcdc_s *s)
/* Load new Frame Descriptors from DMA */
static void pxa2xx_descriptor_load(struct pxa2xx_lcdc_s *s)
{
- struct pxa_frame_descriptor_s *desc[PXA_LCDDMA_CHANS];
+ struct pxa_frame_descriptor_s desc;
target_phys_addr_t descptr;
int i;
for (i = 0; i < PXA_LCDDMA_CHANS; i ++) {
- desc[i] = 0;
s->dma_ch[i].source = 0;
if (!s->dma_ch[i].up)
@@ -303,15 +302,14 @@ static void pxa2xx_descriptor_load(struct pxa2xx_lcdc_s *s)
descptr = s->dma_ch[i].descriptor;
if (!(descptr >= PXA2XX_SDRAM_BASE && descptr +
- sizeof(*desc[i]) <= PXA2XX_SDRAM_BASE + phys_ram_size))
+ sizeof(desc) <= PXA2XX_SDRAM_BASE + phys_ram_size))
continue;
- descptr -= PXA2XX_SDRAM_BASE;
- desc[i] = (struct pxa_frame_descriptor_s *) (phys_ram_base + descptr);
- s->dma_ch[i].descriptor = desc[i]->fdaddr;
- s->dma_ch[i].source = desc[i]->fsaddr;
- s->dma_ch[i].id = desc[i]->fidr;
- s->dma_ch[i].command = desc[i]->ldcmd;
+ cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc));
+ s->dma_ch[i].descriptor = tswap32(desc.fdaddr);
+ s->dma_ch[i].source = tswap32(desc.fsaddr);
+ s->dma_ch[i].id = tswap32(desc.fidr);
+ s->dma_ch[i].command = tswap32(desc.ldcmd);
}
}