]> Git Repo - qemu.git/commitdiff
dma/pl330: Fix buffer depth
authorPeter Crosthwaite <[email protected]>
Wed, 26 Feb 2014 17:20:08 +0000 (17:20 +0000)
committerPeter Maydell <[email protected]>
Wed, 26 Feb 2014 17:20:08 +0000 (17:20 +0000)
This is the product of the data-width and the depth arguments, I.e the
depth of the FIFO is in terms of data entries and not bytes (which is
what the original implementation was suggesting). Fix.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: c34de31031511538ccdb3164b48ee8a6a973ebd4.1393372019[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/dma/pl330.c

index 303f8b8f2c69bc3b871e39a150e98f5b04fad95b..b5d586b92b36495bf6fbb333704e641e2d199eaa 100644 (file)
@@ -1606,7 +1606,7 @@ static void pl330_realize(DeviceState *dev, Error **errp)
 
     pl330_queue_init(&s->read_queue, s->rd_q_dep, s);
     pl330_queue_init(&s->write_queue, s->wr_q_dep, s);
 
     pl330_queue_init(&s->read_queue, s->rd_q_dep, s);
     pl330_queue_init(&s->write_queue, s->wr_q_dep, s);
-    pl330_fifo_init(&s->fifo, s->data_buffer_dep);
+    pl330_fifo_init(&s->fifo, s->data_width / 4 * s->data_buffer_dep);
 }
 
 static Property pl330_properties[] = {
 }
 
 static Property pl330_properties[] = {
This page took 0.027341 seconds and 4 git commands to generate.