qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Inès Varhol" <ines.varhol@telecom-paris.fr>
Cc: qemu-devel@nongnu.org, "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>,
	"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 0/4] Check clock connection between STM32L4x5 RCC and peripherals
Date: Mon, 20 May 2024 15:36:24 +0100	[thread overview]
Message-ID: <CAFEAcA8=vnpPU7bXmd89PSXOB31aEp+RP41BrM1N2kY=nhc8fw@mail.gmail.com> (raw)
In-Reply-To: <20240507185854.34572-1-ines.varhol@telecom-paris.fr>

On Tue, 7 May 2024 at 19:59, Inès Varhol <ines.varhol@telecom-paris.fr> wrote:
>
> Among implemented STM32L4x5 devices, USART, GPIO and SYSCFG
> have a clock source, but none has a corresponding test in QEMU.
>
> This patch makes sure that all 3 devices create a clock,
> have a QOM property to access the clock frequency,
> and adds QTests checking that clock enable in RCC has the
> expected results.
>
> Philippe Mathieu-Daudé suggested the following :
> ".. We could add the clock properties
> directly in qdev_init_clock_in(). Seems useful for the QTest
> framework."
>
> However Peter Maydell pointed out the following :
> "...Mostly "frequency" properties on devices are for the case
> where they *don't* have a Clock input and instead have
> ad-hoc legacy handling where the board/SoC that creates the
> device sets an integer property to define the input frequency
> because it doesn't model the clock tree with Clock objects."
>
> You both agree on the fact that replicating the code in the
> different devices is a bad idea, what should be the
> alternative?

I think we should use the approach discussed in the review
comments on Philippe's patch
https://patchew.org/QEMU/20240508141333.44610-1-philmd@linaro.org/
where if we're running a qtest then the core clock code creates a
QOM property which is the clock period; the test code can then use
that.

thanks
-- PMM


  parent reply	other threads:[~2024-05-20 14:37 UTC|newest]

Thread overview: 8+ 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 ` [PATCH 2/4] hw/gpio: Handle clock migration in STM32L4x5 gpios Inès Varhol
2024-05-08  8:26   ` 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 ` Peter Maydell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-05 14:05 [PATCH 0/4] Check clock connection between STM32L4x5 RCC and peripherals Inès Varhol

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='CAFEAcA8=vnpPU7bXmd89PSXOB31aEp+RP41BrM1N2kY=nhc8fw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=arnaud.minier@telecom-paris.fr \
    --cc=ines.varhol@telecom-paris.fr \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --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 NNTP newsgroup(s).