[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 08/45] Connect SD controller to BCM2838 GPIO
From: |
Peter Maydell |
Subject: |
Re: [PATCH v4 08/45] Connect SD controller to BCM2838 GPIO |
Date: |
Mon, 18 Dec 2023 16:38:13 +0000 |
On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin <serg.oker@gmail.com> wrote:
>
> Signed-off-by: Sergey Kambalin <sergey.kambalin@auriga.com>
> ---
> hw/gpio/bcm2838_gpio.c | 59 +++++++++++++++++++++++++++++++---
> include/hw/gpio/bcm2838_gpio.h | 5 +++
> 2 files changed, 60 insertions(+), 4 deletions(-)
>
> diff --git a/hw/gpio/bcm2838_gpio.c b/hw/gpio/bcm2838_gpio.c
> index 51eb55b00a..f166ce7959 100644
> --- a/hw/gpio/bcm2838_gpio.c
> +++ b/hw/gpio/bcm2838_gpio.c
> @@ -17,9 +17,10 @@
> #include "qemu/timer.h"
> #include "qapi/error.h"
> #include "hw/sysbus.h"
> -#include "migration/vmstate.h"
> +#include "hw/sd/sd.h"
> #include "hw/gpio/bcm2838_gpio.h"
> #include "hw/irq.h"
> +#include "migration/vmstate.h"
Put the #include in the order you want in the first place,
please, rather than putting it in one place in one patch and
then moving it around in a second patch.
>
> #define GPFSEL0 0x00
> #define GPFSEL1 0x04
> @@ -64,6 +65,16 @@
> @@ -302,15 +343,25 @@ static void bcm2838_gpio_init(Object *obj)
> DeviceState *dev = DEVICE(obj);
> SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
>
> - memory_region_init_io(&s->iomem, obj, &bcm2838_gpio_ops, s,
> - "bcm2838_gpio", BCM2838_GPIO_REGS_SIZE);
> + qbus_init(&s->sdbus, sizeof(s->sdbus), TYPE_SD_BUS, DEVICE(s), "sd-bus");
> +
> + memory_region_init_io(
> + &s->iomem, obj,
> + &bcm2838_gpio_ops, s, "bcm2838_gpio", BCM2838_GPIO_REGS_SIZE);
Oddly placed newline after the "(" here.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- Re: [PATCH v4 02/45] Split out common part of peripherals, (continued)
- [PATCH v4 03/45] Split out raspi machine common part, Sergey Kambalin, 2023/12/07
- [PATCH v4 04/45] Introduce BCM2838 SoC, Sergey Kambalin, 2023/12/07
- [PATCH v4 05/45] Add GIC-400 to BCM2838 SoC, Sergey Kambalin, 2023/12/07
- [PATCH v4 06/45] Add BCM2838 GPIO stub, Sergey Kambalin, 2023/12/07
- [PATCH v4 08/45] Connect SD controller to BCM2838 GPIO, Sergey Kambalin, 2023/12/07
- Re: [PATCH v4 08/45] Connect SD controller to BCM2838 GPIO,
Peter Maydell <=
- [PATCH v4 09/45] Add GPIO and SD to BCM2838 periph, Sergey Kambalin, 2023/12/07
- [PATCH v4 10/45] Add BCM2838 checkpoint support, Sergey Kambalin, 2023/12/07
- [PATCH v4 07/45] Implement BCM2838 GPIO functionality, Sergey Kambalin, 2023/12/07
- [PATCH v4 11/45] Introduce Raspberry PI 4 machine, Sergey Kambalin, 2023/12/07
- [PATCH v4 12/45] Temporarily disable unimplemented rpi4b devices, Sergey Kambalin, 2023/12/07
- [PATCH v4 13/45] Add memory region for BCM2837 RPiVid ASB, Sergey Kambalin, 2023/12/07
- [PATCH v4 14/45] Add BCM2838 PCIE Root Complex, Sergey Kambalin, 2023/12/07