qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 8/8] [MIPS] qdev: convert rc4030 to sysbus devic


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 8/8] [MIPS] qdev: convert rc4030 to sysbus device
Date: Sat, 25 Sep 2010 10:43:18 +0000

On Sat, Sep 25, 2010 at 9:59 AM, Markus Armbruster <address@hidden> wrote:
> Blue Swirl <address@hidden> writes:
>
>> 2010/9/8 Hervé Poussineau <address@hidden>:
>>> Use it in Jazz emulation
>>> Remove rc4030_init() function, which is not used anymore
>>>
>>> Signed-off-by: Hervé Poussineau <address@hidden>
>>> ---
>>>  hw/mips.h      |    4 +-
>>>  hw/mips_jazz.c |    8 +--
>>>  hw/rc4030.c    |  135 
>>> ++++++++++++++++++++++++++-----------------------------
>>>  3 files changed, 69 insertions(+), 78 deletions(-)
>>>
>>> diff --git a/hw/mips.h b/hw/mips.h
>>> index 2897ea6..bdbe024 100644
>>> --- a/hw/mips.h
>>> +++ b/hw/mips.h
>>> @@ -16,8 +16,8 @@ typedef struct rc4030DMAState *rc4030_dma;
>>>  void rc4030_dma_memory_rw(void *opaque, target_phys_addr_t addr, uint8_t 
>>> *buf, int len, int is_write);
>>>  void rc4030_dma_read(void *dma, uint8_t *buf, int len);
>>>  void rc4030_dma_write(void *dma, uint8_t *buf, int len);
>>> -
>>> -void *rc4030_init(qemu_irq timer, rc4030_dma **dmas);
>>> +extern rc4030_dma *rc4030_dmas;
>>> +extern void *rc4030_dma_opaque;
>>
>> These should be device properties (DEFINE_PROP_PTR, qdev_set_prop_ptr().
>
> Note: DEFINE_PROP_PTR() & friends are for dirty hacks only.  Maybe we
> should talk about how to do it cleanly.

We'd probably need something like an unified DMA structure at qdev
level. Then the global DMA access and mapping routines should be
hidden inside that structure.

Another interesting case is pcnet/lance, there also the bus is
different (PCI vs. SysBus). Can we still have common DMA structure, or
do we need PCIDMA and SysBusDMA?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]