From nobody Tue Oct 28 12:15:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514977412858175.49272842083292; Wed, 3 Jan 2018 03:03:32 -0800 (PST) Received: from localhost ([::1]:48633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWgpQ-0003vH-QZ for importer@patchew.org; Wed, 03 Jan 2018 06:03:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWgnh-0002s6-Mu for qemu-devel@nongnu.org; Wed, 03 Jan 2018 06:01:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWgng-0005ga-RT for qemu-devel@nongnu.org; Wed, 03 Jan 2018 06:01:37 -0500 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:33771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWgng-0005gA-NS for qemu-devel@nongnu.org; Wed, 03 Jan 2018 06:01:36 -0500 Received: by mail-qk0-x243.google.com with SMTP id x7so1054717qkb.0 for ; Wed, 03 Jan 2018 03:01:36 -0800 (PST) Received: from x1.lan ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id r55sm417735qta.57.2018.01.03.03.01.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 03:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H55m8SAxQCZteXEHo639T3ncP9waoJie0p/fu8nR8T8=; b=Vz8JZ4jvgSEMnhrMkVSvobh/p4Ydiv83YSfYHDixCQr50cSCg+M5uxjeAiMIvOz10b AKu60heTgkhPxKxGv8xev/89ZUh1TeSDfipfmcVaGFtw/fLRm257ULCBJSrN8j5BLdq3 8HtsHQcesmBeM+3Dh3XEfXWOgK2vuAFHR4LUYsTB+2hLnL0SjUvC26Y4bHNXzX7aP4MK 9lUf3a/QEQLkLBYVL6STB53Ig4K7Z9jzEL42bFiREeJd4jl118zeKvPYhw4a1spTwb+t uqco3cvEZAo/bz3kqe7gIez2I4Untmrr/4WforOfApX6LSXBjvcrsZXe37s/89A8U3gH v4/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=H55m8SAxQCZteXEHo639T3ncP9waoJie0p/fu8nR8T8=; b=Zv3sZ0O+mvoQcJJVH9VUhRo0tRFucfbtslX4m7lp9oTMOykx/W+Gb+dVSWqRzGC8vx KJramE7ueBvpJICrpgZMAwurSECEWpFNwyFUPeviz3dJ2QgJoVpUsCTv5JrKGsBOnWII zezIV/+q5S13oz3WfI12d2nAITDkm6Q0RJ/+8etjn/bIcWzmiTM2LGdJkwLnpBX9aeta 8q7iCGc7rQi6to/mF48HpKzMGNUYOm0e1fJ4xk8tSEuTbLcuCJgWITjO7KDpkFi3Wu/8 DugIvm3oek6vSLht3WwACElyebv/hl2cK+3KU/AJEHXlxNnjcLOFMYcW7IHfK5YTO/iu XIMw== X-Gm-Message-State: AKGB3mLT4CFr1UEekH/LO1VBhyfQp0h1uszBBKPmexq0HCups9gs2xeP ecI62Nq53p11ui6Gzf7v+kPBaV8U X-Google-Smtp-Source: ACJfBouRKL5pFOovAsdUJyfLPR5OJCkuFxwwbgFN8K3Nd20rUbQD5p89whzJ9ADEerZ1ZBGsQxOnSw== X-Received: by 10.55.107.197 with SMTP id g188mr1034699qkc.254.1514977296115; Wed, 03 Jan 2018 03:01:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis Date: Wed, 3 Jan 2018 08:01:10 -0300 Message-Id: <20180103110126.29209-2-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180103110126.29209-1-f4bug@amsat.org> References: <20180103110126.29209-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH v4 01/17] sdhci: clean up includes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" , Peter Maydell , Fam Zheng , Eduardo Habkost , Andrey Smirnov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/sd/sdhci-internal.h | 4 ---- include/hw/sd/sdhci.h | 7 ++++++- hw/sd/sdhci.c | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index 161177cf39..248fd027f9 100644 --- a/hw/sd/sdhci-internal.h +++ b/hw/sd/sdhci-internal.h @@ -24,8 +24,6 @@ #ifndef SDHCI_INTERNAL_H #define SDHCI_INTERNAL_H =20 -#include "hw/sd/sdhci.h" - /* R/W SDMA System Address register 0x0 */ #define SDHC_SYSAD 0x00 =20 @@ -227,6 +225,4 @@ enum { sdhc_gap_write =3D 2 /* SDHC stopped at block gap during write oper= ation */ }; =20 -extern const VMStateDescription sdhci_vmstate; - #endif diff --git a/include/hw/sd/sdhci.h b/include/hw/sd/sdhci.h index 0f0c3f1e64..1335373d3c 100644 --- a/include/hw/sd/sdhci.h +++ b/include/hw/sd/sdhci.h @@ -26,17 +26,19 @@ #define SDHCI_H =20 #include "qemu-common.h" -#include "hw/block/block.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" #include "hw/sd/sd.h" =20 /* SD/MMC host controller state */ typedef struct SDHCIState { + /*< private >*/ union { PCIDevice pcidev; SysBusDevice busdev; }; + + /*< public >*/ SDBus sdbus; MemoryRegion iomem; =20 @@ -46,6 +48,7 @@ typedef struct SDHCIState { qemu_irq ro_cb; qemu_irq irq; =20 + /* Registers cleared on reset */ uint32_t sdmasysad; /* SDMA System Address register */ uint16_t blksize; /* Host DMA Buff Boundary and Transfer BlkSize = Reg */ uint16_t blkcnt; /* Blocks count for current transfer */ @@ -70,8 +73,10 @@ typedef struct SDHCIState { uint16_t acmd12errsts; /* Auto CMD12 error status register */ uint64_t admasysaddr; /* ADMA System Address Register */ =20 + /* Read-only registers */ uint32_t capareg; /* Capabilities Register */ uint32_t maxcurr; /* Maximum Current Capabilities Register */ + uint8_t *fifo_buffer; /* SD host i/o FIFO buffer */ uint32_t buf_maxsz; uint16_t data_count; /* current element in FIFO buffer */ diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index b064a087c9..b7d2a20985 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -29,6 +29,7 @@ #include "sysemu/dma.h" #include "qemu/timer.h" #include "qemu/bitops.h" +#include "hw/sd/sdhci.h" #include "sdhci-internal.h" #include "qemu/log.h" =20 --=20 2.15.1