]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
Fix a bad comparison, spotted by Paul Brook.
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 22 Jul 2008 01:57:42 +0000 (01:57 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 22 Jul 2008 01:57:42 +0000 (01:57 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4922 c046a42c-6fe2-441c-8c8c-71466251a162

hw/omap_dma.c
hw/soc_dma.c

index df4fb01c999d9d11a57d5fec3928b0536761098a..ba980df5e17d71ecaced7f8bb290495427c97a01 100644 (file)
@@ -668,6 +668,9 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
         /* If the channel is async, update cpc */
         if (!ch->sync && frames)
             ch->cpc = a->dest & 0xffff;
+
+        /* TODO: if the destination port is IMIF or EMIFF, set the dirty
+         * bits on it.  */
     }
 
     omap_dma_interrupts_update(s);
index f46e26060045bf405823e50d3286b29031133d89..4ff8cae7c24d3ae88f26b76263fd93b682b77e05 100644 (file)
@@ -49,7 +49,7 @@ static void *fifo_buf;
 static int fifo_size;
 void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
 {
-    if (ch->bytes < fifo_size)
+    if (ch->bytes > fifo_size)
         fifo_buf = realloc(fifo_buf, fifo_size = ch->bytes);
 
     /* Implement as transfer_fifo2linear + transfer_linear2fifo.  */
@@ -251,6 +251,7 @@ struct soc_dma_s *soc_dma_init(int n)
     }
 
     soc_dma_reset(&s->soc);
+    fifo_size = 0;
 
     return &s->soc;
 }