From patchwork Tue Jun 25 05:53:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 807241 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp2195623wrt; Mon, 24 Jun 2024 22:55:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW3V8hu+WvKsPfec+otycG59uvoRtLfusVs8d6ED4UymL9aWm40lP6M43cHtHrOU/EQ6WYWAVaxl8CMJgLXWXnN X-Google-Smtp-Source: AGHT+IEAenUUqwQIn2xNlvjcVw5nnNbDqeWnV4Auy7HKoaLx1DO6JGTqEj99AZ2+zrCWiA6Y+f4g X-Received: by 2002:a05:620a:2911:b0:795:51cb:6ac4 with SMTP id af79cd13be357-79be0c35b0amr870628385a.20.1719294915173; Mon, 24 Jun 2024 22:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719294915; cv=none; d=google.com; s=arc-20160816; b=lclF32ErU+jTczmiDxZzXAUOIsdoZAUqJzY6vp/dexAYVvnLXQHUOQD/ZJ+Zq2iXwq rWRz063Uy1WDtygcpzWXhQG0AG4RWcputjTjV1B6E4+kTR/lE+trpGGR5OnZahnTF+5Y hpluzSoXV/zQxSqeM4XVC1GJVSJCiRuMjumehyI5Rf1Y3wjB7SzPQURZznvWJ1ci7Tgp MwPn9llFV3nWsVA6Otdwo+kyfMA4HAy9w1gpnxVJdR3WC2PeReK/3M+KtTXf14cx7kVA JQG4PLlrgjqMuPzcHyWbkvX6tpjfMI2Z8NSd/ul/PIwdJkz/fpUNFtoHbAnaTWvYZ/CX MLKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=804adpboUNUGoA4+SC+knsCmSvv2ypFpRddNkdj212U=; fh=quH1+0vgULqv3LP6tEyzMNyrHO9n10VlAKocz0j0xjQ=; b=uYSuCuK8nTpBrVPGFDHdv7LgnDaOjjhqW1880FByDjQnMIDwT9goxIs/WVlbo5Q1v2 8PbenTY1An4MyEGw7Bp6KFSJAt/R2WVzwQaebrrjPh2N6tuRxt1zt2wlMxZb+c2EPWw/ 0QS97Ugafhmx6C40DuMfLbRt1ofesaFc1zPjl3ObVYmSiaORaQAmuJhH5Qc8yno0QGPz ddKXA/6h/ShfNcKp4Vu0Psq2nWKqzx34AvoBjUdv67PYYPCgzk6Cv4KQa4N2TQWX9T5+ JjVuRK/NHzW5VZ+7TqMogc1Hm7UXOnp5+UEbAlcvS6amHMgLsH9LwdhFoMZ7mRSBv2Yi Yi+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khhbhqOS; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-79bce95e2e0si831132285a.721.2024.06.24.22.55.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2024 22:55:15 -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=khhbhqOS; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLz7y-0001Xf-1O; Tue, 25 Jun 2024 01:54:02 -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 1sLz7w-0001UD-Ht for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:54:00 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLz7u-0001Ve-SC for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:54:00 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-42198492353so42944635e9.1 for ; Mon, 24 Jun 2024 22:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719294837; x=1719899637; 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=804adpboUNUGoA4+SC+knsCmSvv2ypFpRddNkdj212U=; b=khhbhqOSNw1NXkN54+mnpJ1aEidlRFZJK8sBoLs1K0rSVxlbiZWr/kz8HQes05exPj XRavPZbpsHWvJn9IB1qxVYmLU7iz/dJcWSiUgYirpqoGAf4xfk1P602FrbGBZaz7pZl2 WNwpQQNODsMguFIfqiPZiIAnMc+uOkqk1MUxLqMSeyGy2/r4RLgw5a710SZLLhwpgPEQ KtiJDSRzCpu0HVRT40FWcAd7WkRzMKHjM1dcPlYrG1XiVmdx98krgagHRj2o4+2Hnpzp DfRc+CGUvhW5IlUDVKT0jeSl0qh5NE3JSat0+TJtKKlvB9oPQe4vcB8fdq8DFpavUG5t WhMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719294837; x=1719899637; 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=804adpboUNUGoA4+SC+knsCmSvv2ypFpRddNkdj212U=; b=gxDlN+/6QwfuIQwb2GCkq3pf+Mb7zXOIBwhUqJ98GdGtQv0iJbISiFY2zTnE9Jas+8 oOwXIVOCK9a4giREX6FcuFLxBGNGKENDO4ixbYNgyhUagbEOA82WaLwosurrV/L7I2bF QbfCbhOLIpVw0eMRzWxVA1uIMnAEhKPOudFStIcQK2xmzvEZPEyjSVaYvRlwT9g5wZ6b oij5G8cy6mVMTwekoRAritnDIqJzaOEVqQcqlONesMC1q1hcfNun9MNIpH3+9qrIRGeY KqnzPXbFkIHM5GS6wXFePc6XgWd5+C+zmSyHTl89c1WfGaKXDEdoVyT+3rlZxfY/kyZ8 txOg== X-Gm-Message-State: AOJu0Yz5VmZswdEFqyvOzhKvrfO5tNdmvUWDjrmqdX63Cy4ZPnkL9l2l szmygyN2N/k0US7mbBMh67ktEz/FEZavkIN/YgMUbKmKqrbLC8civuxXU+MCzv6V/9v62/dlyCK h X-Received: by 2002:adf:e990:0:b0:35f:1bc3:50b0 with SMTP id ffacd0b85a97d-366e9652995mr4101611f8f.63.1719294837063; Mon, 24 Jun 2024 22:53:57 -0700 (PDT) Received: from m1x-phil.lan (bd137-h02-176-184-46-22.dsl.sta.abo.bbox.fr. [176.184.46.22]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3663a8cb6d2sm11843817f8f.111.2024.06.24.22.53.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 24 Jun 2024 22:53:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , Bin Meng Subject: [PATCH v2 00/12] hw/sd/sdcard: Accumulation of cleanups and fixes Date: Tue, 25 Jun 2024 07:53:41 +0200 Message-ID: <20240625055354.23273-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 Since v1: - various patches merged, few more added Various SD card cleanups and fixes accumulated over the years. Various have been useful to help integrating eMMC support (which will come later). Philippe Mathieu-Daudé (12): tests/qtest: Disable npcm7xx_sdhci tests using hardcoded RCA hw/sd/sdcard: Generate random RCA value hw/sd/sdcard: Track last command used to help logging hw/sd/sdcard: Trace block offset in READ/WRITE data accesses hw/sd/sdcard: Do not store vendor data on block drive (CMD56) hw/sd/sdcard: Send WRITE_PROT bits MSB first (CMD30) hw/sd/sdcard: Send NUM_WR_BLOCKS bits MSB first (ACMD22) hw/sd/sdcard: Use READY_FOR_DATA definition instead of magic value hw/sd/sdcard: Assign SDCardStates enum values hw/sd/sdcard: Simplify sd_inactive_state handling hw/sd/sdcard: Restrict SWITCH_FUNCTION to sd_transfer_state (CMD6) hw/sd/sdcard: Add direct reference to SDProto in SDState hw/sd/sd.c | 119 ++++++++++++++++--------------- tests/qtest/npcm7xx_sdhci-test.c | 7 ++ hw/sd/trace-events | 4 +- 3 files changed, 70 insertions(+), 60 deletions(-) Tested-by: Cédric Le Goater