From nobody Fri Apr 4 06:19:14 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1742303778; cv=none; d=zohomail.com; s=zohoarc; b=SU6m+65YzdqOu5vefrNR9yulaE3edvLnd3+9jP6k58cyQLBeKn0z5J2B8v8rYLVP38QlpnorTygRQM/D3I+k8Bt49P+3CoPhdhoZ+KCYqehaGfY+sWmQfNVOlsdDD1gPVL+EU+/HueIiOporVOOhBTLSXqxff6D6cGNhSTCLDOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742303778; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SXfXuqOifdkruB2nrZjTD84VGmjUDrLwEA4V1suXy7k=; b=g1PZdoqX+CCH1mZmN7NJacM+cDc2Jl8WsdSMGp7BXrRudXty8wHcF3i3A1kTe6w/jcSWCMc2MoOpSLuMjjWjxhA3weFHJauIofidqrAOAA1IslkyadW5AqzyhYFlXWT7qJvTQ8S1zBRDhe+4IAxsp4v/rJ0Q17I2FWFlxgmTCHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1742303778435174.52115756202056; Tue, 18 Mar 2025 06:16:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuWkh-00034b-7m; Tue, 18 Mar 2025 09:13:07 -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 1tuWj1-0002Kf-85; Tue, 18 Mar 2025 09:11:32 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuWix-0003nr-K4; Tue, 18 Mar 2025 09:11:18 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-ac2a81e41e3so1252847966b.1; Tue, 18 Mar 2025 06:11:14 -0700 (PDT) Received: from corvink-nb.beckhoff.com ([195.226.174.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac3147f3101sm850678066b.69.2025.03.18.06.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 06:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742303473; x=1742908273; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SXfXuqOifdkruB2nrZjTD84VGmjUDrLwEA4V1suXy7k=; b=CIMHkLSu/Yy0FMVkSVD5Dr2lt0AZBVj7sCluDCPDFCpaPjANYWE/W/QriHZKeCia/U aldn+IEN3WU8kDNhbGZ2MPOjRo93jgjv7LdJLlTtfg5+8qO3f3pcHAEyR/3EDLo1Q2lB 0EphX2Wl/OzhUOvxgCdGY0j84Jr2w9dyTeXR1c/QQwfR/cy1FST92+VTkss2dgfezqpL xURIcYh8uXGf7iy0TcNpTiNrmAjdh0Pj8aOh10MnKDH/Ff9BqLPHzB8cDdX66cL3yaxP 77hOO4rpPk7S4nJQpoGsK89abAgESVKOaiWCO/IzoUTdeslRiTIrKX5am8kS0ed2zoSj bRAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742303473; x=1742908273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SXfXuqOifdkruB2nrZjTD84VGmjUDrLwEA4V1suXy7k=; b=UwkshT8kiwRbig/iDGB7xSjOB59Hw/wqBMeB5IV+3P9cL+4327LRrQH4X4+f5CXJ3e P13GLYtfAaqjYwTjH2YtsIe1+RpsmdWj21gyJdU/qd0pbvm2vPyxMCaiVPCBCirrMNUs aVjyIGC0z71byeVbHUpxsZbE6jWgKGOcyuIpHEYt3G3+Hg+vsOQNKtpT72j6vd554cM4 f8rnhh8C92IogcWhCDHA01Zc2SS7nSbYyY0Fj+o4Kma7D399TWBmIkcfn3/egR+zyyT0 shLwJNIV58o5zltS3LjvW/SYUhIik43RX1BQKzMCvTud20RZcMc3+rlubHGlRKXP4cld rL3g== X-Forwarded-Encrypted: i=1; AJvYcCX3ZgrgyATkrnvBRwIrY7d8VMh8Gssh3lnkdJzHElHn169nBDc50D40YSY9hu8irKencxdjFaRrtw==@nongnu.org X-Gm-Message-State: AOJu0YzUUVgMuV9Q17Rdlux8CN8xgwK3dD4mjgLg8IXgxZj9qkzIRFaN kwb4Avn4d2em8osOK88gG+Ar5jmdprnmlpw/2nug2u2ctLzkw1Gf3CWigdSs X-Gm-Gg: ASbGncuVzwBqgaF8sOBiAmMs20rGNLSZQnULO9XHOPsvF2zRUfwrF1SnkQ29768iMUZ /qMj/W59CoJfpW8BxtafzgHiZYjInMAhfjipfYa/Jpmjxns5mXAuvhq+cFEHE03fpj3AbqPkNZS DP2XGvsjJ2BuvTYIITjvnMwlIYY8WA+gfXCM2uJip4gVo8cwPZf6Q5+apvrQ/S298GA7UL6Owxg EyNRdwlQotv1PDdGTnPjsfedZqhFi70eegz+LLbNI13aPM23K5RLKO281ckxilNV45wVVS5KQ66 XN78JJtIAN18bV9RgpdAzOe5eDGek/lgqEX5WFng8zCFg//exHjq2i6RR1zwNsyWtrw= X-Google-Smtp-Source: AGHT+IE0lcnpuFUZ8J1Qns90x+egNbeWfvr7x8ntwDgqy1y/rmgNeRNsiXeKCAzMqwHHv6Kl704dQg== X-Received: by 2002:a17:906:ee85:b0:ac3:4489:790f with SMTP id a640c23a62f3a-ac38d407bf4mr414434366b.24.1742303471954; Tue, 18 Mar 2025 06:11:11 -0700 (PDT) From: =?UTF-8?q?Corvin=20K=C3=B6hne?= To: qemu-devel@nongnu.org, =?UTF-8?q?Corvin=20K=C3=B6hne?= , qemu-arm@nongnu.org Cc: =?UTF-8?q?Yannick=20Vo=C3=9Fen?= , "Edgar E. Iglesias" , Peter Maydell , Alistair Francis , Paolo Bonzini , YannickV Subject: [PATCH 13/21] hw/arm/beckhoff_CX7200: Remove second SD controller Date: Tue, 18 Mar 2025 14:08:04 +0100 Message-ID: <20250318130817.119636-14-corvin.koehne@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250318130817.119636-1-corvin.koehne@gmail.com> References: <20250318130817.119636-1-corvin.koehne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::62b; envelope-from=corvin.koehne@gmail.com; helo=mail-ej1-x62b.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1742303781627019100 From: YannickV The CX7200 has one SD controller connected to address 0xE0101000. The controller connected to address 0xE0100000 can be removed. Signed-off-by: Yannick Vo=C3=9Fen --- hw/arm/beckhoff_CX7200.c | 48 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/hw/arm/beckhoff_CX7200.c b/hw/arm/beckhoff_CX7200.c index 89466cfdd8..bf3c66e5a4 100644 --- a/hw/arm/beckhoff_CX7200.c +++ b/hw/arm/beckhoff_CX7200.c @@ -207,11 +207,13 @@ static void beckhoff_cx7200_init(MachineState *machin= e) CX7200MachineState *cx7200_machine =3D CX7200_MACHINE(machine); MemoryRegion *address_space_mem =3D get_system_memory(); MemoryRegion *ocm_ram =3D g_new(MemoryRegion, 1); - DeviceState *dev, *slcr; + DeviceState *carddev, *dev, *slcr; SysBusDevice *busdev; qemu_irq pic[64]; int n; unsigned int smp_cpus =3D machine->smp.cpus; + DriveInfo *di; + BlockBackend *blk; =20 /* max 2GB ram */ if (machine->ram_size > 2 * GiB) { @@ -318,33 +320,25 @@ static void beckhoff_cx7200_init(MachineState *machin= e) gem_init(0xE000B000, pic[54 - IRQ_OFFSET]); gem_init(0xE000C000, pic[77 - IRQ_OFFSET]); =20 - for (n =3D 0; n < 2; n++) { - int hci_irq =3D n ? 79 : 56; - hwaddr hci_addr =3D n ? 0xE0101000 : 0xE0100000; - DriveInfo *di; - BlockBackend *blk; - DeviceState *carddev; + /* + * Compatible with: + * - SD Host Controller Specification Version 2.0 Part A2 + * - SDIO Specification Version 2.0 + * - MMC Specification Version 3.31 + */ + dev =3D qdev_new(TYPE_SYSBUS_SDHCI); + qdev_prop_set_uint8(dev, "sd-spec-version", 2); + qdev_prop_set_uint64(dev, "capareg", ZYNQ_SDHCI_CAPABILITIES); + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xE0101000); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[79 - IRQ_OFFSET]); =20 - /* - * Compatible with: - * - SD Host Controller Specification Version 2.0 Part A2 - * - SDIO Specification Version 2.0 - * - MMC Specification Version 3.31 - */ - dev =3D qdev_new(TYPE_SYSBUS_SDHCI); - qdev_prop_set_uint8(dev, "sd-spec-version", 2); - qdev_prop_set_uint64(dev, "capareg", ZYNQ_SDHCI_CAPABILITIES); - sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, hci_addr); - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[hci_irq - IRQ_OFFSE= T]); - - di =3D drive_get(IF_SD, 0, n); - blk =3D di ? blk_by_legacy_dinfo(di) : NULL; - carddev =3D qdev_new(TYPE_SD_CARD); - qdev_prop_set_drive_err(carddev, "drive", blk, &error_fatal); - qdev_realize_and_unref(carddev, qdev_get_child_bus(dev, "sd-bus"), - &error_fatal); - } + di =3D drive_get(IF_SD, 0, 0); + blk =3D di ? blk_by_legacy_dinfo(di) : NULL; + carddev =3D qdev_new(TYPE_SD_CARD); + qdev_prop_set_drive_err(carddev, "drive", blk, &error_fatal); + qdev_realize_and_unref(carddev, qdev_get_child_bus(dev, "sd-bus"), + &error_fatal); =20 dev =3D qdev_new(TYPE_ZYNQ_XADC); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); --=20 2.49.0