From patchwork Fri Jul 5 22:04:31 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: 810446 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1775347wru; Fri, 5 Jul 2024 15:06:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8b25h1GhgQpC609/7fxcPF9kfwWsZnwOsN/g8Y48on/sDcOWX8Uj7KX8Nyi/J2HFiHoAm5r4RRgWXhvqtAz0G X-Google-Smtp-Source: AGHT+IHmVYEme+1WHOlA2b6xkdrt8FtQPKO+Fj9V/y0CWVZfO93FWjF0SkDzk/kgE8o0fL3qCeHK X-Received: by 2002:a05:620a:29c3:b0:79d:6860:4d83 with SMTP id af79cd13be357-79eee1de535mr662709685a.16.1720217175097; Fri, 05 Jul 2024 15:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720217175; cv=none; d=google.com; s=arc-20160816; b=Cr9sB5OT0FqP2wk6yXAgGeyH9943ckyalc7LIWohe/jjnaK4+kHakStkAt1tf49ixo 3yBapL8ERpu+34AX/Wxlk1TbpfR8oxgaHVSn97kDtr1dgs7wg5EQYTQa4zmOAbcH0fdI NIDqwh4a/HW3X2qey4cqYsqDmWq+t5f7WGcIlx7zPCDiZCZlVKLyAdEjDEcx+0akxH66 VG1azcPRcl4qXxeh+YU07lmHcMGTYuQ5sAJBPHJFSL72FJ9yJ+2xheRQYE1y1IlEVbOd FTr8YVsc02VExXl0BIGhrwGnPH8KJsmRkQqWrUtEHDM0AsgiFt+S7wR1eluLQ8+5tXfc yfUw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7Fo92bzXq4eAEZevJy+NJbZOPajl0wf8VkKPf0JYwAk=; fh=8ly4dktE5qX7scQRc1qmWVsO0MVOdxfDtQTaDzdLLVc=; b=huBgfZ1PBkvPvtm81eJJav4l3G8hOINaLf6bQWRitUXxjojbn4vc+WB00csPpB+e+8 jpaQub8JhP2aCmVCykpaQRNY5/9q6wKhU1C+ymJnXqzJznKfRmNl3NqswB5Gs5LQe7gq MO7CTN1oKYRzxZEHZcNq+20v77zdxv/DRKiyWFBMup9HyfVUtJi9k2kHcDima2lxP4qA i1mAJnS8YuZbvZ+zEYx0bPYf1NQwxUmchGDxDbAP/tJq27EfsR9gaWWje2aNVjEG9bhM oQo8AM8HnDP+rQENduQglJWHVSBl7Z1NTiI/tE27hAJfHpgBmORt6KgB7sq0lkZ6q6x5 QWUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAwaXhnk; 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-79d692f0cc1si1888533585a.312.2024.07.05.15.06.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 15:06: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=AAwaXhnk; 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 1sPr40-0005ZP-Ky; Fri, 05 Jul 2024 18:05:56 -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 1sPr3z-0005W2-Nu for qemu-devel@nongnu.org; Fri, 05 Jul 2024 18:05:55 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPr3r-0007kd-Pt for qemu-devel@nongnu.org; Fri, 05 Jul 2024 18:05:55 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-367a3d1a378so1067750f8f.1 for ; Fri, 05 Jul 2024 15:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720217146; x=1720821946; 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=7Fo92bzXq4eAEZevJy+NJbZOPajl0wf8VkKPf0JYwAk=; b=AAwaXhnkXFpSujaa1CT/6ogU45jwfaCLwvNlRkuXOuxirg/rt4rgYl6ggPsoJpPb3f 3rvbLxbhVfD92vA/I3R382Ydj0XKZjNj0yItrF//uETe4fhR3+qO/L1/TfWFqUWe9LAd ZIEacLW/+cwKl1TQpsAzSUmk9956p5dUO4SfdRo4Ccijw7olKME5HOpWJk0wbSdf50hy RO2m/fG6QvTeWkL+QH1VGKkc83k8rBxttKcsslScwBr5EK+JoViExmxK+C0OaEGccRv+ go3bdzXowlRSMse4SyCfuT+PaKXNX+7PmH6HvxeRhdlCLX18hVLi//KJ40CHIiWydcU6 sg1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720217146; x=1720821946; 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=7Fo92bzXq4eAEZevJy+NJbZOPajl0wf8VkKPf0JYwAk=; b=myUJ/Y4GCl4ayN+15R4Ut98W0UINJkdMFaAFqcGyxPKqe3e4rNJnbVu8hpBSORsyX8 TSyPx27C5mIf+79sOg9nb5SJQtIJhPJVR2mpNnUUtRgbMSxogOa0ShBi9/FYKrp4Pnex VUsT5RuAfkLxVzKBv4NmQ4XOh+VjFgezBC+gnRwMtDCm1aVw4ZpTx7JP1/Fwa8mDyqgA JVuadnfusH53dYfLcUGqsK1/pK2YWQ7Y/agO1y3DRbA3hVvbH1j6G4aF+zPXVXf7CRFd pp/DOm13qggQsulBp5acv18UCoFloY/gDLiAF6OGa2MfOFQz+asvnclv2V23AlmssxoW K4Ww== X-Gm-Message-State: AOJu0YycKbzQkaO+ugqFqGWpUKUxDXWEZMWaGCpHymkvi72aAKnwd6ev mWmDrFjcy7w7kNx1kiYGrC4aSxXb3S3W0OX50qugcebCIDxhdzNSGEAuVudQKc33KdH4EqO+HNk D X-Received: by 2002:adf:e34c:0:b0:367:9b1e:7b3b with SMTP id ffacd0b85a97d-3679dd7192dmr4987912f8f.59.1720217146052; Fri, 05 Jul 2024 15:05:46 -0700 (PDT) Received: from m1x-phil.lan ([176.176.163.129]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4264aa07a95sm73359535e9.1.2024.07.05.15.05.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 05 Jul 2024 15:05:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , Andrew Jeffery Subject: [PULL 13/16] hw/sd/sdcard: Trace length of data read on DAT lines Date: Sat, 6 Jul 2024 00:04:31 +0200 Message-ID: <20240705220435.15415-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240705220435.15415-1-philmd@linaro.org> References: <20240705220435.15415-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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 Some commands expect less than BLOCK_LENGTH. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Tested-by: Andrew Jeffery Tested-by: Cédric Le Goater Message-Id: <20240628070216.92609-80-philmd@linaro.org> --- hw/sd/sd.c | 4 ++-- hw/sd/trace-events | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 3f495f91fe..9e6b9c9c63 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2193,8 +2193,8 @@ uint8_t sd_read_byte(SDState *sd) io_len = sd_blk_len(sd); trace_sdcard_read_data(sd->proto->name, - sd->last_cmd_name, - sd->current_cmd, sd->data_offset, io_len); + sd->last_cmd_name, sd->current_cmd, + sd->data_offset, sd->data_size, io_len); switch (sd->current_cmd) { case 6: /* CMD6: SWITCH_FUNCTION */ case 9: /* CMD9: SEND_CSD */ diff --git a/hw/sd/trace-events b/hw/sd/trace-events index 6a51b0e906..5dfe6be7b7 100644 --- a/hw/sd/trace-events +++ b/hw/sd/trace-events @@ -55,7 +55,7 @@ sdcard_req_addr(uint32_t req_arg, uint64_t addr) "req 0x%" PRIx32 " addr 0x%" PR sdcard_read_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x" sdcard_write_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x" sdcard_write_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint8_t value) "%s %20s/ CMD%02d ofs %"PRIu32" value 0x%02x" -sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint32_t length) "%s %20s/ CMD%02d ofs %"PRIu32" len %" PRIu32 +sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint64_t size, uint32_t blklen) "%s %20s/ CMD%02d ofs %"PRIu32" size %"PRIu64" blklen %" PRIu32 sdcard_set_voltage(uint16_t millivolts) "%u mV" # pxa2xx_mmci.c