qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Add device STM32L4x5 GPIO
@ 2024-02-07 13:23 Inès Varhol
  2024-02-07 13:23 ` [PATCH v4 1/3] hw/gpio: Implement " Inès Varhol
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Inès Varhol @ 2024-02-07 13:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-arm, Laurent Vivier, Philippe Mathieu-Daudé,
	Paolo Bonzini, Peter Maydell, Alistair Francis, Samuel Tardieu,
	Thomas Huth, Inès Varhol, Arnaud Minier

This patch adds a new device STM32L4x5 GPIO device and is part
of a series implementing the STM32L4x5 with a few peripherals.

Changes from v3 :
- replacing occurences of '16' with the correct macro `GPIO_NUM_PINS`
- updating copyright year
- rebasing on latest version of STM32L4x5 RCC

Changes from v2 :
- correct memory leaks caused by re-assigning a `g_autofree`
pointer without freeing it
- gpio-test : test that reset values (and not just initialization
values) are correct, correct `stm32l4x5_gpio_reset()` accordingly
- adding a `clock-freq-hz` object property to test that
enabling GPIO clock in RCC sets the GPIO clocks

Changes from v1 :
- replacing test GPIO register `DISCONNECTED_PINS` with an object
property accessed using `qtest_qmp()` in the qtest (through helpers
`get_disconnected_pins()` and `disconnect_all_pins()`)
- removing GPIO subclasses and storing MODER, OSPEEDR and PUPDR reset
values in properties
- adding a `name` property and using it for more lisible traces
- using `g_strdup_printf()` to facilitate setting irqs in the qtest,
and initializing GPIO children in soc_initfn

Changes from RFC v1 :
- `stm32l4x5-gpio-test.c` : correct typos, make the test generic,
add a test for bitwise writing in register ODR
- `stm32l4x5_soc.c` : connect gpios to their clock, use an
array of GpioState
- `stm32l4x5_gpio.c` : correct comments in `update_gpio_idr()`,
correct `get_gpio_pins_to_disconnect()`, correct `stm32l4x5_gpio_init()`
and initialize the clock, add a realize function
- update MAINAINERS

Based-on: 20240130160656.113112-1-arnaud.minier@telecom-paris.fr
([PATCH v4 0/8] Add device STM32L4x5 RCC)

Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr>
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>

Inès Varhol (3):
  hw/gpio: Implement STM32L4x5 GPIO
  hw/arm: Connect STM32L4x5 GPIO to STM32L4x5 SoC
  tests/qtest: Add STM32L4x5 GPIO QTest testcase

 MAINTAINERS                        |   1 +
 docs/system/arm/b-l475e-iot01a.rst |   2 +-
 include/hw/arm/stm32l4x5_soc.h     |   2 +
 include/hw/gpio/stm32l4x5_gpio.h   |  70 ++++
 hw/arm/stm32l4x5_soc.c             |  78 +++-
 hw/gpio/stm32l4x5_gpio.c           | 456 ++++++++++++++++++++++
 tests/qtest/stm32l4x5_gpio-test.c  | 586 +++++++++++++++++++++++++++++
 hw/arm/Kconfig                     |   3 +-
 hw/gpio/Kconfig                    |   3 +
 hw/gpio/meson.build                |   1 +
 hw/gpio/trace-events               |   6 +
 tests/qtest/meson.build            |   3 +-
 12 files changed, 1194 insertions(+), 17 deletions(-)
 create mode 100644 include/hw/gpio/stm32l4x5_gpio.h
 create mode 100644 hw/gpio/stm32l4x5_gpio.c
 create mode 100644 tests/qtest/stm32l4x5_gpio-test.c

-- 
2.43.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-23 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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é
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é

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).