[Top][All Lists]
[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;
- [Qemu-devel] [PULL 0/14] Ehnahced SSI bus support + M25P80 SPI flash + Xilinx SPI controller, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 01/14] ssi: Support for multiple attached devices, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 02/14] ssi: Implemented CS behaviour, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 03/14] ssi: Added create_slave_no_init(), Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 04/14] qdev: allow multiple qdev_init_gpio_in() calls, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 05/14] hw/stellaris: Removed gpio_out init array., Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 06/14] stellaris: Removed SSI mux, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 07/14] hw: Added generic FIFO API., Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 10/14] petalogix-ml605: added SPI controller with n25q128, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 13/14] MAINTAINERS: Added maintainerships for SSI, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 11/14] xilinx_spips: Xilinx Zynq SPI cntrlr device model, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 12/14] xilinx_zynq: Added SPI controllers + flashes, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 14/14] ssi: Add slave autoconnect helper, Peter Crosthwaite, 2012/10/04