On Wed, 26 Jul 2023 at 14:51, Sergey Kambalin <[email protected]> wrote:
>
> Signed-off-by: Sergey Kambalin <[email protected]>
> ---
>  hw/gpio/bcm2838_gpio.c | 197 ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 193 insertions(+), 4 deletions(-)


>  static void bcm2838_gpio_reset(DeviceState *dev)
>  {
>      BCM2838GpioState *s = BCM2838_GPIO(dev);
>
> +    int i;
> +    for (i = 0; i < 6; i++) {
> +        gpfsel_set(s, i, 0);
> +    }

This is a rather inefficient way to do
   memset(s->fsel, 0, sizeof(s->fsel));


Otherwise
Reviewed-by: Peter Maydell <[email protected]>

thanks
-- PMM

Reply via email to