[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 44/58] pxa2xx_dma: make req array static
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 44/58] pxa2xx_dma: make req array static |
Date: |
Thu, 24 Feb 2011 18:57:41 +0100 |
We know its size, and it is always allocated
Signed-off-by: Juan Quintela <address@hidden>
---
hw/pxa2xx_dma.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/pxa2xx_dma.c b/hw/pxa2xx_dma.c
index b512d34..6fd2282 100644
--- a/hw/pxa2xx_dma.c
+++ b/hw/pxa2xx_dma.c
@@ -23,6 +23,8 @@ typedef struct {
/* Allow the DMA to be used as a PIC. */
typedef void (*pxa2xx_dma_handler_t)(void *opaque, int irq, int level);
+#define PXA2XX_DMA_NUM_REQUESTS 75
+
struct PXA2xxDMAState {
pxa2xx_dma_handler_t handler;
qemu_irq irq;
@@ -39,7 +41,7 @@ struct PXA2xxDMAState {
int channels;
PXA2xxDMAChannel *chan;
- uint8_t *req;
+ uint8_t req[PXA2XX_DMA_NUM_REQUESTS];
/* Flag to avoid recursive DMA invocations. */
int running;
@@ -48,8 +50,6 @@ struct PXA2xxDMAState {
#define PXA255_DMA_NUM_CHANNELS 16
#define PXA27X_DMA_NUM_CHANNELS 32
-#define PXA2XX_DMA_NUM_REQUESTS 75
-
#define DCSR0 0x0000 /* DMA Control / Status register for Channel 0 */
#define DCSR31 0x007c /* DMA Control / Status register for Channel 31 */
#define DALGN 0x00a0 /* DMA Alignment register */
@@ -495,7 +495,6 @@ static PXA2xxDMAState *pxa2xx_dma_init(target_phys_addr_t
base,
s->chan = qemu_mallocz(sizeof(PXA2xxDMAChannel) * s->channels);
s->irq = irq;
s->handler = (pxa2xx_dma_handler_t) pxa2xx_dma_request;
- s->req = qemu_mallocz(sizeof(uint8_t) * PXA2XX_DMA_NUM_REQUESTS);
memset(s->chan, 0, sizeof(PXA2xxDMAChannel) * s->channels);
for (i = 0; i < s->channels; i ++)
--
1.7.4
- [Qemu-devel] [PATCH 14/58] vmstate: port mipsnet, (continued)
- [Qemu-devel] [PATCH 14/58] vmstate: port mipsnet, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 31/58] vmstate: port pxa2xx_i2s, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 28/58] vmstate: port heathrow_pic, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 48/58] vmstate: port pxa2xx_lcdc, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 53/58] mac_nvram: size is a size, no need to be a target dependent type, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 07/58] vmstate: Add a way to send a partial array, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 46/58] pxa2xx_lcd: name anonymous struct, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 15/58] vmstate: port arm sp804, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 51/58] nand: pin values are uint8_t, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 44/58] pxa2xx_dma: make req array static,
Juan Quintela <=
- [Qemu-devel] [PATCH 54/58] vmstate: port mac_nvram, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 02/58] vmstate: Fix varrays with uint8 indexes, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 33/58] vmstate: port pxa2xx_mm, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 21/58] vmstate: port pxa2xx_keypad, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 20/58] vmstate: port pxa2xx_pic, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 22/58] vmstate: port pl011, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 26/58] vmstate: port stellaris sys, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 27/58] vmstate: port pl022 ssp, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 30/58] vmstate: port stellaris gptm, Juan Quintela, 2011/02/24
- [Qemu-devel] [PATCH 47/58] pxa2xx_lcd: up field is used as a bool and migrated as an uint8_t, Juan Quintela, 2011/02/24