qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/14] hw/stellaris: Removed gpio_out init array


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH 05/14] hw/stellaris: Removed gpio_out init array.
Date: Sat, 6 Oct 2012 00:17:39 +1000

On Fri, Oct 5, 2012 at 10:31 PM, Peter Maydell <address@hidden> wrote:
> On 5 October 2012 01:08, Peter Crosthwaite
> <address@hidden> wrote:
>> From: Peter A. G. Crosthwaite <address@hidden>
>>
>> stellaris_init() defines arrays of qemu_irq to decides what each of the GPIO
>> pins are connected to. This is ok for inputs (as an input can only have one
>> source) but is flawed for outputs as an output can connect to any number of
>> sinks. Removed the gpio_out array completely and just replaced its setters 
>> with
>> direct calls to qdev_connect_gpio_out().
>
> You can only connect an output to one sink. (If you want to wire it to
> multiple places you need to use a qemu_irq_split() somewhere.) What
> bug is this patch fixing?
>

qemu_irq_split() is the answer, this patch is deleted in v9.

Regards,
Peter

> -- PMM
>
>> Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
>> ---
>>  hw/stellaris.c |   26 ++++++++++++--------------
>>  1 files changed, 12 insertions(+), 14 deletions(-)
>>
>> diff --git a/hw/stellaris.c b/hw/stellaris.c
>> index 01050d1..a7b68f4 100644
>> --- a/hw/stellaris.c
>> +++ b/hw/stellaris.c
>> @@ -1244,7 +1244,6 @@ static void stellaris_init(const char 
>> *kernel_filename, const char *cpu_model,
>>      qemu_irq *pic;
>>      DeviceState *gpio_dev[7];
>>      qemu_irq gpio_in[7][8];
>> -    qemu_irq gpio_out[7][8];
>>      qemu_irq adc;
>>      int sram_size;



reply via email to

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