From patchwork Fri Dec 29 16:47:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?In=C3=A8s_Varhol?= X-Patchwork-Id: 13506567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 859CEC47072 for ; Fri, 29 Dec 2023 16:50:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJG3H-0002jG-VX; Fri, 29 Dec 2023 11:49:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJG3A-0002gY-Sx; Fri, 29 Dec 2023 11:49:33 -0500 Received: from zproxy2.enst.fr ([2001:660:330f:2::dd]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJG37-0001MT-6z; Fri, 29 Dec 2023 11:49:31 -0500 Received: from localhost (localhost [IPv6:::1]) by zproxy2.enst.fr (Postfix) with ESMTP id 4FA628082A; Fri, 29 Dec 2023 17:49:22 +0100 (CET) Received: from zproxy2.enst.fr ([IPv6:::1]) by localhost (zproxy2.enst.fr [IPv6:::1]) (amavis, port 10032) with ESMTP id meM-v03YeSjf; Fri, 29 Dec 2023 17:49:21 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by zproxy2.enst.fr (Postfix) with ESMTP id 7B0A88082B; Fri, 29 Dec 2023 17:49:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zproxy2.enst.fr 7B0A88082B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telecom-paris.fr; s=A35C7578-1106-11E5-A17F-C303FDDA8F2E; t=1703868561; bh=3kKpPsrpqgSAk1g9O4K0piP5JlztXljlDIhqx5moJOU=; h=From:To:Date:Message-ID:MIME-Version; b=Ckc5vaDem0LZS5C+Qhd6n6h63OXTUPctqFLmVsp2Q+cw75U6TyfE/6MCEjWIMSame 6WCz43bTt9Qs13+ZaRMe17zoo4h+xBz1TWGj5p2GQswvEoaQd5PfsUhC2KlXGohHl/ slvEvo+FVxjzXaJ9TyNgHQLmx/gO5aPSTMVjY1IM= X-Virus-Scanned: amavis at enst.fr Received: from zproxy2.enst.fr ([IPv6:::1]) by localhost (zproxy2.enst.fr [IPv6:::1]) (amavis, port 10026) with ESMTP id 8xY6zcvJqJbt; Fri, 29 Dec 2023 17:49:21 +0100 (CET) Received: from inesv-Inspiron-3501.lan (176-138-236-114.abo.bbox.fr [176.138.236.114]) by zproxy2.enst.fr (Postfix) with ESMTPSA id 24D5D80819; Fri, 29 Dec 2023 17:49:21 +0100 (CET) From: =?utf-8?q?In=C3=A8s_Varhol?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?In=C3=A8s_Varhol?= , Paolo Bonzini , Alistair Francis , Arnaud Minier , qemu-arm@nongnu.org, Peter Maydell , Thomas Huth Subject: [PATCH v3 0/3] Add device STM32L4x5 SYSCFG Date: Fri, 29 Dec 2023 17:47:08 +0100 Message-ID: <20231229164915.133199-1-ines.varhol@telecom-paris.fr> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:660:330f:2::dd; envelope-from=ines.varhol@telecom-paris.fr; helo=zproxy2.enst.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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: <20231228161944.303768-1-ines.varhol@telecom-paris.fr> ([PATCH v5 0/3] Add device STM32L4x5 EXTI) Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol Inès Varhol (3): hw/misc: Implement STM32L4x5 SYSCFG tests/qtest: Add STM32L4x5 SYSCFG QTest testcase hw/arm: Connect STM32L4x5 SYSCFG to STM32L4x5 SoC docs/system/arm/b-l475e-iot01a.rst | 2 +- hw/arm/Kconfig | 1 + hw/arm/stm32l4x5_soc.c | 23 +- hw/misc/Kconfig | 3 + hw/misc/meson.build | 1 + hw/misc/stm32l4x5_syscfg.c | 265 ++++++++++++++++++ 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 | 408 ++++++++++++++++++++++++++++ 11 files changed, 765 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