QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: "Inès Varhol" <ines.varhol@telecom-paris.fr>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-arm@nongnu.org, "Alistair Francis" <alistair@alistair23.me>,
	"Inès Varhol" <ines.varhol@telecom-paris.fr>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH 2/4] hw/gpio: Handle clock migration in STM32L4x5 gpios
Date: Tue,  7 May 2024 20:55:39 +0200	[thread overview]
Message-ID: <20240507185854.34572-3-ines.varhol@telecom-paris.fr> (raw)
In-Reply-To: <20240507185854.34572-1-ines.varhol@telecom-paris.fr>

STM32L4x5 GPIO wasn't migrating its clock.

Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
---
 hw/gpio/stm32l4x5_gpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/gpio/stm32l4x5_gpio.c b/hw/gpio/stm32l4x5_gpio.c
index 71bf5fddb2..30d8d6cba4 100644
--- a/hw/gpio/stm32l4x5_gpio.c
+++ b/hw/gpio/stm32l4x5_gpio.c
@@ -20,6 +20,7 @@
 #include "qemu/log.h"
 #include "hw/gpio/stm32l4x5_gpio.h"
 #include "hw/irq.h"
+#include "hw/clock.h"
 #include "hw/qdev-clock.h"
 #include "hw/qdev-properties.h"
 #include "qapi/visitor.h"
@@ -426,8 +427,8 @@ static void stm32l4x5_gpio_realize(DeviceState *dev, Error **errp)
 
 static const VMStateDescription vmstate_stm32l4x5_gpio = {
     .name = TYPE_STM32L4X5_GPIO,
-    .version_id = 1,
-    .minimum_version_id = 1,
+    .version_id = 2,
+    .minimum_version_id = 2,
     .fields = (VMStateField[]){
         VMSTATE_UINT32(moder, Stm32l4x5GpioState),
         VMSTATE_UINT32(otyper, Stm32l4x5GpioState),
@@ -441,6 +442,7 @@ static const VMStateDescription vmstate_stm32l4x5_gpio = {
         VMSTATE_UINT32(ascr, Stm32l4x5GpioState),
         VMSTATE_UINT16(disconnected_pins, Stm32l4x5GpioState),
         VMSTATE_UINT16(pins_connected_high, Stm32l4x5GpioState),
+        VMSTATE_CLOCK(clk, Stm32l4x5GpioState),
         VMSTATE_END_OF_LIST()
     }
 };
-- 
2.43.2



  parent reply	other threads:[~2024-05-07 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 18:55 [PATCH 0/4] Check clock connection between STM32L4x5 RCC and peripherals Inès Varhol
2024-05-07 18:55 ` [PATCH 1/4] hw/misc: Create STM32L4x5 SYSCFG clock Inès Varhol
2024-05-07 18:55 ` Inès Varhol [this message]
2024-05-08  8:26   ` [PATCH 2/4] hw/gpio: Handle clock migration in STM32L4x5 gpios Philippe Mathieu-Daudé
2024-05-07 18:55 ` [PATCH 3/4] hw/char: Add QOM property for STM32L4x5 USART clock frequency Inès Varhol
2024-05-07 18:55 ` [PATCH 4/4] tests/qtest: Check STM32L4x5 clock connections Inès Varhol
2024-05-20 14:36 ` [PATCH 0/4] Check clock connection between STM32L4x5 RCC and peripherals Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2024-05-05 14:05 Inès Varhol
2024-05-05 14:05 ` [PATCH 2/4] hw/gpio: Handle clock migration in STM32L4x5 gpios Inès Varhol
2024-05-06  9:38   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240507185854.34572-3-ines.varhol@telecom-paris.fr \
    --to=ines.varhol@telecom-paris.fr \
    --cc=alistair@alistair23.me \
    --cc=arnaud.minier@telecom-paris.fr \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).