qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Inès Varhol" <ines.varhol@telecom-paris.fr>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Alistair Francis <alistair@alistair23.me>,
	Samuel Tardieu <samuel.tardieu@telecom-paris.fr>,
	Thomas Huth <thuth@redhat.com>,
	Arnaud Minier <arnaud.minier@telecom-paris.fr>
Subject: Re: [PATCH v4 2/3] hw/arm: Connect STM32L4x5 GPIO to STM32L4x5 SoC
Date: Fri, 23 Feb 2024 13:25:12 +0100	[thread overview]
Message-ID: <f350fbb7-b954-4bb2-abf4-05ad049ceeae@linaro.org> (raw)
In-Reply-To: <20240207132517.198348-3-ines.varhol@telecom-paris.fr>

On 7/2/24 14:23, Inès Varhol wrote:
> Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr>
> Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
> ---
>   include/hw/arm/stm32l4x5_soc.h |  2 +
>   hw/arm/stm32l4x5_soc.c         | 78 ++++++++++++++++++++++++++++------
>   hw/arm/Kconfig                 |  3 +-
>   3 files changed, 68 insertions(+), 15 deletions(-)


> diff --git a/hw/arm/stm32l4x5_soc.c b/hw/arm/stm32l4x5_soc.c
> index 347a5377e5..ff38585dd6 100644
> --- a/hw/arm/stm32l4x5_soc.c
> +++ b/hw/arm/stm32l4x5_soc.c
> @@ -78,6 +78,32 @@ static const int exti_irq[NUM_EXTI_IRQ] = {
>   #define RCC_BASE_ADDRESS 0x40021000
>   #define RCC_IRQ 5
>   
> +static const uint32_t gpio_addr[

NUM_GPIOS

> ] = {
> +    0x48000000,
> +    0x48000400,
> +    0x48000800,
> +    0x48000C00,
> +    0x48001000,
> +    0x48001400,
> +    0x48001800,
> +    0x48001C00,
> +};
> +
> +static const struct {

gpio_addr[] should be moved in this same struct (eventually
naming it stm32l4x5_gpio_cfg), since the init val are related
to the gpio peripheral / base addr.

> +    uint32_t moder;
> +    uint32_t ospeedr;
> +    uint32_t pupdr;
> +} stm32l4x5_gpio_initval[NUM_GPIOS] = {
> +    { 0xABFFFFFF, 0x0C000000, 0x64000000 },
> +    { 0xFFFFFEBF, 0x00000000, 0x00000100 },
> +    { 0xFFFFFFFF, 0x00000000, 0x00000000 },
> +    { 0xFFFFFFFF, 0x00000000, 0x00000000 },
> +    { 0xFFFFFFFF, 0x00000000, 0x00000000 },
> +    { 0xFFFFFFFF, 0x00000000, 0x00000000 },
> +    { 0xFFFFFFFF, 0x00000000, 0x00000000 },
> +    { 0x0000000F, 0x00000000, 0x00000000 },
> +};

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



  reply	other threads:[~2024-02-23 12:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 13:23 [PATCH v4 0/3] Add device STM32L4x5 GPIO Inès Varhol
2024-02-07 13:23 ` [PATCH v4 1/3] hw/gpio: Implement " Inès Varhol
2024-02-23 12:17   ` Philippe Mathieu-Daudé
2024-02-07 13:23 ` [PATCH v4 2/3] hw/arm: Connect STM32L4x5 GPIO to STM32L4x5 SoC Inès Varhol
2024-02-23 12:25   ` Philippe Mathieu-Daudé [this message]
2024-02-07 13:23 ` [PATCH v4 3/3] tests/qtest: Add STM32L4x5 GPIO QTest testcase Inès Varhol
2024-02-23 12:26   ` 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=f350fbb7-b954-4bb2-abf4-05ad049ceeae@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=arnaud.minier@telecom-paris.fr \
    --cc=ines.varhol@telecom-paris.fr \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.tardieu@telecom-paris.fr \
    --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).