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

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

Changes from v3 to v4:
- swapping commit 2 (add tests) and commit 3 (connect syscfg to SoC)
so that the tests pass in the commit they're added
- in `stm32l4x5_syscfg-test.c`: instead of declaring intermediate
variables, using `syscfg_readl` directly in `g_assert_cmpuint`
so that QEMU coding style is respected
- in `stm32l4x5_syscfg-test.c`: the tests are now independant
from the EXTI device (the reads in EXTI registers were unnecessary)
- in `stm32l4x5_syscfg-test.c` : using a helper function
`syscfg_set_irq()` to help readability
- in `stm32l4x5_soc.c` : reducing scope of `i` used in for loops
- in `stm32l4x5_soc.c` : removing useless variable `dev`
- in `stm32l4x5_syscfg.c`: add macro `NUM_LINES_PER_EXTICR_REG`,
correct some coding styles issues

Changes from v2 to v3:
- updating the B-L475E-IOT01A machine's documentation file
- using `GPIO_NUM_PINS` instead of 16 in `stm32l4x5_syscfg_init`
- correcting the formatting of multiline indents
- renaming a trace function (`trace_stm32l4x5_syscfg_forward_exti`
instead of `trace_stm32l4x5_syscfg_pulse_exti`)

Changes from v1 to v2:
- explain in 3rd commit why SYSCFG input GPIOs aren't connected and add
a TODO comment in stm32l4x5_soc.c
- use macros `NUM_GPIOS` and `GPIO_NUM_PINS` in
`stm32l4x5_syscfg_set_irq`
- rename STM32L4XX to STM32L4X5, Stm32l4xx to Stm32l4x5
(the SYSCFG implementation is only valid for STM32L4x5 and STM32L4x6
but not for STM32L41xx/42xx/43xx/44xx)
- refactor `STM32L4x5SyscfgState` to `Stm32l4x5SyscfgState` to be
consistent with other peripherals

Based-on: 20240109160658.311932-1-ines.varhol@telecom-paris.fr
([PATCH v8 0/3] Add device STM32L4x5 EXTI)

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/misc: Implement STM32L4x5 SYSCFG
  hw/arm: Connect STM32L4x5 SYSCFG to STM32L4x5 SoC
  tests/qtest: Add STM32L4x5 SYSCFG QTest testcase

 docs/system/arm/b-l475e-iot01a.rst  |   2 +-
 hw/arm/Kconfig                      |   1 +
 hw/arm/stm32l4x5_soc.c              |  21 +-
 hw/misc/Kconfig                     |   3 +
 hw/misc/meson.build                 |   1 +
 hw/misc/stm32l4x5_syscfg.c          | 266 ++++++++++++++++++++++
 hw/misc/trace-events                |   6 +
 include/hw/arm/stm32l4x5_soc.h      |   2 +
 include/hw/misc/stm32l4x5_syscfg.h  |  54 +++++
 tests/qtest/meson.build             |   3 +-
 tests/qtest/stm32l4x5_syscfg-test.c | 331 ++++++++++++++++++++++++++++
 11 files changed, 687 insertions(+), 3 deletions(-)
 create mode 100644 hw/misc/stm32l4x5_syscfg.c
 create mode 100644 include/hw/misc/stm32l4x5_syscfg.h
 create mode 100644 tests/qtest/stm32l4x5_syscfg-test.c

-- 
2.43.0



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

end of thread, other threads:[~2024-01-12 18:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-09 19:41 [PATCH v4 0/3] Add device STM32L4x5 SYSCFG Inès Varhol
2024-01-09 19:41 ` [PATCH v4 1/3] hw/misc: Implement " Inès Varhol
2024-01-09 19:41 ` [PATCH v4 2/3] hw/arm: Connect STM32L4x5 SYSCFG to STM32L4x5 SoC Inès Varhol
2024-01-11 23:31   ` Alistair Francis
2024-01-09 19:41 ` [PATCH v4 3/3] tests/qtest: Add STM32L4x5 SYSCFG QTest testcase Inès Varhol
2024-01-12 18:13 ` [PATCH v4 0/3] Add device STM32L4x5 SYSCFG Peter Maydell

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