From nobody Sun Nov 24 09:59:50 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1725379808; cv=none; d=zohomail.com; s=zohoarc; b=Y4JIHhqlDm+1BrzZrbVjI00JVuG/4YD7YxTjFY0j3T1ThMNuIeQK2lO/sKHARHgMGksFjuW6MaQLWdjFk+7Kzzx28zexa6Q85d8YniFBlBV+4fYG+n+jueYDbf2me8iZrbMvySX0F2ReBU4SdxLgV0W4UzqJiTjlTyD2kaw9y7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725379808; h=Content-Transfer-Encoding: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:Cc; bh=6KZWNBjhhzjYgLlW+2QJ75y9er/DhS+ckZ21pfSiKUs=; b=isoqSoeD01X5uP3PbduZzTw3GGvHaiBTZ35BOgX36jzywXQNzFSkCynIwHvjlAkbrRxtTjbDo78fY+mroDDx2PZnrH87awRuaJIgMsxdyp3S9GvKBujEcg5DMvnUx+cG7lOaRfECVK2YjZl4JFD0A2heN4sOJRlgsUaUbkhb7OE= 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 1725379808539293.68039119085824; Tue, 3 Sep 2024 09:10:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slW5V-0000td-3x; Tue, 03 Sep 2024 12:09:01 -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 1slW5T-0000lV-7A for qemu-devel@nongnu.org; Tue, 03 Sep 2024 12:08:59 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slW5O-0002vB-Ke for qemu-devel@nongnu.org; Tue, 03 Sep 2024 12:08:58 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-374ca7a10d4so1350215f8f.3 for ; Tue, 03 Sep 2024 09:08:54 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6df1066sm175123065e9.18.2024.09.03.09.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 09:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725379733; x=1725984533; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6KZWNBjhhzjYgLlW+2QJ75y9er/DhS+ckZ21pfSiKUs=; b=IofOdgyzqc6pJWcJRxFCRiBlrsloL6Wk6RIz4BA9Vv1PSfFIGoOFPpLZs5+vGKCU0U Be1RzkCpTY80oquR/PBEH1UMlwLZIIQJgg03y/+8DPcRH7ToW0e8iOJeMxlRSovIdd9D 3quNR7hqOV7kf2ImNC2KY/PJDl5r/scD6WEBEbS5roCH6ieAtNqYgZlvqST+Nd2+FGlX 4xVjI658JMXUwOj3xdks83baZ9NKJ7uGA543Lfe7LJX6vgnkT2O72IXg0n0prhfoJOW1 Edd5agCvzMDmmdncLSuvt3FUaAdJmb+T8Zz9v4ldpO4w+NxxRGj+Mvbckr1veCk3u0dM 6taA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725379733; x=1725984533; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6KZWNBjhhzjYgLlW+2QJ75y9er/DhS+ckZ21pfSiKUs=; b=R7zwtBpn1/6xVUYmsd0HNgqXnFf6xfVTTr8sTu3uFa7q2k7qoePbhBFrTsk8mxScqP uA9vwMh77qrTklufmTVF+i6Rdrq85Llutzge8tGVNe8gGXL75c26pBEuK0zsRtsKjp35 un4W7F5X7yaIwQElzN7UlTRrqfFuAmNID/wv96O+soIejbMeUbYWLZMC3DJYakiZAa2q AN/RZjznmFj8PF9nceY64sl6vuI2M/Wf+S3Cdxtvs7H3zBsMcsFj5Ml/7y9mfJmJOL/R 7sKYtOa1d+SR4H3vKPF0R9qOHE5oLjl6ORrFBX1k5eC21l3A9yA0F3ahLI7YE86Jv79a 3YaA== X-Forwarded-Encrypted: i=1; AJvYcCVy2onuQMxgsTSM72ungVATYdio2+V0uiFcWUd9NAUZy2CnxDl2BMNig4bshOPgoa/NBIAT8nkYw44r@nongnu.org X-Gm-Message-State: AOJu0YzTEJ1obOM6t4ed6ONeDKHFPg4XHnXdW/j3FHzoqWosBVNmH5b4 Tc7rTRNEMoQ8vTFbjJ+rmVUm0AQSli0DNLqGGdPkM1IpHVElB+cEOhBaKN5QbTs= X-Google-Smtp-Source: AGHT+IGLSy9KpfY1okcyiikC/zGAUI4aPdmkBYZiL/QBxKdzKbonoF5n2Vrtlh7PepyAhK//lvvFuQ== X-Received: by 2002:a5d:4608:0:b0:374:c31e:971a with SMTP id ffacd0b85a97d-374c31e991emr6538557f8f.0.1725379732903; Tue, 03 Sep 2024 09:08:52 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH for-9.2 39/53] hw/char: Remove omap2_uart Date: Tue, 3 Sep 2024 17:07:37 +0100 Message-Id: <20240903160751.4100218-40-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903160751.4100218-1-peter.maydell@linaro.org> References: <20240903160751.4100218-1-peter.maydell@linaro.org> 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=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1725379809256116600 Content-Type: text/plain; charset="utf-8" Remove the OMAP2 specific code from omap_uart.c. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/arm/omap.h | 5 -- hw/char/omap_uart.c | 113 ------------------------------------------ 2 files changed, 118 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index b569580b09e..67bb83dff5d 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -709,11 +709,6 @@ struct omap_uart_s *omap_uart_init(hwaddr base, qemu_irq irq, omap_clk fclk, omap_clk iclk, qemu_irq txdma, qemu_irq rxdma, const char *label, Chardev *chr); -struct omap_uart_s *omap2_uart_init(MemoryRegion *sysmem, - struct omap_target_agent_s *ta, - qemu_irq irq, omap_clk fclk, omap_clk iclk, - qemu_irq txdma, qemu_irq rxdma, - const char *label, Chardev *chr); void omap_uart_reset(struct omap_uart_s *s); =20 struct omap_mpuio_s; diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index c2ef4c137e1..d789c253b49 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -28,7 +28,6 @@ struct omap_uart_s { MemoryRegion iomem; hwaddr base; SerialMM *serial; /* TODO */ - struct omap_target_agent_s *ta; omap_clk fclk; qemu_irq irq; =20 @@ -36,8 +35,6 @@ struct omap_uart_s { uint8_t syscontrol; uint8_t wkup; uint8_t cfps; - uint8_t mdr[2]; - uint8_t scr; uint8_t clksel; }; =20 @@ -66,113 +63,3 @@ struct omap_uart_s *omap_uart_init(hwaddr base, DEVICE_NATIVE_ENDIAN); return s; } - -static uint64_t omap_uart_read(void *opaque, hwaddr addr, unsigned size) -{ - struct omap_uart_s *s =3D opaque; - - if (size =3D=3D 4) { - return omap_badwidth_read8(opaque, addr); - } - - switch (addr) { - case 0x20: /* MDR1 */ - return s->mdr[0]; - case 0x24: /* MDR2 */ - return s->mdr[1]; - case 0x40: /* SCR */ - return s->scr; - case 0x44: /* SSR */ - return 0x0; - case 0x48: /* EBLR (OMAP2) */ - return s->eblr; - case 0x4C: /* OSC_12M_SEL (OMAP1) */ - return s->clksel; - case 0x50: /* MVR */ - return 0x30; - case 0x54: /* SYSC (OMAP2) */ - return s->syscontrol; - case 0x58: /* SYSS (OMAP2) */ - return 1; - case 0x5c: /* WER (OMAP2) */ - return s->wkup; - case 0x60: /* CFPS (OMAP2) */ - return s->cfps; - } - - OMAP_BAD_REG(addr); - return 0; -} - -static void omap_uart_write(void *opaque, hwaddr addr, - uint64_t value, unsigned size) -{ - struct omap_uart_s *s =3D opaque; - - if (size =3D=3D 4) { - omap_badwidth_write8(opaque, addr, value); - return; - } - - switch (addr) { - case 0x20: /* MDR1 */ - s->mdr[0] =3D value & 0x7f; - break; - case 0x24: /* MDR2 */ - s->mdr[1] =3D value & 0xff; - break; - case 0x40: /* SCR */ - s->scr =3D value & 0xff; - break; - case 0x48: /* EBLR (OMAP2) */ - s->eblr =3D value & 0xff; - break; - case 0x4C: /* OSC_12M_SEL (OMAP1) */ - s->clksel =3D value & 1; - break; - case 0x44: /* SSR */ - case 0x50: /* MVR */ - case 0x58: /* SYSS (OMAP2) */ - OMAP_RO_REG(addr); - break; - case 0x54: /* SYSC (OMAP2) */ - s->syscontrol =3D value & 0x1d; - if (value & 2) { - omap_uart_reset(s); - } - break; - case 0x5c: /* WER (OMAP2) */ - s->wkup =3D value & 0x7f; - break; - case 0x60: /* CFPS (OMAP2) */ - s->cfps =3D value & 0xff; - break; - default: - OMAP_BAD_REG(addr); - } -} - -static const MemoryRegionOps omap_uart_ops =3D { - .read =3D omap_uart_read, - .write =3D omap_uart_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, -}; - -struct omap_uart_s *omap2_uart_init(MemoryRegion *sysmem, - struct omap_target_agent_s *ta, - qemu_irq irq, omap_clk fclk, omap_clk iclk, - qemu_irq txdma, qemu_irq rxdma, - const char *label, Chardev *chr) -{ - hwaddr base =3D omap_l4_attach(ta, 0, NULL); - struct omap_uart_s *s =3D omap_uart_init(base, irq, - fclk, iclk, txdma, rxdma, label, chr); - - memory_region_init_io(&s->iomem, NULL, &omap_uart_ops, s, "omap.uart",= 0x100); - - s->ta =3D ta; - - memory_region_add_subregion(sysmem, base + 0x20, &s->iomem); - - return s; -} --=20 2.34.1