From patchwork Tue Jan 28 10:45:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 860380 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp286419wrx; Tue, 28 Jan 2025 02:47:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVias1Q5oFsx6Nl5XWyEUQ4btc1S0OfQma+YERgnNVGNgW6PunoOAGgjQe5uaNi6wbHHZNBCA==@linaro.org X-Google-Smtp-Source: AGHT+IHx/pB27/eNidcWNjrH7ygTl9gg3KoEArhlphVxN22c+fmeZi9S7MxNwBNblpmEvW1m0i4r X-Received: by 2002:a05:620a:424d:b0:7b6:5d83:123e with SMTP id af79cd13be357-7be63252b5bmr9364669885a.54.1738061219929; Tue, 28 Jan 2025 02:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738061219; cv=none; d=google.com; s=arc-20240605; b=hEYw8/acvtCVWngpau/AdBT6aQWQt3s1XpkNSysirZj7p9l9iLI7jRjj652k3vYZQB k3CW5jUV8FhAfL5q+2pLfrlK8mFCvLYU6Q/OcJVhHHd7F7s7sjY/g8hzaztiT+/KTeXr 3SalHUeZJlacdVh2YeWuWNc+7sVRbET9cdhRfD5kzSWqY1h7Mqu/y1Td/tIKircDwCsp jJw8Zs7JQn08WPW/lxgOP7/raP3M4g+id/3vGtXody9UWBXbkPIJlSbiC7878yuys9uf +05QUe9DLV7Gf6cfl8mTD5mn0v1qpFx6P/WqDicyQ1mHBQSfR1VPoWrfXSUyAzi3DnpM Jrqw== 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=XrDcp9C2vowFkhJ2ur3N47jalbiWCpVSVZgOh5cHSxg=; fh=M++EodUV7TJ2XezKqhjCsw2tgccgzoINeGn61TfgDZg=; b=M/nRe9p4tPGAHPbRwW5qOLuMo/1z/8PQhQnfLkOmgNINxdkRAsG7qm2YU4H1rzBc9R 8omYHVjEcDDWxUKnndUIuc06eQcA9DsbfuDgp5mObfnYvGpwcneideOJQkkL1xGwHMRp 6RRLumf4TIFZl8XvaDUDYX7BHWPDev/LjF/z6+25vE4xf/Lzuxq6+94HH1Gc1zJ/4hQ+ uh6YddWJwKsi14p+8qZNFuhtTmOVMUxDhiOIPiisiTerbonqN74HgA+GdzhPelf38rQ9 VpWh/OBYjOMf3+vs/d2AkTRLAim56U/LV8Pjh5Qkr+twa2JwbtNG9Z/UPNnpa1bspudY gi9g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QVxxfbk5; 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-46e6688ac3fsi133818941cf.181.2025.01.28.02.46.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 02:46:59 -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=QVxxfbk5; 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 1tcj6R-0001E7-GY; Tue, 28 Jan 2025 05:45:55 -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 1tcj60-00017d-4s for qemu-devel@nongnu.org; Tue, 28 Jan 2025 05:45:28 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcj5y-0003Vu-Ep for qemu-devel@nongnu.org; Tue, 28 Jan 2025 05:45:27 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-437a92d7b96so55932205e9.2 for ; Tue, 28 Jan 2025 02:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738061124; x=1738665924; 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=XrDcp9C2vowFkhJ2ur3N47jalbiWCpVSVZgOh5cHSxg=; b=QVxxfbk5UOllJQq7NMzjpdzh+Wdu/jcnCk4RG9CYqX/i9QH0RZH0qj4neajXn82Ese VMeRXePuTYL2Ko/1V9vW7+j7hV3vzpufUSaN3RDh7PMDGT/lgXtDRh3PfC/Zaji6B0s+ ggE0eObxg5r+KCES6M+dvE5b32djQazUNl04q0xkuhZqeTd4Qugb0i+d6MRAEH+a54aS iAtZS/BhT4nuzq5CFeNxCC+q1pDWP1dREsJsedKEM0lwh1obxGWuXr4mJESxZarUbu6I zGNimoxCeaXnv3kZaer1WbQrSses6duaKQCxxlGzoxhOXkVj8dDFHeT7RhUffugLUYk9 WPyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738061124; x=1738665924; 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=XrDcp9C2vowFkhJ2ur3N47jalbiWCpVSVZgOh5cHSxg=; b=sfsMuuJQelMzvJq7CJhKUI994tAg88g184MJRnm2IK86V7F5tA03IvLKPGdKGmILk3 /fciAGYaojTrV6xkXi+rjk0sVpGBbXoNRjxVdiSpuvaOf3hu/Q0pRZxkz1AuKgdr+vO7 Kx7ne85v4THpA3GTw9OHbske4ZeY8s+LCV4GAW9Oia4NLYJmQsEHSLgB+3rTKZ+TH2/t 077duDigyJHOM5V1ifY/vZSvWvrIcF9VS9pBRQuT/iid3hXvvQLEX3DhVks/2nRfM68e lbFVjoVbKkoqFzF+R+Yx/6rmgSrQ696um7EFHA1Qpwqb1hUC4ELd7x56U+27s1vX/JDw JPfw== X-Forwarded-Encrypted: i=1; AJvYcCW1YvldBeFVPlxfcgRuRNdvttiFnzZZ2uVOvJf6JMdOIeuQ4etnh7gIINtNnCt57ha/mOabc2t6/qly@nongnu.org X-Gm-Message-State: AOJu0YxE2gzjVTbgFAJateYsreQYff9ytCLzgprBmWtBifjNwOc0J5tm vJk6VTZc9McQm7Y4FWldwOL/VpMnB5z85oS+qfLngpfQRepFHK2FvBUP5nIj1P4= X-Gm-Gg: ASbGnctm8f+0pLUiAcHDyn10XOFpWZAreVW5k9EMxayUGMEBbJiT/vIsrLmkqXBhyUg 2NmAhMx9l6MMEw04Dx0UCTGHy5WjKOF7xGI+4RIBEgIr6fNVSYbMKDrWCrukhQgRREYTR/DBzlo KsDdE4JgANVD5nq3HB8C6gDHXF4CVSmjuztGdXgwqgOcBl7c4sNSgXvroSnMkDoSlNKE3jkXyvO iZ/JZy2Po852wUwo8VeaK70Xgv7a5kkhV90baQPnOmUbwfri7ot56Nw2NgBEhJF+ova2kjAH7N8 u2ZA8GjaDw+TmmDXqvtM X-Received: by 2002:a05:600c:3114:b0:434:a386:6cf with SMTP id 5b1f17b1804b1-438913bff57mr404650415e9.2.1738061123943; Tue, 28 Jan 2025 02:45:23 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1c418esm13920133f8f.95.2025.01.28.02.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 02:45:23 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , Bernhard Beschow Subject: [PATCH 02/11] hw/sd/omap_mmc: Convert remaining 'struct omap_mmc_s' uses to OMAPMMCState Date: Tue, 28 Jan 2025 10:45:10 +0000 Message-Id: <20250128104519.3981448-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250128104519.3981448-1-peter.maydell@linaro.org> References: <20250128104519.3981448-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Mechanically convert the remaining uses of 'struct omap_mmc_s' to 'OMAPMMCState'. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/hw/arm/omap.h | 2 +- hw/sd/omap_mmc.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 6339c5a581e..7d1a1afc4f8 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -530,7 +530,7 @@ struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem, /* omap_mmc.c */ #define TYPE_OMAP_MMC "omap-mmc" -OBJECT_DECLARE_SIMPLE_TYPE(omap_mmc_s, OMAP_MMC) +OBJECT_DECLARE_SIMPLE_TYPE(OMAPMMCState, OMAP_MMC) DeviceState *omap_mmc_init(hwaddr base, MemoryRegion *sysmem, diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c index 9cba437f74e..dd45abc075e 100644 --- a/hw/sd/omap_mmc.c +++ b/hw/sd/omap_mmc.c @@ -27,7 +27,7 @@ #include "hw/arm/omap.h" #include "hw/sd/sdcard_legacy.h" -typedef struct omap_mmc_s { +typedef struct OMAPMMCState { SysBusDevice parent_obj; qemu_irq irq; @@ -72,12 +72,12 @@ typedef struct omap_mmc_s { qemu_irq cdet; } OMAPMMCState; -static void omap_mmc_interrupts_update(struct omap_mmc_s *s) +static void omap_mmc_interrupts_update(OMAPMMCState *s) { qemu_set_irq(s->irq, !!(s->status & s->mask)); } -static void omap_mmc_fifolevel_update(struct omap_mmc_s *host) +static void omap_mmc_fifolevel_update(OMAPMMCState *host) { if (!host->transfer && !host->fifo_len) { host->status &= 0xf3ff; @@ -125,7 +125,7 @@ typedef enum { SD_TYPE_ADTC = 3, /* addressed with data transfer */ } MMCCmdType; -static void omap_mmc_command(struct omap_mmc_s *host, int cmd, int dir, +static void omap_mmc_command(OMAPMMCState *host, int cmd, int dir, MMCCmdType type, int busy, sd_rsp_type_t resptype, int init) { @@ -234,7 +234,7 @@ static void omap_mmc_command(struct omap_mmc_s *host, int cmd, int dir, host->status |= 0x0001; } -static void omap_mmc_transfer(struct omap_mmc_s *host) +static void omap_mmc_transfer(OMAPMMCState *host) { uint8_t value; @@ -289,19 +289,19 @@ static void omap_mmc_transfer(struct omap_mmc_s *host) static void omap_mmc_update(void *opaque) { - struct omap_mmc_s *s = opaque; + OMAPMMCState *s = opaque; omap_mmc_transfer(s); omap_mmc_fifolevel_update(s); omap_mmc_interrupts_update(s); } -static void omap_mmc_pseudo_reset(struct omap_mmc_s *host) +static void omap_mmc_pseudo_reset(OMAPMMCState *host) { host->status = 0; host->fifo_len = 0; } -static void omap_mmc_reset(struct omap_mmc_s *host) +static void omap_mmc_reset(OMAPMMCState *host) { host->last_cmd = 0; memset(host->rsp, 0, sizeof(host->rsp)); @@ -340,7 +340,7 @@ static void omap_mmc_reset(struct omap_mmc_s *host) static uint64_t omap_mmc_read(void *opaque, hwaddr offset, unsigned size) { uint16_t i; - struct omap_mmc_s *s = opaque; + OMAPMMCState *s = opaque; if (size != 2) { return omap_badwidth_read16(opaque, offset); @@ -433,7 +433,7 @@ static void omap_mmc_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { int i; - struct omap_mmc_s *s = opaque; + OMAPMMCState *s = opaque; if (size != 2) { omap_badwidth_write16(opaque, offset, value);