From patchwork Sun Jan 12 22:16:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 856816 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1179724wrc; Sun, 12 Jan 2025 14:25:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWIXI9vaJ0JOvYld09pEpgcno6u/RagvwCYs9Nnv43ZmSWPuqtjwBtEpBfKygkkA+En64SMGA==@linaro.org X-Google-Smtp-Source: AGHT+IGpmUf+S4FvGI29a+XaEHziathEkfgGf3I6HHBX3TXKgZWxLTGyVPns2Zar57nUwhv/692+ X-Received: by 2002:a05:622a:558a:b0:467:7eb6:a007 with SMTP id d75a77b69052e-46c710e1747mr336309061cf.37.1736720724561; Sun, 12 Jan 2025 14:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736720724; cv=none; d=google.com; s=arc-20240605; b=ZKh/lEyInLlxKgpyvimlKn1cvKOYOTppDdQUA8koNmbveGqq9H0se2FPlVgZnP2A/P MfS1Z5zTUSUN4Paj1pDEZKa8cq5xFocDLZOhZNKK130gjKgVREVb7SPMr/NkUCancwje +f2ps0tysvILHo2jrALKrUqVXfU2vKwuKqhC4Ya7AuT4ZeaKxb/P0aF8Q/rUIElXypvd c2sBg+NIpxwXYK/tV7rSx8HkixoKvRom6l+tCcFjYnP3iNU4I71WyvNwiIRw+2ZaO0NZ G4fMU/lhPrPTuANfzQb0YxYhf1GIvkIyZlPcMQxNCVhlUc4U3n7x+Rd5/AEar7htSF5K FIEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JQ/yRHFRw+pRRef+zyQSK+jFDarKIc/XCW+pBv+XSCs=; fh=lA8KdGRRCLcXxei5dR52XWsTSutqQE1F1yBegzCCPPE=; b=lQR1QPDQFa8PoC7NvEzRHWtquv+R63rNr/BeaXN93hmQGQxaUO8EIwvV9xT4+FE2jX 4kXsZWMzW/DildOUjioi5BBttJP/O+Rumi6sXy5I8Cou5MEPGUuKyUyQlAIZk/mnQL5d lKqxHa5B2Tvn0dBDDQUAVhvUxGsrrpCu37AuMIMKi1/URLtNc9w9Lb4/rGFCdQkrBzms SM8zev/mEptSZGunHeGL+8j+aeOmjBhGGDbsJ1WiaVhGxC1z0yXzKsTHOOGW16HLWuN0 AZHvg4rLoM+dgGJ6Er+KyBdtsM5jkubHxDbE16teO/yCsToHmCvLAvD2voc+yeO2/yqZ 2Vjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUVBvZva; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46c873e5226si73471501cf.274.2025.01.12.14.25.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 14:25:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUVBvZva; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tX6IM-0000X6-Bo; Sun, 12 Jan 2025 17:18:59 -0500 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 1tX6II-0000LW-DF for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:18:54 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tX6IF-0006Sy-1J for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:18:54 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43690d4605dso25675245e9.0 for ; Sun, 12 Jan 2025 14:18:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736720329; x=1737325129; 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=JQ/yRHFRw+pRRef+zyQSK+jFDarKIc/XCW+pBv+XSCs=; b=aUVBvZvaZy/pU7shbKIaZuZ/6Rg2NH+pd2ufL8sYJ7V0a7ov5hfcHUji1dXWvc3+dB cWOgU1MiL0Dx2aYznUpQeSGADsA5h9R4Vmvqbe2Q5fvgN8OdVLWiCbE+q3FzDjXU/2y9 EJcdDBY4UZgHuWkAm1QnFRG/N43SR8QqR4qNijcP4tBJI8reZQU8BYnnqND8Dska9KWT OUqPOkKs+BN8mrtMc/U8XotBxvjEHYt8v9bq6vdTnllsuBpqD6STrrI16nSNvlOsexPv QYdeN8Unl5eAYcc0jxq7/lkFuhUksPuaQhsz3meC1Vop9xLdO7vIQVW9JdPUfWP9bzHF nzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736720329; x=1737325129; 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=JQ/yRHFRw+pRRef+zyQSK+jFDarKIc/XCW+pBv+XSCs=; b=esiLCnI2atiNxMe2oguqXR6tlQ6+1KcgKeKSfcunDqZLGA4FX4B8Boa0ghZOuiT4oK N6rPyYc1QynePfyh2qWZC6WymfQU329TTfLvFLwOzT8s/5Y8FsPVFE0Y2FOXZC1KsB7I fJmGRpIpYs9In8WmUlS1QUsSnhNGBT3S0lmMhPLdtkJZLVH530Yc4MjIMBuLzRVi+/NX Sbpk0qD6AkwPRIWn4wgo74s97aFlxhq7uB2QdYqUIRk2lWdBBihkWvdeIkk9DNA1AU9b 2DuetdSLm7fa49KkDsgAZpVy/rNBW+2v103tNgLvQbULQL2ylIKyrUJnkkPKmanCYkS1 Aq4w== X-Gm-Message-State: AOJu0YzB8l0bAJsHFFPqI5hc6msFtNx0ZOIinxG24uMC1NuduG8eDBvo tuRJ6HF863bk1ji9Hcr8MEQpDxfKZfdlRhhiZBgPqKQRbWgX/zt8NhnPyHOik7uAcx9qTULd3Nx WHF4= X-Gm-Gg: ASbGncvJxU3u55vm8tDeApSsk15QyJw/BW3G+bqskb3IIPMpezku2gioTt6xGijNRq+ 8NmXWvg9Itw+hQrYXlaZi/XhPLcL+dd2IQ3+xn5EDI8FUu+g9wIlOSGD7MzyhqpR1zYjSZasjez gKeJZab1n40O7SpUw84r+KNnC4V7TCjjQECxazHgkHAtTt20uYiXQvhz0lbtLoetDiCTWBncees ZYpfQDpkxa6w/EZiA+ah6vYO908sEVV3Vmd13dLTPq3AoFGZbTCZj6SD51Y6iXhoAcPFJ5JftON kcgYxO9YJoT0Fz8qiwERNx/auPsua+Q= X-Received: by 2002:a05:600c:1c28:b0:434:a734:d268 with SMTP id 5b1f17b1804b1-436e2699dfbmr185976455e9.14.1736720329124; Sun, 12 Jan 2025 14:18:49 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2da66fcsm158823095e9.6.2025.01.12.14.18.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 14:18:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" Subject: [PULL 16/49] hw/net/xilinx_ethlite: Map TX_GIE as MMIO Date: Sun, 12 Jan 2025 23:16:52 +0100 Message-ID: <20250112221726.30206-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250112221726.30206-1-philmd@linaro.org> References: <20250112221726.30206-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add TX_GIE to the TX registers MMIO region. Before TX_GIE1 was accessed as RAM, with no effect. Now it is accessed as MMIO, also without any effect. The memory flat view becomes: (qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007fb (prio 0, i/o): ethlite.tx[0]io 00000000810007fc-0000000081000ff3 (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007fc 0000000081000ff4-0000000081000ffb (prio 0, i/o): ethlite.tx[1]io 0000000081000ffc-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000000ffc 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Message-Id: <20241112181044.92193-18-philmd@linaro.org> --- hw/net/xilinx_ethlite.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 5dac44fa688..898c09b3981 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -42,7 +42,6 @@ #define BUFSZ_MAX 0x07e4 #define A_MDIO_BASE 0x07e4 #define A_TX_BASE0 0x07f4 -#define R_TX_GIE0 (0x07f8 / 4) #define R_TX_CTRL0 (0x07fc / 4) #define R_TX_BUF1 (0x0800 / 4) #define A_TX_BASE1 0x0ff4 @@ -56,6 +55,7 @@ enum { TX_LEN = 0, + TX_GIE = 1, TX_MAX }; @@ -141,6 +141,9 @@ static uint64_t port_tx_read(void *opaque, hwaddr addr, unsigned int size) case TX_LEN: r = s->port[port_index].reg.tx_len; break; + case TX_GIE: + r = s->port[port_index].reg.tx_gie; + break; default: g_assert_not_reached(); } @@ -158,6 +161,9 @@ static void port_tx_write(void *opaque, hwaddr addr, uint64_t value, case TX_LEN: s->port[port_index].reg.tx_len = value; break; + case TX_GIE: + s->port[port_index].reg.tx_gie = value; + break; default: g_assert_not_reached(); } @@ -237,10 +243,6 @@ eth_read(void *opaque, hwaddr addr, unsigned int size) switch (addr) { - case R_TX_GIE0: - r = s->port[port_index].reg.tx_gie; - break; - case R_TX_CTRL1: case R_TX_CTRL0: r = s->port[port_index].reg.tx_ctrl; @@ -285,11 +287,6 @@ eth_write(void *opaque, hwaddr addr, s->port[port_index].reg.tx_ctrl = value & ~(CTRL_P | CTRL_S); break; - /* Keep these native. */ - case R_TX_GIE0: - s->port[port_index].reg.tx_gie = value; - break; - default: s->regs[addr] = tswap32(value); break;