From nobody Mon Sep 8 02:18:24 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1756700570; cv=none; d=zohomail.com; s=zohoarc; b=MuBGr4QDsqPnhPOKzPXM3+Lx68U2a0NTDb8jaQjJ1qLU9XnWu2j5lbKdcrVVuLH2/Fzz3jtT6LHPoNjsnQqo1/Iil8hNBEoZguzjwbPCBn1wEF/mW2rkPZflJgq12c0hifWiIe5alk5H0tlbvZSC5gUmisKq5MjT2Pq/mKXLRTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756700570; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=rZhFtbEQXitkxNxlLqOvvy7dD1xpgXtRJn7pMZera8A=; b=TbA82ag4g5Yw0//OgdD7hkfJ429dZ4mAG8WVfu3S6lX+fBk+tI/MzdVpT8bcsj5epgN2XWj589YHgmASAofYfPJpVx8Y6ah4SCCdxu6qlQ8mTPKRMTbyVqmvXgVHffXN3BukHbV3pSIXMW8g+m7NTBFVIG2njoIfDLoDX8gU6Ps= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756700570052760.0249565936188; Sun, 31 Aug 2025 21:22:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1usw3A-0006b2-AH; Mon, 01 Sep 2025 00:21:49 -0400 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 1usvqH-0002mo-Bz; Mon, 01 Sep 2025 00:08:31 -0400 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1usvqF-000862-6h; Mon, 01 Sep 2025 00:08:29 -0400 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 1 Sep 2025 12:08:09 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 1 Sep 2025 12:08:09 +0800 To: "reviewer:Incompatible changes" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Andrew Jeffery , "Joel Stanley" , "open list:All patches CC here" , "open list:ASPEED BMCs" CC: , , Subject: [PATCH v1 3/4] hw/intc/aspeed: Remove GIC 128 - 136 Date: Mon, 1 Sep 2025 12:08:06 +0800 Message-ID: <20250901040808.1454742-4-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250901040808.1454742-1-jamin_lin@aspeedtech.com> References: <20250901040808.1454742-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=211.20.114.72; envelope-from=jamin_lin@aspeedtech.com; helo=TWMBX01.aspeed.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_FAIL=0.001, SPF_PASS=-0.001 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: , Reply-to: Jamin Lin From: Jamin Lin via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1756700573121116600 Content-Type: text/plain; charset="utf-8" The GIC interrupts 128 - 136 were only used by the AST2700 A0 SoC. Since the AST2700 A0 has been deprecated, these interrupt definitions are no longer needed. This commit removes them to clean up the codebase. Signed-off-by: Jamin Lin --- hw/arm/aspeed_ast27x0.c | 40 +++++++++------------------------ hw/intc/aspeed_intc.c | 49 +---------------------------------------- 2 files changed, 12 insertions(+), 77 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 2e47e2f860..b0b6849fbb 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -137,37 +137,32 @@ static const int aspeed_soc_ast2700a1_irqmap[] =3D { [ASPEED_DEV_SDHCI] =3D 197, }; =20 -/* GICINT 128 */ /* GICINT 192 */ -static const int ast2700_gic128_gic192_intcmap[] =3D { +static const int ast2700_gic192_intcmap[] =3D { [ASPEED_DEV_LPC] =3D 0, [ASPEED_DEV_IBT] =3D 2, [ASPEED_DEV_KCS] =3D 4, }; =20 -/* GICINT 129 */ /* GICINT 193 */ =20 -/* GICINT 130 */ /* GICINT 194 */ -static const int ast2700_gic130_gic194_intcmap[] =3D { +static const int ast2700_gic194_intcmap[] =3D { [ASPEED_DEV_I2C] =3D 0, [ASPEED_DEV_ADC] =3D 16, [ASPEED_DEV_GPIO] =3D 18, }; =20 -/* GICINT 131 */ /* GICINT 195 */ -static const int ast2700_gic131_gic195_intcmap[] =3D { +static const int ast2700_gic195_intcmap[] =3D { [ASPEED_DEV_I3C] =3D 0, [ASPEED_DEV_WDT] =3D 16, [ASPEED_DEV_FMC] =3D 25, [ASPEED_DEV_PWM] =3D 29, }; =20 -/* GICINT 132 */ /* GICINT 196 */ -static const int ast2700_gic132_gic196_intcmap[] =3D { +static const int ast2700_gic196_intcmap[] =3D { [ASPEED_DEV_ETH1] =3D 0, [ASPEED_DEV_ETH2] =3D 1, [ASPEED_DEV_ETH3] =3D 2, @@ -187,14 +182,12 @@ static const int ast2700_gic132_gic196_intcmap[] =3D { [ASPEED_DEV_EHCI4] =3D 29, }; =20 -/* GICINT 133 */ /* GICINT 197 */ -static const int ast2700_gic133_gic197_intcmap[] =3D { +static const int ast2700_gic197_intcmap[] =3D { [ASPEED_DEV_SDHCI] =3D 1, [ASPEED_DEV_PECI] =3D 4, }; =20 -/* GICINT 128 ~ 136 */ /* GICINT 192 ~ 201 */ struct gic_intc_irq_info { int irq; @@ -204,25 +197,16 @@ struct gic_intc_irq_info { }; =20 static const struct gic_intc_irq_info ast2700_gic_intcmap[] =3D { - {192, 1, 0, ast2700_gic128_gic192_intcmap}, + {192, 1, 0, ast2700_gic192_intcmap}, {193, 1, 1, NULL}, - {194, 1, 2, ast2700_gic130_gic194_intcmap}, - {195, 1, 3, ast2700_gic131_gic195_intcmap}, - {196, 1, 4, ast2700_gic132_gic196_intcmap}, - {197, 1, 5, ast2700_gic133_gic197_intcmap}, + {194, 1, 2, ast2700_gic194_intcmap}, + {195, 1, 3, ast2700_gic195_intcmap}, + {196, 1, 4, ast2700_gic196_intcmap}, + {197, 1, 5, ast2700_gic197_intcmap}, {198, 1, 6, NULL}, {199, 1, 7, NULL}, {200, 1, 8, NULL}, {201, 1, 9, NULL}, - {128, 0, 1, ast2700_gic128_gic192_intcmap}, - {129, 0, 2, NULL}, - {130, 0, 3, ast2700_gic130_gic194_intcmap}, - {131, 0, 4, ast2700_gic131_gic195_intcmap}, - {132, 0, 5, ast2700_gic132_gic196_intcmap}, - {133, 0, 6, ast2700_gic133_gic197_intcmap}, - {134, 0, 7, NULL}, - {135, 0, 8, NULL}, - {136, 0, 9, NULL}, }; =20 static qemu_irq aspeed_soc_ast2700_get_irq(AspeedSoCState *s, int dev) @@ -266,8 +250,7 @@ static qemu_irq aspeed_soc_ast2700_get_irq_index(Aspeed= SoCState *s, int dev, } =20 /* - * Invalid OR gate index, device IRQ should be between 128 to 136 - * and 192 to 201. + * Invalid OR gate index, device IRQ should be between 192 to 201. */ g_assert_not_reached(); } @@ -622,7 +605,6 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev= , Error **errp) } =20 /* INTC -> GIC192 - GIC201 */ - /* INTC -> GIC128 - GIC136 */ for (i =3D 0; i < ic->num_outpins; i++) { sysbus_connect_irq(SYS_BUS_DEVICE(&a->intc[0]), i, qdev_get_gpio_in(DEVICE(&a->gic), diff --git a/hw/intc/aspeed_intc.c b/hw/intc/aspeed_intc.c index 5cd786dee6..d003566762 100644 --- a/hw/intc/aspeed_intc.c +++ b/hw/intc/aspeed_intc.c @@ -21,24 +21,6 @@ * because its memory region is start at 0x1000 * */ -REG32(GICINT128_EN, 0x000) -REG32(GICINT128_STATUS, 0x004) -REG32(GICINT129_EN, 0x100) -REG32(GICINT129_STATUS, 0x104) -REG32(GICINT130_EN, 0x200) -REG32(GICINT130_STATUS, 0x204) -REG32(GICINT131_EN, 0x300) -REG32(GICINT131_STATUS, 0x304) -REG32(GICINT132_EN, 0x400) -REG32(GICINT132_STATUS, 0x404) -REG32(GICINT133_EN, 0x500) -REG32(GICINT133_STATUS, 0x504) -REG32(GICINT134_EN, 0x600) -REG32(GICINT134_STATUS, 0x604) -REG32(GICINT135_EN, 0x700) -REG32(GICINT135_STATUS, 0x704) -REG32(GICINT136_EN, 0x800) -REG32(GICINT136_STATUS, 0x804) REG32(GICINT192_201_EN, 0xB00) REG32(GICINT192_201_STATUS, 0xB04) =20 @@ -507,29 +489,9 @@ static void aspeed_intc_write(void *opaque, hwaddr off= set, uint64_t data, trace_aspeed_intc_write(name, offset, size, data); =20 switch (reg) { - case R_GICINT128_EN: - case R_GICINT129_EN: - case R_GICINT130_EN: - case R_GICINT131_EN: - case R_GICINT132_EN: - case R_GICINT133_EN: - case R_GICINT134_EN: - case R_GICINT135_EN: - case R_GICINT136_EN: case R_GICINT192_201_EN: aspeed_intc_enable_handler(s, offset, data); break; - case R_GICINT128_STATUS: - case R_GICINT129_STATUS: - case R_GICINT130_STATUS: - case R_GICINT131_STATUS: - case R_GICINT132_STATUS: - case R_GICINT133_STATUS: - case R_GICINT134_STATUS: - case R_GICINT135_STATUS: - case R_GICINT136_STATUS: - aspeed_intc_status_handler(s, offset, data); - break; case R_GICINT192_201_STATUS: aspeed_intc_status_handler_multi_outpins(s, offset, data); break; @@ -891,15 +853,6 @@ static const TypeInfo aspeed_intc_info =3D { =20 static AspeedINTCIRQ aspeed_2700_intc_irqs[ASPEED_INTC_MAX_INPINS] =3D { {0, 0, 10, R_GICINT192_201_EN, R_GICINT192_201_STATUS}, - {1, 10, 1, R_GICINT128_EN, R_GICINT128_STATUS}, - {2, 11, 1, R_GICINT129_EN, R_GICINT129_STATUS}, - {3, 12, 1, R_GICINT130_EN, R_GICINT130_STATUS}, - {4, 13, 1, R_GICINT131_EN, R_GICINT131_STATUS}, - {5, 14, 1, R_GICINT132_EN, R_GICINT132_STATUS}, - {6, 15, 1, R_GICINT133_EN, R_GICINT133_STATUS}, - {7, 16, 1, R_GICINT134_EN, R_GICINT134_STATUS}, - {8, 17, 1, R_GICINT135_EN, R_GICINT135_STATUS}, - {9, 18, 1, R_GICINT136_EN, R_GICINT136_STATUS}, }; =20 static void aspeed_2700_intc_class_init(ObjectClass *klass, const void *da= ta) @@ -910,7 +863,7 @@ static void aspeed_2700_intc_class_init(ObjectClass *kl= ass, const void *data) dc->desc =3D "ASPEED 2700 INTC Controller"; aic->num_lines =3D 32; aic->num_inpins =3D 10; - aic->num_outpins =3D 19; + aic->num_outpins =3D 10; aic->mem_size =3D 0x4000; aic->nr_regs =3D 0xB08 >> 2; aic->reg_offset =3D 0x1000; --=20 2.43.0