From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164663906967348.29317270950071; Sun, 6 Mar 2022 23:44:29 -0800 (PST) Received: from localhost ([::1]:58542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR82e-0000np-O3 for importer@patchew.org; Mon, 07 Mar 2022 02:44:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eR-0003Kw-3r; Mon, 07 Mar 2022 02:19:27 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eO-00039D-VJ; Mon, 07 Mar 2022 02:19:26 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2273fX6G028989; Mon, 7 Mar 2022 07:19:04 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3emhdrcc2a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:04 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277IakM032424; Mon, 7 Mar 2022 07:19:02 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 3emk62j84a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:02 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277IxB547513864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:00 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5963A405B; Mon, 7 Mar 2022 07:18:59 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 896B6A4062; Mon, 7 Mar 2022 07:18:59 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 7 Mar 2022 07:18:59 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id BCF8C22036B; Mon, 7 Mar 2022 08:18:58 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/6] aspeed/smc: Use max number of CE instead of 'num_cs' Date: Mon, 7 Mar 2022 08:18:51 +0100 Message-Id: <20220307071856.1410731-2-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: xH08n26WisSW5FtoZw12EKn73q0GCco8 X-Proofpoint-GUID: xH08n26WisSW5FtoZw12EKn73q0GCco8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 clxscore=1034 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 mlxscore=0 mlxlogscore=657 priorityscore=1501 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.156.1; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646639070579100001 Content-Type: text/plain; charset="utf-8" The Aspeed SMC model uses the 'num_cs' field to allocate resources fitting the number of devices of the machine. This is a small optimization without real need in the controller. Simplify modelling and use the max_peripherals field instead. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ssi/aspeed_smc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index d899be17fd71..a5d8bb717fc7 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -693,7 +693,7 @@ static void aspeed_smc_reset(DeviceState *d) } =20 /* Unselect all peripherals */ - for (i =3D 0; i < s->num_cs; ++i) { + for (i =3D 0; i < asc->max_peripherals; ++i) { s->regs[s->r_ctrl0 + i] |=3D CTRL_CE_STOP_ACTIVE; qemu_set_irq(s->cs_lines[i], true); } @@ -1042,7 +1042,7 @@ static void aspeed_smc_write(void *opaque, hwaddr add= r, uint64_t data, addr < s->r_timings + asc->nregs_timings) || addr =3D=3D s->r_ce_ctrl) { s->regs[addr] =3D value; - } else if (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + s->num_cs) { + } else if (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_periph= erals) { int cs =3D addr - s->r_ctrl0; aspeed_smc_flash_update_ctrl(&s->flashes[cs], value); } else if (addr >=3D R_SEG_ADDR0 && @@ -1139,9 +1139,9 @@ static void aspeed_smc_realize(DeviceState *dev, Erro= r **errp) s->spi =3D ssi_create_bus(dev, "spi"); =20 /* Setup cs_lines for peripherals */ - s->cs_lines =3D g_new0(qemu_irq, s->num_cs); + s->cs_lines =3D g_new0(qemu_irq, asc->max_peripherals); =20 - for (i =3D 0; i < s->num_cs; ++i) { + for (i =3D 0; i < asc->max_peripherals; ++i) { sysbus_init_irq(sbd, &s->cs_lines[i]); } =20 --=20 2.34.1 From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646637976284637.161432264109; Sun, 6 Mar 2022 23:26:16 -0800 (PST) Received: from localhost ([::1]:37064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR7l1-0002ew-4a for importer@patchew.org; Mon, 07 Mar 2022 02:26:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eP-0003IV-ES; Mon, 07 Mar 2022 02:19:25 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32564 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eN-00038o-42; Mon, 07 Mar 2022 02:19:25 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2276fvAE007425; Mon, 7 Mar 2022 07:19:05 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 3end0q8kvr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:04 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277IY9B032420; Mon, 7 Mar 2022 07:19:03 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 3emk62j84c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:02 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277J0qA54985196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:00 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 99A84A405B; Mon, 7 Mar 2022 07:19:00 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E06BA4040; Mon, 7 Mar 2022 07:19:00 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av23.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 7 Mar 2022 07:19:00 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 78FCE2201D3; Mon, 7 Mar 2022 08:18:59 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/6] aspeed: Rework aspeed_board_init_flashes() interface Date: Mon, 7 Mar 2022 08:18:52 +0100 Message-Id: <20220307071856.1410731-3-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GCfJPlbXRyN2La5q0XFSBC0NyNSDbWed X-Proofpoint-GUID: GCfJPlbXRyN2La5q0XFSBC0NyNSDbWed X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 clxscore=1034 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 mlxlogscore=829 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.158.5; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.187, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646637976747100001 Content-Type: text/plain; charset="utf-8" Currently, the allocation of the flash devices uses the number of slave selects configured in the SoC realize routine. It is simpler to use directly the number of FMC devices defined in the machine class and 1 for spi devices (which is what the SoC does in the back of the machine). Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/aspeed.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 02918a594d24..be24508a9854 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -276,9 +276,8 @@ static void write_boot_rom(DriveInfo *dinfo, hwaddr add= r, size_t rom_size, rom_add_blob_fixed("aspeed.boot_rom", storage, rom_size, addr); } =20 -static void aspeed_board_init_flashes(AspeedSMCState *s, - const char *flashtype, - int unit0) +static void aspeed_board_init_flashes(AspeedSMCState *s, const char *flash= type, + int count, int unit0) { int i; =20 @@ -286,7 +285,7 @@ static void aspeed_board_init_flashes(AspeedSMCState *s, return; } =20 - for (i =3D 0; i < s->num_cs; ++i) { + for (i =3D 0; i < count; ++i) { DriveInfo *dinfo =3D drive_get(IF_MTD, 0, unit0 + i); qemu_irq cs_line; DeviceState *dev; @@ -382,10 +381,10 @@ static void aspeed_machine_init(MachineState *machine) =20 aspeed_board_init_flashes(&bmc->soc.fmc, bmc->fmc_model ? bmc->fmc_model : amc->fmc_m= odel, - 0); + amc->num_cs, 0); aspeed_board_init_flashes(&bmc->soc.spi[0], bmc->spi_model ? bmc->spi_model : amc->spi_m= odel, - bmc->soc.fmc.num_cs); + 1, amc->num_cs); =20 /* Install first FMC flash content as a boot rom. */ if (drive0) { --=20 2.34.1 From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164663769831399.43032964019949; Sun, 6 Mar 2022 23:21:38 -0800 (PST) Received: from localhost ([::1]:57166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR7gX-0005Xh-BW for importer@patchew.org; Mon, 07 Mar 2022 02:21:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eK-0003Cd-Dy; Mon, 07 Mar 2022 02:19:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:10550 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eI-00036G-IX; Mon, 07 Mar 2022 02:19:20 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2275jQmP028862; Mon, 7 Mar 2022 07:19:05 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 3enc6c9hne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:05 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277IgYE027209; Mon, 7 Mar 2022 07:19:03 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma01fra.de.ibm.com with ESMTP id 3ekyg8bc88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:03 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277J17Q12845532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:01 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 56778A4051; Mon, 7 Mar 2022 07:19:01 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AA2CA404D; Mon, 7 Mar 2022 07:19:01 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av23.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 7 Mar 2022 07:19:00 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 4071E22036B; Mon, 7 Mar 2022 08:19:00 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/6] aspeed/smc: Remove 'num_cs' field Date: Mon, 7 Mar 2022 08:18:53 +0100 Message-Id: <20220307071856.1410731-4-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: RHGvnbJuRfGg5qGDkw-ihomlPum3jAz5 X-Proofpoint-GUID: RHGvnbJuRfGg5qGDkw-ihomlPum3jAz5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=816 adultscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 clxscore=1034 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.158.5; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.187, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646637699827100001 Content-Type: text/plain; charset="utf-8" It is not used anymore. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/ssi/aspeed_smc.h | 1 - hw/arm/aspeed.c | 2 -- hw/arm/aspeed_ast2600.c | 2 -- hw/arm/aspeed_soc.c | 2 -- hw/ssi/aspeed_smc.c | 7 ------- 5 files changed, 14 deletions(-) diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h index cad73ddc13f2..4a9354e13c7f 100644 --- a/include/hw/ssi/aspeed_smc.h +++ b/include/hw/ssi/aspeed_smc.h @@ -57,7 +57,6 @@ struct AspeedSMCState { =20 qemu_irq irq; =20 - uint32_t num_cs; qemu_irq *cs_lines; bool inject_failure; =20 diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index be24508a9854..8f14738676f6 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -352,8 +352,6 @@ static void aspeed_machine_init(MachineState *machine) &error_abort); object_property_set_int(OBJECT(&bmc->soc), "hw-strap2", amc->hw_strap2, &error_abort); - object_property_set_int(OBJECT(&bmc->soc), "num-cs", amc->num_cs, - &error_abort); object_property_set_link(OBJECT(&bmc->soc), "dram", OBJECT(machine->ram), &error_abort); if (machine->kernel_filename) { diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 21cd3342c578..c1e15e37739c 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -163,7 +163,6 @@ static void aspeed_soc_ast2600_init(Object *obj) =20 snprintf(typename, sizeof(typename), "aspeed.fmc-%s", socname); object_initialize_child(obj, "fmc", &s->fmc, typename); - object_property_add_alias(obj, "num-cs", OBJECT(&s->fmc), "num-cs"); =20 for (i =3D 0; i < sc->spis_num; i++) { snprintf(typename, sizeof(typename), "aspeed.spi%d-%s", i + 1, soc= name); @@ -383,7 +382,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev= , Error **errp) for (i =3D 0; i < sc->spis_num; i++) { object_property_set_link(OBJECT(&s->spi[i]), "dram", OBJECT(s->dram_mr), &error_abort); - object_property_set_int(OBJECT(&s->spi[i]), "num-cs", 1, &error_ab= ort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), errp)) { return; } diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index 7d53cf2f5133..58714cb2a01d 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -170,7 +170,6 @@ static void aspeed_soc_init(Object *obj) =20 snprintf(typename, sizeof(typename), "aspeed.fmc-%s", socname); object_initialize_child(obj, "fmc", &s->fmc, typename); - object_property_add_alias(obj, "num-cs", OBJECT(&s->fmc), "num-cs"); =20 for (i =3D 0; i < sc->spis_num; i++) { snprintf(typename, sizeof(typename), "aspeed.spi%d-%s", i + 1, soc= name); @@ -327,7 +326,6 @@ static void aspeed_soc_realize(DeviceState *dev, Error = **errp) =20 /* SPI */ for (i =3D 0; i < sc->spis_num; i++) { - object_property_set_int(OBJECT(&s->spi[i]), "num-cs", 1, &error_ab= ort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), errp)) { return; } diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index a5d8bb717fc7..6859f061c8be 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -1127,12 +1127,6 @@ static void aspeed_smc_realize(DeviceState *dev, Err= or **errp) s->r_timings =3D asc->r_timings; s->conf_enable_w0 =3D asc->conf_enable_w0; =20 - /* Enforce some real HW limits */ - if (s->num_cs > asc->max_peripherals) { - aspeed_smc_error("num_cs cannot exceed: %d", asc->max_peripherals); - s->num_cs =3D asc->max_peripherals; - } - /* DMA irq. Keep it first for the initialization in the SoC */ sysbus_init_irq(sbd, &s->irq); =20 @@ -1211,7 +1205,6 @@ static const VMStateDescription vmstate_aspeed_smc = =3D { }; =20 static Property aspeed_smc_properties[] =3D { - DEFINE_PROP_UINT32("num-cs", AspeedSMCState, num_cs, 1), DEFINE_PROP_BOOL("inject-failure", AspeedSMCState, inject_failure, fal= se), DEFINE_PROP_LINK("dram", AspeedSMCState, dram_mr, TYPE_MEMORY_REGION, MemoryRegion *), --=20 2.34.1 From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646638700971925.8662152399776; Sun, 6 Mar 2022 23:38:20 -0800 (PST) Received: from localhost ([::1]:53888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR7wh-0005sE-NU for importer@patchew.org; Mon, 07 Mar 2022 02:38:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eO-0003I7-T3; Mon, 07 Mar 2022 02:19:25 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eM-000378-M5; Mon, 07 Mar 2022 02:19:24 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2277AjTV001913; Mon, 7 Mar 2022 07:19:07 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3emsauy2e1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:06 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277H0v4012630; Mon, 7 Mar 2022 07:19:04 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06ams.nl.ibm.com with ESMTP id 3eky4huxt5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:04 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277J2Cw42926520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:02 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F055E52063; Mon, 7 Mar 2022 07:19:01 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av21.portsmouth.uk.ibm.com (Postfix) with SMTP id AF3CD5204F; Mon, 7 Mar 2022 07:19:01 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id EF7FD2201D3; Mon, 7 Mar 2022 08:19:00 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/6] aspeed/smc: Rename 'max_peripherals' to 'max_cs' Date: Mon, 7 Mar 2022 08:18:54 +0100 Message-Id: <20220307071856.1410731-5-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: bC8HHva8cToWuJWSFMtspNX4mKqnDO31 X-Proofpoint-ORIG-GUID: bC8HHva8cToWuJWSFMtspNX4mKqnDO31 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 mlxlogscore=999 clxscore=1034 mlxscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.156.1; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646638702647100001 Content-Type: text/plain; charset="utf-8" The naming makes more sense in a SPI controller model. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/ssi/aspeed_smc.h | 2 +- hw/ssi/aspeed_smc.c | 42 ++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h index 4a9354e13c7f..6501a04b8f3e 100644 --- a/include/hw/ssi/aspeed_smc.h +++ b/include/hw/ssi/aspeed_smc.h @@ -95,7 +95,7 @@ struct AspeedSMCClass { uint8_t r_timings; uint8_t nregs_timings; uint8_t conf_enable_w0; - uint8_t max_peripherals; + uint8_t max_cs; const uint32_t *resets; const AspeedSegments *segments; uint32_t segment_addr_mask; diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 6859f061c8be..f194182beacf 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -224,7 +224,7 @@ static bool aspeed_smc_flash_overlap(const AspeedSMCSta= te *s, AspeedSegments seg; int i; =20 - for (i =3D 0; i < asc->max_peripherals; i++) { + for (i =3D 0; i < asc->max_cs; i++) { if (i =3D=3D cs) { continue; } @@ -290,7 +290,7 @@ static void aspeed_smc_flash_set_segment(AspeedSMCState= *s, int cs, */ if ((asc->segments =3D=3D aspeed_2500_spi1_segments || asc->segments =3D=3D aspeed_2500_spi2_segments) && - cs =3D=3D asc->max_peripherals && + cs =3D=3D asc->max_cs && seg.addr + seg.size !=3D asc->segments[cs].addr + asc->segments[cs].size) { aspeed_smc_error("Tried to change CS%d end address to 0x%" @@ -693,13 +693,13 @@ static void aspeed_smc_reset(DeviceState *d) } =20 /* Unselect all peripherals */ - for (i =3D 0; i < asc->max_peripherals; ++i) { + for (i =3D 0; i < asc->max_cs; ++i) { s->regs[s->r_ctrl0 + i] |=3D CTRL_CE_STOP_ACTIVE; qemu_set_irq(s->cs_lines[i], true); } =20 /* setup the default segment register values and regions for all */ - for (i =3D 0; i < asc->max_peripherals; ++i) { + for (i =3D 0; i < asc->max_cs; ++i) { aspeed_smc_flash_set_segment_region(s, i, asc->segment_to_reg(s, &asc->segments[i])); } @@ -729,8 +729,8 @@ static uint64_t aspeed_smc_read(void *opaque, hwaddr ad= dr, unsigned int size) (aspeed_smc_has_dma(asc) && addr =3D=3D R_DMA_LEN) || (aspeed_smc_has_dma(asc) && addr =3D=3D R_DMA_CHECKSUM) || (addr >=3D R_SEG_ADDR0 && - addr < R_SEG_ADDR0 + asc->max_peripherals) || - (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_peripherals)= ) { + addr < R_SEG_ADDR0 + asc->max_cs) || + (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_cs)) { =20 trace_aspeed_smc_read(addr << 2, size, s->regs[addr]); =20 @@ -1042,11 +1042,11 @@ static void aspeed_smc_write(void *opaque, hwaddr a= ddr, uint64_t data, addr < s->r_timings + asc->nregs_timings) || addr =3D=3D s->r_ce_ctrl) { s->regs[addr] =3D value; - } else if (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_periph= erals) { + } else if (addr >=3D s->r_ctrl0 && addr < s->r_ctrl0 + asc->max_cs) { int cs =3D addr - s->r_ctrl0; aspeed_smc_flash_update_ctrl(&s->flashes[cs], value); } else if (addr >=3D R_SEG_ADDR0 && - addr < R_SEG_ADDR0 + asc->max_peripherals) { + addr < R_SEG_ADDR0 + asc->max_cs) { int cs =3D addr - R_SEG_ADDR0; =20 if (value !=3D s->regs[R_SEG_ADDR0 + cs]) { @@ -1090,7 +1090,7 @@ static void aspeed_smc_instance_init(Object *obj) AspeedSMCClass *asc =3D ASPEED_SMC_GET_CLASS(s); int i; =20 - for (i =3D 0; i < asc->max_peripherals; i++) { + for (i =3D 0; i < asc->max_cs; i++) { object_initialize_child(obj, "flash[*]", &s->flashes[i], TYPE_ASPEED_SMC_FLASH); } @@ -1133,9 +1133,9 @@ static void aspeed_smc_realize(DeviceState *dev, Erro= r **errp) s->spi =3D ssi_create_bus(dev, "spi"); =20 /* Setup cs_lines for peripherals */ - s->cs_lines =3D g_new0(qemu_irq, asc->max_peripherals); + s->cs_lines =3D g_new0(qemu_irq, asc->max_cs); =20 - for (i =3D 0; i < asc->max_peripherals; ++i) { + for (i =3D 0; i < asc->max_cs; ++i) { sysbus_init_irq(sbd, &s->cs_lines[i]); } =20 @@ -1168,7 +1168,7 @@ static void aspeed_smc_realize(DeviceState *dev, Erro= r **errp) * module behind to handle the memory accesses. This depends on * the board configuration. */ - for (i =3D 0; i < asc->max_peripherals; ++i) { + for (i =3D 0; i < asc->max_cs; ++i) { AspeedSMCFlash *fl =3D &s->flashes[i]; =20 if (!object_property_set_link(OBJECT(fl), "controller", OBJECT(s), @@ -1314,7 +1314,7 @@ static void aspeed_2400_smc_class_init(ObjectClass *k= lass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 1; + asc->max_cs =3D 1; asc->segments =3D aspeed_2400_smc_segments; asc->flash_window_base =3D 0x10000000; asc->flash_window_size =3D 0x6000000; @@ -1359,7 +1359,7 @@ static void aspeed_2400_fmc_class_init(ObjectClass *k= lass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 5; + asc->max_cs =3D 5; asc->segments =3D aspeed_2400_fmc_segments; asc->segment_addr_mask =3D 0xffff0000; asc->resets =3D aspeed_2400_fmc_resets; @@ -1401,7 +1401,7 @@ static void aspeed_2400_spi1_class_init(ObjectClass *= klass, void *data) asc->r_timings =3D R_SPI_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D SPI_CONF_ENABLE_W0; - asc->max_peripherals =3D 1; + asc->max_cs =3D 1; asc->segments =3D aspeed_2400_spi1_segments; asc->flash_window_base =3D 0x30000000; asc->flash_window_size =3D 0x10000000; @@ -1442,7 +1442,7 @@ static void aspeed_2500_fmc_class_init(ObjectClass *k= lass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 3; + asc->max_cs =3D 3; asc->segments =3D aspeed_2500_fmc_segments; asc->segment_addr_mask =3D 0xffff0000; asc->resets =3D aspeed_2500_fmc_resets; @@ -1480,7 +1480,7 @@ static void aspeed_2500_spi1_class_init(ObjectClass *= klass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 2; + asc->max_cs =3D 2; asc->segments =3D aspeed_2500_spi1_segments; asc->segment_addr_mask =3D 0xffff0000; asc->flash_window_base =3D 0x30000000; @@ -1515,7 +1515,7 @@ static void aspeed_2500_spi2_class_init(ObjectClass *= klass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 2; + asc->max_cs =3D 2; asc->segments =3D aspeed_2500_spi2_segments; asc->segment_addr_mask =3D 0xffff0000; asc->flash_window_base =3D 0x38000000; @@ -1597,7 +1597,7 @@ static void aspeed_2600_fmc_class_init(ObjectClass *k= lass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 1; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 3; + asc->max_cs =3D 3; asc->segments =3D aspeed_2600_fmc_segments; asc->segment_addr_mask =3D 0x0ff00ff0; asc->resets =3D aspeed_2600_fmc_resets; @@ -1636,7 +1636,7 @@ static void aspeed_2600_spi1_class_init(ObjectClass *= klass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 2; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 2; + asc->max_cs =3D 2; asc->segments =3D aspeed_2600_spi1_segments; asc->segment_addr_mask =3D 0x0ff00ff0; asc->flash_window_base =3D 0x30000000; @@ -1675,7 +1675,7 @@ static void aspeed_2600_spi2_class_init(ObjectClass *= klass, void *data) asc->r_timings =3D R_TIMINGS; asc->nregs_timings =3D 3; asc->conf_enable_w0 =3D CONF_ENABLE_W0; - asc->max_peripherals =3D 3; + asc->max_cs =3D 3; asc->segments =3D aspeed_2600_spi2_segments; asc->segment_addr_mask =3D 0x0ff00ff0; asc->flash_window_base =3D 0x50000000; --=20 2.34.1 From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164663859675029.989119772947333; Sun, 6 Mar 2022 23:36:36 -0800 (PST) Received: from localhost ([::1]:51612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR7v1-0004HH-Gz for importer@patchew.org; Mon, 07 Mar 2022 02:36:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eN-0003G3-0H; Mon, 07 Mar 2022 02:19:23 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:25062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eK-0003BI-Um; Mon, 07 Mar 2022 02:19:22 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2276ViJm021227; Mon, 7 Mar 2022 07:19:08 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 3encv30rh7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:08 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277H04d013791; Mon, 7 Mar 2022 07:19:05 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03fra.de.ibm.com with ESMTP id 3ekyg93dj1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:05 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277J2rl48234962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:02 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8A4CAE056; Mon, 7 Mar 2022 07:19:02 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E584AE04D; Mon, 7 Mar 2022 07:19:02 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 7 Mar 2022 07:19:02 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id AB23A22036B; Mon, 7 Mar 2022 08:19:01 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 5/6] aspeed/smc: Let the SSI core layer define the bus name Date: Mon, 7 Mar 2022 08:18:55 +0100 Message-Id: <20220307071856.1410731-6-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: ERlq27NSBMJDw5ehvehm59X3am-7DzSh X-Proofpoint-GUID: ERlq27NSBMJDw5ehvehm59X3am-7DzSh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 bulkscore=0 mlxscore=0 suspectscore=0 clxscore=1034 adultscore=0 spamscore=0 phishscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.156.1; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646638598507100001 Content-Type: text/plain; charset="utf-8" If no id is provided, qdev automatically assigns a unique ename with the following pattern ".". Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index f194182beacf..113f31899a6b 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -1130,7 +1130,7 @@ static void aspeed_smc_realize(DeviceState *dev, Erro= r **errp) /* DMA irq. Keep it first for the initialization in the SoC */ sysbus_init_irq(sbd, &s->irq); =20 - s->spi =3D ssi_create_bus(dev, "spi"); + s->spi =3D ssi_create_bus(dev, NULL); =20 /* Setup cs_lines for peripherals */ s->cs_lines =3D g_new0(qemu_irq, asc->max_cs); --=20 2.34.1 From nobody Mon Feb 9 15:48:20 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164663840544788.8503504984186; Sun, 6 Mar 2022 23:33:25 -0800 (PST) Received: from localhost ([::1]:47868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nR7rw-0001g1-Bp for importer@patchew.org; Mon, 07 Mar 2022 02:33:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eN-0003G4-0P; Mon, 07 Mar 2022 02:19:23 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nR7eK-0003B3-Jp; Mon, 07 Mar 2022 02:19:21 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2276mVCR029272; Mon, 7 Mar 2022 07:19:08 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 3end3wrgqp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:08 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2277HG6p013839; Mon, 7 Mar 2022 07:19:06 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03fra.de.ibm.com with ESMTP id 3ekyg93dj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Mar 2022 07:19:06 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2277J3dQ46072066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Mar 2022 07:19:03 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EA13AE051; Mon, 7 Mar 2022 07:19:03 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44D37AE045; Mon, 7 Mar 2022 07:19:03 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 7 Mar 2022 07:19:03 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.76.59]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 7112C2201D3; Mon, 7 Mar 2022 08:19:02 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 6/6] aspeed/smc: Fix error log Date: Mon, 7 Mar 2022 08:18:56 +0100 Message-Id: <20220307071856.1410731-7-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307071856.1410731-1-clg@kaod.org> References: <20220307071856.1410731-1-clg@kaod.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ih1V-EgaqgOJGjzRL4GQLxWOggsN69-2 X-Proofpoint-ORIG-GUID: ih1V-EgaqgOJGjzRL4GQLxWOggsN69-2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-07_01,2022-03-04_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 mlxlogscore=754 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1034 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203070041 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: softfail client-ip=148.163.156.1; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , Alistair Francis , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1646638406032100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 113f31899a6b..f410248938c9 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -327,7 +327,7 @@ static void aspeed_smc_flash_set_segment(AspeedSMCState= *s, int cs, static uint64_t aspeed_smc_flash_default_read(void *opaque, hwaddr addr, unsigned size) { - aspeed_smc_error("To 0x%" HWADDR_PRIx " of size %u" PRIx64, addr, size= ); + aspeed_smc_error("To 0x%" HWADDR_PRIx " of size %u", addr, size); return 0; } =20 --=20 2.34.1