From patchwork Tue Oct 15 10:37:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 835419 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c8f:0:b0:37d:45d0:187 with SMTP id z15csp161610wrs; Tue, 15 Oct 2024 03:40:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcuU17j1ybVjxTftqmxK4AO94xnZclxMn8Q8PoCMDk4rLHHlRoetoq7tVYJsbLUngQ/eK7xA==@linaro.org X-Google-Smtp-Source: AGHT+IEi1phvMpgJl11938Bo+4MYSbWE0hEzTStJ4PzYGHXfSq+5y2bmqSfjm4T0YNGRmYRfLa2W X-Received: by 2002:a05:622a:5a90:b0:458:2bda:e543 with SMTP id d75a77b69052e-460583fc69bmr201183111cf.18.1728988850856; Tue, 15 Oct 2024 03:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728988850; cv=none; d=google.com; s=arc-20240605; b=Lei/9MBdPGzQItNZIeJy1GNBwwCenrzeDiL+yRXnlzEQYVYiQSJ2u5/DrMVwYq2LwE aqH8BYtpdizP0QOlf2sl+d9uwTolb6lUwiGZT0RLje8YVpmI9MhwRNkqNSxvcRBNEqWa wC184TyjnWUioLbbjWWqeK+Rxwz97o73vtv6tClKurgl8q3Mc5MN6XIH/p97hyl/up6E vqICrXpLFwB0a0CuB3DKdQfBktQRoeqAKz+tHM3kgW2cwyNJmkiiPy1vw/jDLaAP+2Be 1y0JEvKzHaaxKDSbVsEUoWSzCh9aWUVfTAxAXTfhWtMegAQfx1yBYLnxvkYEfHL2Y5WZ LDDA== 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:to:from :dkim-signature; bh=mjarHtZFM/0LLvrqr3eopb6Cr3L/9s4YSKz09v4sDCo=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=E7JeU5xXrVaiWZUbHnpw1l3tPhBWaaa536efB/zWE+xar8KFmMGas4Ee1mBAH+JqEw p18hkKXTWlUGt9vMnv3f6HaBhbXwDIu0LC8lNOz9po1WWynKJ1V9s87QHipgEON5NQub e4r4YGgoHATGdEfyu9FMVv6C10qhmO4IelyarG1Co+QYHCd6DDmySYrgO0qfiJTNjIFA Mv5LdW579CUj3CBuXvUoRxmL+oUx80xmXsHHCgOl7UHAlV06li60PNyC/FdbEkfoAQv5 N7K5kLY6EuseNi9LE+AZ7h4ORB5kz2hxRO/rt1Yw7GGDQ6R1cfUKl0AM9wX2u/WrZ0v+ 9Tlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BIKXYdNc; 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-4607b4c8e68si11180601cf.630.2024.10.15.03.40.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2024 03:40:50 -0700 (PDT) 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=BIKXYdNc; 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 1t0ewT-0006cT-47; Tue, 15 Oct 2024 06:38:17 -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 1t0ewQ-0006bp-EG for qemu-devel@nongnu.org; Tue, 15 Oct 2024 06:38:14 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t0ewO-0005vO-Kr for qemu-devel@nongnu.org; Tue, 15 Oct 2024 06:38:14 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-37d518f9abcso2868189f8f.2 for ; Tue, 15 Oct 2024 03:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728988690; x=1729593490; 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=mjarHtZFM/0LLvrqr3eopb6Cr3L/9s4YSKz09v4sDCo=; b=BIKXYdNcX1ndlG0L7L40aKnfvY8yC0kt/cRJepWyf7Ra5LYLEHiIV8FSwFvJeJE80A vlI8JKj5rCHpQMsiZPZ6jrEVTlqk1sP0ojx0cSF96/SrUHY+ii0/a1FB/OXTpci18EiH oJWNMG98mt+Hg1O+Y0ri7Lc8arkDmpsb8VsWHoyGmuGDMAyNE7qRIFitLZ4MORDpjMtW 9ocDbtqwD+u2rA4txmpicyPF6QedNS6dFkf5c5UNiLjnDKXIv1UUlcfof1DSG/Xq3WrS zLC2/hwkj4Q93bP3+zQVVu6dhiJfGdx8IoDYXCaenXr0/z8TWEFnScbavRB5sNzHlTLI xEHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728988690; x=1729593490; 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=mjarHtZFM/0LLvrqr3eopb6Cr3L/9s4YSKz09v4sDCo=; b=IY/tjihKGahbniEvDTBz9M7XuYw5nHiPUE6JTvMOe+cr2v0AGYK2u0otFEa7K8wHrv iYD1jhov8vxJ9Er/aUO0FFXWmYrMXG94/QWgGmOxuAyYNQ/rApGJm09hq6faTDMPJvGP HUcvaxOlPV5wJoSQ4JyJZzLW6BJ/hd03zose5+s7drXGdKt/fnxFzGk66esjq/Ie82bZ vI1KAWR/jVeJzjEBW1KzqMiU/rl+bhkKcPCMFGqCFDWMU+nLam8N4zwpoq39awzKfAnf ztGiVtM/HRYwIm911vq+dd5rENGnLBKPuUZAg6gP+HzZIuDVoQLIOpL0Va/9ICWU98Ev VDaQ== X-Gm-Message-State: AOJu0YzALn/B4ajBY+JloSCKHHF8YrWZMexMkr2zDrK8Al5AAUdc9BKF In7og6ZAXUZKgmcd5m/fxENn03drR8IgvEXHEpYscBGrA+rF3ZRiEWkUrc74x5HRwZFvOISMKeh o X-Received: by 2002:a5d:464e:0:b0:37d:4318:d8e1 with SMTP id ffacd0b85a97d-37d551ca148mr9223670f8f.23.1728988690181; Tue, 15 Oct 2024 03:38:10 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa7a06dsm1241635f8f.5.2024.10.15.03.38.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 03:38:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/28] hw/arm/omap1: Remove unused omap_uwire_attach() method Date: Tue, 15 Oct 2024 11:37:41 +0100 Message-Id: <20241015103808.133024-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103808.133024-1-peter.maydell@linaro.org> References: <20241015103808.133024-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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 From: Philippe Mathieu-Daudé 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é Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- 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 cf5f0219a2f..e1b6a7cdd93 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); -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); struct I2SCodec { void *opaque; diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 86ee336e599..25030c7e404 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]; }; static void omap_uwire_transfer_start(struct omap_uwire_s *s) { int chipselect = (s->control >> 10) & 3; /* INDEX */ - uWireSlave *slave = s->chip[chipselect]; 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) & 0x1f))); + 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 &= ~(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? */ } if ((s->control >> 0) & 0x1f) { /* NB_BITS_RD */ - if (s->control & (1 << 12)) /* CS_CMD */ - if (slave && slave->receive) - s->rxbuf = slave->receive(slave->opaque); + if (s->control & (1 << 12)) { /* CS_CMD */ + qemu_log_mask(LOG_UNIMP, "uWireSlave RX CS:%d\n", chipselect); + } s->control |= 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(MemoryRegion *system_memory, return s; } -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] = slave; -} - /* Pseudonoise Pulse-Width Light Modulator */ struct omap_pwl_s { MemoryRegion iomem;