[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 0/3] Add Aspeed GPIO controller model
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH v3 0/3] Add Aspeed GPIO controller model |
Date: |
Wed, 14 Aug 2019 14:46:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 30/07/2019 07:44, Rashmica Gupta wrote:
> There are a couple of things I'm not confident about here:
> - what should be in init vs realize?
> - should the irq state be in vmstate?
> - is there a better way to do composition of classes (patch 3)?
You can not do twice :
obj = object_new(TYPE_ASPEED_GPIO "-ast2600");
in aspeed_2600_gpio_realize(). This feels wrong.
Let's see if we can instantiate two GPIO devices with different types
under the AST2600 SoC instead.
Thanks,
C.
>
> v3:
> - didn't have each gpio set up as an irq
> - now can't access set AC on ast2400 (only exists on ast2500)
> - added ast2600 implementation (patch 3)
> - renamed a couple of variables for clarity
>
>
> v2: Addressed Andrew's feedback, added debounce regs, renamed get/set to
> read/write to minimise confusion with a 'set' of registers.
>
> Rashmica Gupta (3):
> hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500
> aspeed: add a GPIO controller to the SoC
> hw/gpio: Add in AST2600 specific implementation
>
> hw/arm/aspeed_soc.c | 17 +
> hw/gpio/Makefile.objs | 1 +
> hw/gpio/aspeed_gpio.c | 1103 +++++++++++++++++++++++++++++++++
> include/hw/arm/aspeed_soc.h | 3 +
> include/hw/gpio/aspeed_gpio.h | 91 +++
> 5 files changed, 1215 insertions(+)
> create mode 100644 hw/gpio/aspeed_gpio.c
> create mode 100644 include/hw/gpio/aspeed_gpio.h
>