Commit d406647966365b4ea505ef290825b257c678e764

Authored by balrog
1 parent 8706c382

Fix a bad comparison, spotted by Paul Brook.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4922 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 5 additions and 1 deletions
hw/omap_dma.c
... ... @@ -668,6 +668,9 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
668 668 /* If the channel is async, update cpc */
669 669 if (!ch->sync && frames)
670 670 ch->cpc = a->dest & 0xffff;
  671 +
  672 + /* TODO: if the destination port is IMIF or EMIFF, set the dirty
  673 + * bits on it. */
671 674 }
672 675  
673 676 omap_dma_interrupts_update(s);
... ...
hw/soc_dma.c
... ... @@ -49,7 +49,7 @@ static void *fifo_buf;
49 49 static int fifo_size;
50 50 void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
51 51 {
52   - if (ch->bytes < fifo_size)
  52 + if (ch->bytes > fifo_size)
53 53 fifo_buf = realloc(fifo_buf, fifo_size = ch->bytes);
54 54  
55 55 /* Implement as transfer_fifo2linear + transfer_linear2fifo. */
... ... @@ -251,6 +251,7 @@ struct soc_dma_s *soc_dma_init(int n)
251 251 }
252 252  
253 253 soc_dma_reset(&s->soc);
  254 + fifo_size = 0;
254 255  
255 256 return &s->soc;
256 257 }
... ...