From nobody Sun Nov 24 08:29:20 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=1725400448; cv=none; d=zohomail.com; s=zohoarc; b=aDGJ+p0MJIZ1X8xdWYjrIB/2Px9b4cQVp6Yfob7bL6qOLCLJeeHUtQop0VtUYhPBOe/fgfUYPFibL2fLb9pauZZmim3nf+kALa4yqOEunAcB8dy617PZ/N/mv/QWAPRjLihmllFyDlvQQNQktdGGE+WIXMq8VOTNg67cn1aZMM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725400448; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PFoSPik66t3P04q3BhIghhGuPh2Gj4nrJCiedrufNLE=; b=GlGp9Zba7Som85Jn7aodxfdCVp4eh32eH4/g+twBrreznZkmhZNjK5kZYcWWOe7JC0fIskTrIO/UdZvko/R1z94zMVYS8XqGMVm3EdKHJ2dkL1uSHd+qTaWsoIjc4wGsjr52BKuaKGTJqXgGd8DoX12HQMXCmoSVXQsdgOYUKNY= 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 1725400448155985.3416840384643; Tue, 3 Sep 2024 14:54:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slbSj-0005CR-Ky; Tue, 03 Sep 2024 17:53:21 -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 1slbSd-00058Q-VM for qemu-devel@nongnu.org; Tue, 03 Sep 2024 17:53:16 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slbSc-0003lc-9o for qemu-devel@nongnu.org; Tue, 03 Sep 2024 17:53:15 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-374c84dcc90so83122f8f.1 for ; Tue, 03 Sep 2024 14:53:12 -0700 (PDT) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374c96a88ebsm7271259f8f.108.2024.09.03.14.53.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Sep 2024 14:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725400391; x=1726005191; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PFoSPik66t3P04q3BhIghhGuPh2Gj4nrJCiedrufNLE=; b=a9ZihmVfLRTF6XwtnbPKDMbGnbfa3eNYqyWlSD6C7C+67+G16Tv3vTGA/WulliDic3 rFsPBJmClQt1Y0U1nzSbzbS5g6Lk6j2Md02c7XKsQvBCM4VfSHyPJ9L01VqyQj5au+z7 mA5VeqtLx67ZK+BJHe5kuYcO+MxOWeggiFP/5s6TWZV0wcBTyw7NBStMvnrU0rsE4yc8 yDq+ffXzef/1t3P+mGuCDYWxSQ6ByTQ5eLoqOKIgKFWCRWE3FCvHTGojQdBKwCihz8/z lTprS8GXqu7ZpeJYxhRg6O+REFM4C1UVVVtECF2xrZSIttIyEoUp08sJDgfpmIHnfvd2 fDww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725400391; x=1726005191; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PFoSPik66t3P04q3BhIghhGuPh2Gj4nrJCiedrufNLE=; b=M87SAbpN5zESz5gY4JL1QvHLdr+Ci8dvbig6dYGaDNIwB4fCmU7aL/hx1X+8ORY7fe WC08abBr4qsptw2h0Gkzs+QO7VJU0/lvrTq7qSAws2NfExk19ECmrUQDiZ1xRZY2swxS fceB4797LHPpZHqA1lms9/QpI1qxgpE5NdgGINm95e3cDuPJVE5xIzCYnc24AGE88enw utcwbuG5H50HhzrxqqotTDQ8wlFgQpNR67yyN5tm+r+Y8LTfIaY5AZh7jygB/sNgOuYI qjRoxKXiDzWf0VB6A7LSOk/bh/jK1qRsu5mSEmmwZX6R6Zl+WrNeVHZGnaKc2034+kU3 IKiw== X-Gm-Message-State: AOJu0YynLwcVNXSyMYFSwpO0BLtS7qnZx2a2fk+t6vzJnSsmjY50DJWQ cJ26SzSC8+kcPFqX5Vb67G9qCjamSRcDC/9bY2uyCxJ9z2xPwiibmlcWNlUFZ2KrSyuiD2zIi7q e X-Google-Smtp-Source: AGHT+IGgLk360ptFkYrai5rHB1UA09lQEuDo7mZq1zmGYfHQt57QScH073ZRLeWDZTzQcbvkmCGufQ== X-Received: by 2002:adf:fb42:0:b0:374:c318:2188 with SMTP id ffacd0b85a97d-37770c702b7mr184223f8f.42.1725400390981; Tue, 03 Sep 2024 14:53:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/arm/omap1: Remove unused omap_uwire_attach() method Date: Tue, 3 Sep 2024 23:53:09 +0200 Message-ID: <20240903215309.32111-1-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 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::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=unavailable 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: 1725400448982116600 The recently removed 'cheetah' machine was the single user of the omap_uwire_attach() method. Remove it altogether with the uWireSlave structure. Replace the send/receive callbacks by Unimplemented logging. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Based-on: <20240903160751.4100218-1-peter.maydell@linaro.org> --- include/hw/arm/omap.h | 8 -------- hw/arm/omap1.c | 29 ++++++++--------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index cf5f0219a2..e1b6a7cdd9 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -490,15 +490,7 @@ qemu_irq *omap_mpuio_in_get(struct omap_mpuio_s *s); void omap_mpuio_out_set(struct omap_mpuio_s *s, int line, qemu_irq handler= ); void omap_mpuio_key(struct omap_mpuio_s *s, int row, int col, int down); =20 -typedef struct uWireSlave { - uint16_t (*receive)(void *opaque); - void (*send)(void *opaque, uint16_t data); - void *opaque; -} uWireSlave; - struct omap_uwire_s; -void omap_uwire_attach(struct omap_uwire_s *s, - uWireSlave *slave, int chipselect); =20 struct I2SCodec { void *opaque; diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 86ee336e59..25030c7e40 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -2170,29 +2170,27 @@ struct omap_uwire_s { uint16_t rxbuf; uint16_t control; uint16_t setup[5]; - - uWireSlave *chip[4]; }; =20 static void omap_uwire_transfer_start(struct omap_uwire_s *s) { int chipselect =3D (s->control >> 10) & 3; /* INDEX */ - uWireSlave *slave =3D s->chip[chipselect]; =20 if ((s->control >> 5) & 0x1f) { /* NB_BITS_WR */ - if (s->control & (1 << 12)) /* CS_CMD */ - if (slave && slave->send) - slave->send(slave->opaque, - s->txbuf >> (16 - ((s->control >> 5) & 0x1= f))); + if (s->control & (1 << 12)) { /* CS_CMD */ + qemu_log_mask(LOG_UNIMP, "uWireSlave TX CS:%d data:0x%04x\n", + chipselect, + s->txbuf >> (16 - ((s->control >> 5) & 0x1f))); + } s->control &=3D ~(1 << 14); /* CSRB */ /* TODO: depending on s->setup[4] bits [1:0] assert an IRQ or * a DRQ. When is the level IRQ supposed to be reset? */ } =20 if ((s->control >> 0) & 0x1f) { /* NB_BITS_RD */ - if (s->control & (1 << 12)) /* CS_CMD */ - if (slave && slave->receive) - s->rxbuf =3D slave->receive(slave->opaque); + if (s->control & (1 << 12)) { /* CS_CMD */ + qemu_log_mask(LOG_UNIMP, "uWireSlave RX CS:%d\n", chipselect); + } s->control |=3D 1 << 15; /* RDRB */ /* TODO: depending on s->setup[4] bits [1:0] assert an IRQ or * a DRQ. When is the level IRQ supposed to be reset? */ @@ -2321,17 +2319,6 @@ static struct omap_uwire_s *omap_uwire_init(MemoryRe= gion *system_memory, return s; } =20 -void omap_uwire_attach(struct omap_uwire_s *s, - uWireSlave *slave, int chipselect) -{ - if (chipselect < 0 || chipselect > 3) { - error_report("%s: Bad chipselect %i", __func__, chipselect); - exit(-1); - } - - s->chip[chipselect] =3D slave; -} - /* Pseudonoise Pulse-Width Light Modulator */ struct omap_pwl_s { MemoryRegion iomem; --=20 2.45.2