[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/32] hw/gpio/imx_gpio: Fix interpretation of GDIR polarity
From: |
Peter Maydell |
Subject: |
[PULL 28/32] hw/gpio/imx_gpio: Fix interpretation of GDIR polarity |
Date: |
Tue, 6 May 2025 15:42:10 +0100 |
From: Bernhard Beschow <shentey@gmail.com>
According to the i.MX 8M Plus reference manual, a GPIO pin is
configured as an output when the corresponding bit in the GDIR
register is set. The function imx_gpio_set_int_line() is intended to
be a no-op if the pin is configured as an output, returning early in
such cases. However, it inverts the condition. Fix this by
returning early when the bit is set.
cc: qemu-stable@nongnu.org
Fixes: f44272809779 ("i.MX: Add GPIO device")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-id: 20250501183445.2389-4-shentey@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/gpio/imx_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c
index f23c52af26d..450ece45482 100644
--- a/hw/gpio/imx_gpio.c
+++ b/hw/gpio/imx_gpio.c
@@ -72,7 +72,7 @@ static void imx_gpio_update_int(IMXGPIOState *s)
static void imx_gpio_set_int_line(IMXGPIOState *s, int line, IMXGPIOLevel
level)
{
/* if this signal isn't configured as an input signal, nothing to do */
- if (!extract32(s->gdir, line, 1)) {
+ if (extract32(s->gdir, line, 1)) {
return;
}
--
2.43.0
- [PULL 09/32] hw/arm/virt: Remove VirtMachineClass::no_pmu field, (continued)
- [PULL 09/32] hw/arm/virt: Remove VirtMachineClass::no_pmu field, Peter Maydell, 2025/05/06
- [PULL 01/32] hw/arm/npcm8xx_boards: Correct valid_cpu_types setting of NPCM8XX SoC, Peter Maydell, 2025/05/06
- [PULL 04/32] target/arm/ptw: extract arm_mmu_idx_to_security_space, Peter Maydell, 2025/05/06
- [PULL 07/32] target/arm/ptw: fix arm_cpu_get_phys_page_attrs_debug, Peter Maydell, 2025/05/06
- [PULL 12/32] hw/arm/virt: Remove VirtMachineClass::no_its field, Peter Maydell, 2025/05/06
- [PULL 14/32] hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers field, Peter Maydell, 2025/05/06
- [PULL 18/32] hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field, Peter Maydell, 2025/05/06
- [PULL 22/32] hw/arm: Attach PSPI module to NPCM8XX SoC, Peter Maydell, 2025/05/06
- [PULL 25/32] target/arm/kvm: Drop support for kernels without KVM_ARM_PREFERRED_TARGET, Peter Maydell, 2025/05/06
- [PULL 27/32] hw/pci-host/designware: Fix viewport configuration, Peter Maydell, 2025/05/06
- [PULL 28/32] hw/gpio/imx_gpio: Fix interpretation of GDIR polarity,
Peter Maydell <=
- [PULL 31/32] hw/arm/virt: Remove deprecated virt-3.1 machine, Peter Maydell, 2025/05/06
- [PULL 32/32] hw/arm/virt: Remove deprecated virt-4.0 machine, Peter Maydell, 2025/05/06
- [PULL 02/32] hvf: avoid repeatedly setting trap debug for each cpu, Peter Maydell, 2025/05/06
- [PULL 06/32] target/arm/ptw: extract arm_cpu_get_phys_page, Peter Maydell, 2025/05/06
- [PULL 13/32] hw/arm/virt: Remove deprecated virt-2.8 machine, Peter Maydell, 2025/05/06
- [PULL 30/32] hw/arm/virt: Remove deprecated virt-3.0 machine, Peter Maydell, 2025/05/06
- [PULL 05/32] target/arm/ptw: get current security_space for current mmu_idx, Peter Maydell, 2025/05/06
- [PULL 10/32] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment, Peter Maydell, 2025/05/06
- [PULL 15/32] hw/arm/virt: Remove deprecated virt-2.9 machine, Peter Maydell, 2025/05/06
- [PULL 17/32] hw/arm/virt: Remove deprecated virt-2.11 machine, Peter Maydell, 2025/05/06