On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin <serg.o...@gmail.com> wrote: > > Signed-off-by: Sergey Kambalin <sergey.kamba...@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.mayd...@linaro.org> thanks -- PMM