From nobody Sun Apr 28 22:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) client-ip=209.85.221.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1604777652; cv=none; d=zohomail.com; s=zohoarc; b=cT+Tj4NtabLpuBlXO47WMUjclj97MFPkwNmduvoHtOG25IiFmiUDMg8Ua26CCz8CkgL5OvMe0eC3GGQpx+rfkMqkExxWzKEXb3NMZSujMGSlEXHCiJUFgObedC3Jhi0ggqumRFp0CQDnU988Xg+0lTha4rrWs0hmINRwZ3QqHbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604777652; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QOn2Yk5sEGXZTzwuGFFHfpa3H/VY3D0NQ01szmHIhVo=; b=ekzFql4qRKSteDoCreIHVPJVuG/kq6q07yEtG6fbJQ7iekewdpahqvOoCSiS79R7InnAE+EJxTva9Jp60ICY1vOAXuQLPipHH+3jc3sd34Hu6S+hJQ9NAdf3gIoG2ampG7xxQ6DQhPcBFy6S2W1zxabrAqY8Gniwx1D9COXxBVk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.zohomail.com with SMTPS id 1604777652613389.83265764557916; Sat, 7 Nov 2020 11:34:12 -0800 (PST) Received: by mail-wr1-f68.google.com with SMTP id p8so3912006wrx.5 for ; Sat, 07 Nov 2020 11:34:12 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id t5sm7852016wmg.19.2020.11.07.11.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 11:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QOn2Yk5sEGXZTzwuGFFHfpa3H/VY3D0NQ01szmHIhVo=; b=jlud5Q7k6eQATQlh6MIXGRBdIMGkwhlkNYIWqj4aasCGq3sRmuX3LnDT3yqd9T4X/y T7CYaQPAjtVCdsxDeMnK3LyoupaS9zpaEC38edlYUEelhfyS3q9R6s0UPomrRSi2iCie WFTJPMDiooZrMSVQffelHGfoWlEzxWZj4o69AKt8D3PEbbzjIfJw92GNYfXoSh9KO3UY 1ArXWTPiswFW1xwRMREWIfbVpz7ICCWFf2vqwslB7CTvelMXu/28xg9doc3F+1n205ya aK/78zuUTpyMLMC7fpGXpeC6k0/us6ISSOLDoKFG0ejg7ro4ZTP+xXc4WcKafgR2a7jw t08Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QOn2Yk5sEGXZTzwuGFFHfpa3H/VY3D0NQ01szmHIhVo=; b=LwXx0APPBbD5sguFI8wiPdAfJ55EQJm4SrfQVDJhHCPEQlX3M7MLrwzKCLSZxA95hQ KbAcnM/d/25Xh8I6AJqMAFvLMUP29KZo0zWjiNUuC4yTRkk9tjjXVL8zMrPB7LxIaU4M u5VzEesyY2tVfoAkxmqa0k3LV2oj8eKahEn7pXEqHDhlv4vEEoy1jHWrW/LBL4QBfYlc AXh5jEpOf2QJk2MnWbwgLcbeG71AoTd/eu/O/jwBKHkMBbJcr9MnpWLZwJu7pH72DsHy DmUU14N3YtqxlqMCXDATe9YDz66aZ674ysDybU9F8lPvOqOd15Eh3lkbP/QEbKBVv4Bx LR3A== X-Gm-Message-State: AOAM5301Wuh4i+vsxyjqU1CvS1Zv+5ZIf7UBEp0F3Y5Srs66/j72ZtyW fce/aa8Jw5uvGphPtI+XB1M= X-Google-Smtp-Source: ABdhPJybY066lfW/fMBdzUGWF9/1HcWQq6qbAeO82b/kRpfA5DrdLO1AOQZqL936YyB4vAeiUZkn0g== X-Received: by 2002:a5d:4f8c:: with SMTP id d12mr9721319wru.351.1604777650856; Sat, 07 Nov 2020 11:34:10 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Andrzej Zaborowski , Peter Maydell , Alistair Francis , Jan Kiszka , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 1/5] hw/arm/armsse: Correct expansion MPC interrupt lines Date: Sat, 7 Nov 2020 20:33:59 +0100 Message-Id: <20201107193403.436146-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107193403.436146-1-f4bug@amsat.org> References: <20201107193403.436146-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) We can use one MPC per SRAM bank, but we currently only wire the IRQ from the first expansion MPC to the IRQ splitter. Fix that. Fixes: bb75e16d5e6 ("hw/arm/iotkit: Wire up MPC interrupt lines") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/armsse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index a93da37dcbb..baac027659d 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -1074,7 +1074,8 @@ static void armsse_realize(DeviceState *dev, Error **= errp) qdev_get_gpio_in(dev_splitter, 0)); qdev_connect_gpio_out(dev_splitter, 0, qdev_get_gpio_in_named(dev_secctl, - "mpc_status", 0)); + "mpc_status", + i - IOTS_NUM_EXP_= MPC)); } =20 qdev_connect_gpio_out(dev_splitter, 1, --=20 2.26.2 From nobody Sun Apr 28 22:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) client-ip=209.85.221.52; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f52.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1604777658; cv=none; d=zohomail.com; s=zohoarc; b=E03o8QkCxJ0O7NTAFSY7Jp+YpOVJ+mqLvKYNTxtcDN2n9MorbWeokAjq4TWc2knQobTWm08sBmTfTFffyfXJdbFgk0PcsqhBjpsx+C/FZRN38lpb2nPh5zEWBTvxXG/XgDNZ1Pp48mXIAn7sUp2ZyiusBFbrkU4cIKy94TwvEBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604777658; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XNu7ZLoR4xU4f3L7jkcDncHCuG1GeetmfTtko2ZN1QU=; b=djuq3n8X8kBLVOFKICVi/mbRX6uWtvRL3mzF0UKFEuD7gQKQOfJSNXFgx0VwFXPi4nhzkoYu4UnOu6UwJn+ZVH5zLiHNn8caJyvCz48VidT+3Jmq4cAEJ9xAHNVs/sBM2aD74p9Egpq/8nL/LEBVfXNC4A2Vg99qIYXkQof0x4Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.zohomail.com with SMTPS id 1604777658009322.2695169402459; Sat, 7 Nov 2020 11:34:18 -0800 (PST) Received: by mail-wr1-f52.google.com with SMTP id 33so4702943wrl.7 for ; Sat, 07 Nov 2020 11:34:17 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id n67sm7153864wmf.25.2020.11.07.11.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 11:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XNu7ZLoR4xU4f3L7jkcDncHCuG1GeetmfTtko2ZN1QU=; b=pVsUNLkfg3ETSv26S7xdy5P1KiYSFW9gqn7RnSa44oSwLOwj2xN2Z1ed77ziicCr7a iAFn2FkYCWHi8PmvupwrEuq+sGxBNCN1o8jRGgh8FnrvzXXs7LlRqCIHtJZTP3xKrzf3 LBpqwrcIQKOspxdT3HCbsZhYxT2p+2U5k29tg9AQAs/wRL8Oluz9QxgzBedABLXfLVg/ 6k1NUurusdVxSVNA10LycOtBpf1jDr7xsItho8YpoyYzfXtbdMksU/b6CG73q/1RHCVH kCdruiXlF6UeLne9wO7HKZsqXxs7w1fsPlzsrM0zs7gPuvJFtOa8NYMnsulS/HePJF1h BwIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XNu7ZLoR4xU4f3L7jkcDncHCuG1GeetmfTtko2ZN1QU=; b=LGGq3H5BcU7MDmAkFhsXOdMxlV6ttxo1k4knPGuAXFXAH1JXcw+WjXZhqZI/bB6hDM uYZxoDLvNI28jH6VgqYCpMz7vuvZ4qL194F2D2lpAujKzFw3iKr3onoPcqnYXjooOS95 syXQsaKyAkjnp5HpVwxKP3wJd2b8JhAfK6EYuATJZIiTkp3zSU4qcH0BZd37jQZRCUjr 2coF8Bz+SKTz0jqWcUYFo838DFoGGyrS7tj2/M91Dz5wKdUTWroPCUCikxiNU27JfveL 0FlNb6CX6I94sHpzuHcx9z/S7NEW6UlP9ywOou1WxnHHlHHbRNj+ZzenINNlUfM6omln pjVg== X-Gm-Message-State: AOAM533i/C7YRIugAjyqlIS3e6yrdKLmc9Vms5uMZ20X6RBnWazVr2Cy XXrkkb6Qs6K4iJD2TfKdff8= X-Google-Smtp-Source: ABdhPJzvkDp+mjeqT4GT5wqb/KVZZJTOQ0gSumlUXAk/bg73muGuPzITWu4o7Q9AM36Y+gwUsYdbGA== X-Received: by 2002:adf:906b:: with SMTP id h98mr9223066wrh.310.1604777656184; Sat, 07 Nov 2020 11:34:16 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Andrzej Zaborowski , Peter Maydell , Alistair Francis , Jan Kiszka , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 2/5] hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ Date: Sat, 7 Nov 2020 20:34:00 +0100 Message-Id: <20201107193403.436146-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107193403.436146-1-f4bug@amsat.org> References: <20201107193403.436146-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The system configuration controller (SYSCFG) doesn't have any output IRQ (and the INTC input #71 belongs to the UART6). Remove the invalid code. Fixes: db635521a02 ("stm32f205: Add the stm32f205 SoC") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/misc/stm32f2xx_syscfg.h | 2 -- hw/arm/stm32f205_soc.c | 1 - hw/misc/stm32f2xx_syscfg.c | 2 -- 3 files changed, 5 deletions(-) diff --git a/include/hw/misc/stm32f2xx_syscfg.h b/include/hw/misc/stm32f2xx= _syscfg.h index 57a98c533db..8595a3b31b0 100644 --- a/include/hw/misc/stm32f2xx_syscfg.h +++ b/include/hw/misc/stm32f2xx_syscfg.h @@ -53,8 +53,6 @@ struct STM32F2XXSyscfgState { uint32_t syscfg_exticr3; uint32_t syscfg_exticr4; uint32_t syscfg_cmpcr; - - qemu_irq irq; }; =20 #endif /* HW_STM32F2XX_SYSCFG_H */ diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index a4f3344db25..9cd41bf56da 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -117,7 +117,6 @@ static void stm32f205_soc_realize(DeviceState *dev_soc,= Error **errp) } busdev =3D SYS_BUS_DEVICE(dev); sysbus_mmio_map(busdev, 0, 0x40013800); - sysbus_connect_irq(busdev, 0, qdev_get_gpio_in(armv7m, 71)); =20 /* Attach UART (uses USART registers) and USART controllers */ for (i =3D 0; i < STM_NUM_USARTS; i++) { diff --git a/hw/misc/stm32f2xx_syscfg.c b/hw/misc/stm32f2xx_syscfg.c index aa59b435498..04c22c28502 100644 --- a/hw/misc/stm32f2xx_syscfg.c +++ b/hw/misc/stm32f2xx_syscfg.c @@ -133,8 +133,6 @@ static void stm32f2xx_syscfg_init(Object *obj) { STM32F2XXSyscfgState *s =3D STM32F2XX_SYSCFG(obj); =20 - sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); - memory_region_init_io(&s->mmio, obj, &stm32f2xx_syscfg_ops, s, TYPE_STM32F2XX_SYSCFG, 0x400); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); --=20 2.26.2 From nobody Sun Apr 28 22:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.46 as permitted sender) client-ip=209.85.221.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1604777663; cv=none; d=zohomail.com; s=zohoarc; b=Dtf8gTCmwbGvKA6B7y6BwrG+r76da8mMKUrRog4VhDag2HNdGO5KG50SSqpp4ui28UykL6pL4IgSt7GJGdY2jGdGZ7Pzr1uSzUPaZmvthYAPSXP0x7P8G/GJHwyO6Dpmrn9SiOesMDpEM+fIs3/zYkwS65WJuDyPxgVz0MCHn+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604777663; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fKsrMZT7rwVP28hdVbSgf4KB1wxqgtIDtqrq9k+6yOg=; b=dOgGlPtPqnGe0utPH3FyUqDC+M01/v6jbg2pDjw25r8SVd88fyL+ZWE95HZi4o8LSgU1e57FXZCMBWTf2F3JjnVmn1yvn8IAA3qrRWuJWV2PaqBC9wk2/IgCN/9X5pCur0jphvje2Sb6OmRwYFKBjSkiRHeNx9agnPwkvuNPKZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.zohomail.com with SMTPS id 1604777663189873.723257505005; Sat, 7 Nov 2020 11:34:23 -0800 (PST) Received: by mail-wr1-f46.google.com with SMTP id k2so1321595wrx.2 for ; Sat, 07 Nov 2020 11:34:22 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id f7sm8132808wrx.64.2020.11.07.11.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 11:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fKsrMZT7rwVP28hdVbSgf4KB1wxqgtIDtqrq9k+6yOg=; b=bdB0wLKgKeqQNIQWXtCwfxg1gRxWg1QTDuCX11JRwSWkFIYr/dr1dIC+drPY/xei9a z5jMV5Zf4qVe7aHs9brt5EQuovfZTNU1c0Me3p2xIUsTA+g8F3RMX11ZBbv24QONyTeF iWnGH0Fks2RGIQFxY4UN9CIWoyPChP080+ifu9seF+cUiiINqX+sO/sR1LOEn9x+aH1y meKSpCFTCispE+K2uKlgGT9lAmsy3qpJts942n0i6hw/tlIKutBysZhlS/DsGHCLYoiM KRRgkAjcq+oK4elsdqjnGbp+ZNpE/+txBkoRm0gN2CD2SCZka5ZHTyeaB07X13eoYw2E 7RGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fKsrMZT7rwVP28hdVbSgf4KB1wxqgtIDtqrq9k+6yOg=; b=ijDAcdUzkgKF7jaI9gDYok7rzb33b3SxmlHw4I0B+xt0CnxW0Z0miVE2p0iFB7elyX p+H+lf0MLleKeRCe6XVt9V3FFagjzViEGk2oCga66iDRHJxvwjMUw9n6PQBE7CWJxSrM jERKaLqxja8dScf4jC5rYLK/cGhH7m1u1m1Oa0gWPGQnwLQpVShZc2u/iDFYs7TfVM1x PomHYtviGnBR5XWIcvqeWTR3e577mzFLXg+JeHf8j2DR7liANg/yMHNe/eBQbmYlydFY u+lM+v9yjFNYIJkzfl2SI2mhHWgr7RHzgcWINFheBxnhbePX1tjKTaBCoe3XX3eG9xKI X+7g== X-Gm-Message-State: AOAM530lbWABbHPuN16QNxpbn8o821Jne+RuFRKt1UR3Z+KLgUxVGjha QgNX1oc8+w1o0lYJT0J6udE= X-Google-Smtp-Source: ABdhPJwwikaMv1Qr6vOhyqDRqJ5dAUeehdtfcgLBy+JiEJAemb4vfeOaaHm8DYKavH6jayxB/sJ9Jg== X-Received: by 2002:adf:f349:: with SMTP id e9mr9194611wrp.110.1604777661433; Sat, 07 Nov 2020 11:34:21 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Andrzej Zaborowski , Peter Maydell , Alistair Francis , Jan Kiszka , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 3/5] hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup() Date: Sat, 7 Nov 2020 20:34:01 +0100 Message-Id: <20201107193403.436146-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107193403.436146-1-f4bug@amsat.org> References: <20201107193403.436146-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) omap2420_mpu_init() introduced in commit 827df9f3c5f ("Add basic OMAP2 chip support") takes care of creating the 3 UARTs. Then commit 58a26b477e9 ("Emulate a serial bluetooth HCI with H4+ extensions and attach to n8x0's UART") added n8x0_uart_setup() which create the UART and connects it to an IRQ output, overwritting the existing peripheral and its IRQ connection. This is incorrect. Fortunately we don't need to fix this, because commit 6da68df7f9b ("hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev") removed the use of this peripheral. We can simply remove the code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/nseries.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 76fd7fe9854..6215c18d627 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -789,16 +789,6 @@ static void n8x0_cbus_setup(struct n800_s *s) cbus_attach(cbus, s->tahvo =3D tahvo_init(tahvo_irq, 1)); } =20 -static void n8x0_uart_setup(struct n800_s *s) -{ - Chardev *radio =3D qemu_chr_new("bt-dummy-uart", "null", NULL); - /* - * Note: We used to connect N8X0_BT_RESET_GPIO and N8X0_BT_WKUP_GPIO - * here, but this code has been removed with the bluetooth backend. - */ - omap_uart_attach(s->mpu->uart[BT_UART], radio); -} - static void n8x0_usb_setup(struct n800_s *s) { SysBusDevice *dev; @@ -1362,7 +1352,6 @@ static void n8x0_init(MachineState *machine, n8x0_spi_setup(s); n8x0_dss_setup(s); n8x0_cbus_setup(s); - n8x0_uart_setup(s); if (machine_usb(machine)) { n8x0_usb_setup(s); } --=20 2.26.2 From nobody Sun Apr 28 22:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) client-ip=209.85.128.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1604777668; cv=none; d=zohomail.com; s=zohoarc; b=BDBVJXXneUPk1aZf9o9i7lc2b6SalnCQ/52nC2LaNLM8xNn6XEcL2ES3DLZpKXnhyvl1pPxCGRnfuxiwZ7lftxCS7hqsqrfg2tiV4pl1y0mIBfp09JL4/8zLClWwHJk4nq52ysCScczW1/gSGiZyxB+lKqsgQqqkDAxgvPRAZS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604777668; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IWHQ4zGNPskYzL/akHXO5stc1InHlH57u2pVf49lbSo=; b=ge0seSMjRw/sbJhNetEZqiRN+r6YP2r0FcnbZja6jz2xUYvWOQvmKenTyo3/91xnl5+KYYqv/PmgwIonkBopMNfq6MPE3cXVjDa3BwNkn4iSjaWvENW/YOgPaiYK0at8UbtDX6l3rSat/M59yJexCWNcbc6YqiHVyqv4EO6I0a0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.zohomail.com with SMTPS id 1604777668994835.1083773053631; Sat, 7 Nov 2020 11:34:28 -0800 (PST) Received: by mail-wm1-f41.google.com with SMTP id v5so4559537wmh.1 for ; Sat, 07 Nov 2020 11:34:27 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id s4sm194076wro.10.2020.11.07.11.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 11:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IWHQ4zGNPskYzL/akHXO5stc1InHlH57u2pVf49lbSo=; b=usdV4vQZ1IclT8J7iUAbyQ7oGZe+DBjrkIvsyG/6y/WGIr7QrLNtVs8fdC1YNOzIm/ T5E9HwWtrYvYkRFYi/d8HnVP2RhxGYIOucLVl3AW1G9YYxxegty+xtofGNFbFlnlxRQp Cq7q43ewAyqZ5mUr20//056ytxru/MP3OvY7OcJqaxxU133ium/lMbfnbGYPjJopV+3A BaqV8/7amoP+D879Fun9tMuDsNM4aPTBI+DZ1jEAKdEcnuxvTQ5Fz5I5+NuAmDPakTRv VymbX7SuL7QLYC4DGysGoOy0MTKDhiLndlao0RYyneg9ENUQ07RoVmj8F/ag8tUaOIgd blXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IWHQ4zGNPskYzL/akHXO5stc1InHlH57u2pVf49lbSo=; b=WiEeBUPPYlJteLN4WDN79XcCJCCjGGRo020zofE4xxSuh6dN0vqiKkgssXvQ6LUBgx 82QgXkqvuGgOozZmT0UZmi8aIgGJBh5MiB4/AaVwbJi5ofkKLyMM/xHWsyTlKrFubXUp axzt4TOIzEF1ldfwAnRHGWsa2vh7bm4TJXwX4bMR+fxPHSnYYhT9PY/15UDHRMt2kpqO XiKj/xXQhpZdqlaWrCO1K9DmBEmRnRM23u+TSuIk+hAQDZT8rpAf0YHYknBnGDwXak5H txS6O3O1+/p0kLdgA0N0h6nDYdARMfP4OsjpA0TTEkn5xggOJebc4IRXWNIispNRlP1x b2HQ== X-Gm-Message-State: AOAM5302ag8yotBdcpy0/JRspdwtXXweO85ORUSIc7AWSwf67onCysOf VTqbSX5Dpg87Hg7DjnAgrNU= X-Google-Smtp-Source: ABdhPJwxI6y3vKynt/gYrD08m/TxE/J+PPvvYqOF5LVBMzUGPmvonJwRmvAIVwiN+gzoWXCT07Xekw== X-Received: by 2002:a1c:80cb:: with SMTP id b194mr6113072wmd.73.1604777666245; Sat, 07 Nov 2020 11:34:26 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Andrzej Zaborowski , Peter Maydell , Alistair Francis , Jan Kiszka , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2? 4/5] hw/arm/musicpal: Don't connect two qemu_irqs directly to the same input Date: Sat, 7 Nov 2020 20:34:02 +0100 Message-Id: <20201107193403.436146-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107193403.436146-1-f4bug@amsat.org> References: <20201107193403.436146-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The MusicPal board code connects both of the IRQ outputs of the UART to the same INTC qemu_irq. Connecting two qemu_irqs outputs directly to the same input is not valid as it produces subtly wrong behaviour (for instance if both the IRQ lines are high, and then one goes low, the INTC input will see this as a high-to-low transition even though the second IRQ line should still be holding it high). This kind of wiring needs an explicitly created OR gate; add one. Inspired-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/musicpal.c | 17 +++++++++++++---- hw/arm/Kconfig | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 5eb3f969fb4..ebc3ec24ef7 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -27,6 +27,7 @@ #include "ui/console.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" +#include "hw/or-irq.h" #include "hw/audio/wm8750.h" #include "sysemu/block-backend.h" #include "sysemu/runstate.h" @@ -77,8 +78,7 @@ #define MP_TIMER4_IRQ 7 #define MP_EHCI_IRQ 8 #define MP_ETH_IRQ 9 -#define MP_UART1_IRQ 11 -#define MP_UART2_IRQ 11 +#define MP_UART_SHARED_IRQ 11 #define MP_GPIO_IRQ 12 #define MP_RTC_IRQ 28 #define MP_AUDIO_IRQ 30 @@ -1589,6 +1589,7 @@ static void musicpal_init(MachineState *machine) ARMCPU *cpu; qemu_irq pic[32]; DeviceState *dev; + DeviceState *uart_orgate; DeviceState *i2c_dev; DeviceState *lcd_dev; DeviceState *key_dev; @@ -1627,9 +1628,17 @@ static void musicpal_init(MachineState *machine) pic[MP_TIMER2_IRQ], pic[MP_TIMER3_IRQ], pic[MP_TIMER4_IRQ], NULL); =20 - serial_mm_init(address_space_mem, MP_UART1_BASE, 2, pic[MP_UART1_IRQ], + /* Logically OR both UART IRQs together */ + uart_orgate =3D DEVICE(object_new(TYPE_OR_IRQ)); + object_property_set_int(OBJECT(uart_orgate), "num-lines", 2, &error_fa= tal); + qdev_realize_and_unref(uart_orgate, NULL, &error_fatal); + qdev_connect_gpio_out(DEVICE(uart_orgate), 0, pic[MP_UART_SHARED_IRQ]); + + serial_mm_init(address_space_mem, MP_UART1_BASE, 2, + qdev_get_gpio_in(uart_orgate, 0), 1825000, serial_hd(0), DEVICE_NATIVE_ENDIAN); - serial_mm_init(address_space_mem, MP_UART2_BASE, 2, pic[MP_UART2_IRQ], + serial_mm_init(address_space_mem, MP_UART2_BASE, 2, + qdev_get_gpio_in(uart_orgate, 1), 1825000, serial_hd(1), DEVICE_NATIVE_ENDIAN); =20 /* Register flash */ diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index fdf4464b948..319916c310e 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -94,6 +94,7 @@ config MUSCA =20 config MUSICPAL bool + select OR_IRQ select BITBANG_I2C select MARVELL_88W8618 select PTIMER --=20 2.26.2 From nobody Sun Apr 28 22:42:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.67 as permitted sender) client-ip=209.85.128.67; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f67.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1604777673; cv=none; d=zohomail.com; s=zohoarc; b=gWwtLZKe0ENH/pXQIxJ0cpwDzXIV0fA6mFOjP4ICtSw3aaruo82OJ5VIH3kPreJdUp0IZxQmIMEYK4KZBpNYGDGjMPoJ+w8yRysBS6AtW59UHPxDp9yovRFoSnwg2l3UNi8tmBL3TspKvxeKGBMlv9aGAPRwoAG1vjreN1M+ggM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604777673; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fgdYdhDY03zoPgadIiKhWW6DCP4typfikMNrmEkn0p8=; b=QYQb5Cx1soFA2yV8+pcjnCgVNMgp/OJJJTqgXlGCOVDoux5PdZZO9+ZMnweZv77UiwT539NeSGabXsbfj1RtsURJRuTS0/H0EffC6kysDVXhOyidV41cxz63Bpgpjuwr5gTqo95x0dNrbIVzs87+X2Xnf7e0uLNQnOB3NSlWgOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.67 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.zohomail.com with SMTPS id 1604777673011713.2115726290956; Sat, 7 Nov 2020 11:34:33 -0800 (PST) Received: by mail-wm1-f67.google.com with SMTP id c9so4551916wml.5 for ; Sat, 07 Nov 2020 11:34:32 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id q2sm7363998wrw.40.2020.11.07.11.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 11:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fgdYdhDY03zoPgadIiKhWW6DCP4typfikMNrmEkn0p8=; b=jrqPGW9tsCt+SXiyZQcQkihiqvMadba2ZzCBGwKS+j/drhGHyHFTrNp1nc5+s/sHsR mGrSsGjkGTYnaQ5N9SzxpO7Eqql1sCxTEri14zP9f5IFYHeP+oIscRmLhcIyH4fKJWJz 2PWgZbrHz9+FC8ePucHjrKHmBaCTNGsxulqNO7qpEhKqK4U9jbFyFoXxiRTuNIQMPr5a 29d2eaaOWW0kE38BhNAnBlU5I7t/x4T5X3cibScm0CSpPSG7edLZ+hRlO18H1z+3fx4Q rdiW+R8WuAG35tcM7qGjsXN5QXUWrI0ApTPR7r/TrKo87n3CfVlRsBxjKG3CO/p5PFeN U9lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fgdYdhDY03zoPgadIiKhWW6DCP4typfikMNrmEkn0p8=; b=ZDeArr4NOhNxRtWvrmYkDoXscn3vb0B8XSKtc2Jpke4juzoa3Bw18vDMl8c3SAWE4u EaW2y4ArUptvYhgnxrmh/QUYxwzBwa+kBmF+ih+gbXfh8hfzfoM4xSOrHZX7Ju5IAPrb g5fQs/IC7+9m9puO2XpDQoGznqnKvLuoREV3w9+YFS7dChswJlJiv1TU5cPwaA3JTVsk RfiWfb0N+6y1NotXvrq4Fyl11m8J8AOTZkL4ztyH1DB4tSAU45B14/H08WVuagGtIoZk 54ADcbLhdPxo64VRuxVxzrmmt8Fe96KDXP4+JOs/+0EB2zympKVS4wjDCmVP80gcb4RI d4vg== X-Gm-Message-State: AOAM530k6XTm9BnFYqaInoKbDvGj6w1BD7g6ZvfsYFPywdkANaJDmk5Q CqgwRgmpLCvNKE9TH1A5mKU= X-Google-Smtp-Source: ABdhPJzch91pop+RyceriIHWKgC4IQBp5vZmhnL2xbV1Xqtwzcflj42NHJ5xYpDbBGsez41J0pTSxA== X-Received: by 2002:a7b:c157:: with SMTP id z23mr6095102wmi.70.1604777671085; Sat, 07 Nov 2020 11:34:31 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Andrzej Zaborowski , Peter Maydell , Alistair Francis , Jan Kiszka , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.0 5/5] hw/arm/musicpal: Only use qdev_get_gpio_in() when necessary Date: Sat, 7 Nov 2020 20:34:03 +0100 Message-Id: <20201107193403.436146-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107193403.436146-1-f4bug@amsat.org> References: <20201107193403.436146-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) We don't need to fill the full pic[] array if we only use few of the interrupt lines. Directly call qdev_get_gpio_in() when necessary. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/musicpal.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index ebc3ec24ef7..458b1cbeb76 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1587,8 +1587,8 @@ static struct arm_boot_info musicpal_binfo =3D { static void musicpal_init(MachineState *machine) { ARMCPU *cpu; - qemu_irq pic[32]; DeviceState *dev; + DeviceState *pic; DeviceState *uart_orgate; DeviceState *i2c_dev; DeviceState *lcd_dev; @@ -1619,20 +1619,20 @@ static void musicpal_init(MachineState *machine) &error_fatal); memory_region_add_subregion(address_space_mem, MP_SRAM_BASE, sram); =20 - dev =3D sysbus_create_simple(TYPE_MV88W8618_PIC, MP_PIC_BASE, + pic =3D sysbus_create_simple(TYPE_MV88W8618_PIC, MP_PIC_BASE, qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ)); - for (i =3D 0; i < 32; i++) { - pic[i] =3D qdev_get_gpio_in(dev, i); - } - sysbus_create_varargs(TYPE_MV88W8618_PIT, MP_PIT_BASE, pic[MP_TIMER1_I= RQ], - pic[MP_TIMER2_IRQ], pic[MP_TIMER3_IRQ], - pic[MP_TIMER4_IRQ], NULL); + sysbus_create_varargs(TYPE_MV88W8618_PIT, MP_PIT_BASE, + qdev_get_gpio_in(pic, MP_TIMER1_IRQ), + qdev_get_gpio_in(pic, MP_TIMER2_IRQ), + qdev_get_gpio_in(pic, MP_TIMER3_IRQ), + qdev_get_gpio_in(pic, MP_TIMER4_IRQ), NULL); =20 /* Logically OR both UART IRQs together */ uart_orgate =3D DEVICE(object_new(TYPE_OR_IRQ)); object_property_set_int(OBJECT(uart_orgate), "num-lines", 2, &error_fa= tal); qdev_realize_and_unref(uart_orgate, NULL, &error_fatal); - qdev_connect_gpio_out(DEVICE(uart_orgate), 0, pic[MP_UART_SHARED_IRQ]); + qdev_connect_gpio_out(DEVICE(uart_orgate), 0, + qdev_get_gpio_in(pic, MP_UART_SHARED_IRQ)); =20 serial_mm_init(address_space_mem, MP_UART1_BASE, 2, qdev_get_gpio_in(uart_orgate, 0), @@ -1674,14 +1674,15 @@ static void musicpal_init(MachineState *machine) OBJECT(get_system_memory()), &error_fatal); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, MP_ETH_BASE); - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[MP_ETH_IRQ]); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, + qdev_get_gpio_in(pic, MP_ETH_IRQ)); =20 sysbus_create_simple("mv88w8618_wlan", MP_WLAN_BASE, NULL); =20 sysbus_create_simple(TYPE_MUSICPAL_MISC, MP_MISC_BASE, NULL); =20 dev =3D sysbus_create_simple(TYPE_MUSICPAL_GPIO, MP_GPIO_BASE, - pic[MP_GPIO_IRQ]); + qdev_get_gpio_in(pic, MP_GPIO_IRQ)); i2c_dev =3D sysbus_create_simple("gpio_i2c", -1, NULL); i2c =3D (I2CBus *)qdev_get_child_bus(i2c_dev, "i2c"); =20 @@ -1713,7 +1714,7 @@ static void musicpal_init(MachineState *machine) NULL); sysbus_realize_and_unref(s, &error_fatal); sysbus_mmio_map(s, 0, MP_AUDIO_BASE); - sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]); + sysbus_connect_irq(s, 0, qdev_get_gpio_in(pic, MP_AUDIO_IRQ)); =20 musicpal_binfo.ram_size =3D MP_RAM_DEFAULT_SIZE; arm_load_kernel(cpu, machine, &musicpal_binfo); --=20 2.26.2