From patchwork Tue Jan 23 03:30:16 2018 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: 864568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="H/U+1LKu"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQYkN3Mw8z9s72 for ; Tue, 23 Jan 2018 14:31:40 +1100 (AEDT) Received: from localhost ([::1]:59286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edpJB-00036T-OP for incoming@patchwork.ozlabs.org; Mon, 22 Jan 2018 22:31:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edpIK-00034V-Px for qemu-devel@nongnu.org; Mon, 22 Jan 2018 22:30:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edpIH-0007cA-Lc for qemu-devel@nongnu.org; Mon, 22 Jan 2018 22:30:44 -0500 Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]:44886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edpIH-0007bm-HB for qemu-devel@nongnu.org; Mon, 22 Jan 2018 22:30:41 -0500 Received: by mail-qt0-x22a.google.com with SMTP id l20so25131435qtj.11 for ; Mon, 22 Jan 2018 19:30:41 -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:mime-version :content-transfer-encoding; bh=EqDY7FxnFj8UvsCdAQMjVoP2+WAJvWlGJz/zwoqYAzQ=; b=H/U+1LKu0xGTDX7kqHw9NL9nPyBUZamAgCd9nRZugdtHYQtelj0MIaA58waaXvPg8y 4hwuHukPTm4si/j837V0wK7r44dOE6S/hAE4lLK0mNWExbiSevClz+xGBepiuAtmWIBr MdVlb9hOZ5D8TP436Znu9LfwKZQpUeBSgnD6iNCxWhDwHVt9MC0DtEP2Sjh5wVTPSmkZ wd2cshc9ui5H+5NqvVoopDazr0I5bIP8DE5G8YbIU9Q3OgEkXKknTDTxfVsGK64bk4Ki StDAM0zXcjPotv3eY3uPshcMXWVQt9B9B5xKbbE/QE/FYJAHZnoDy3LtWyGoFJWx4LGX mrJA== 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 :mime-version:content-transfer-encoding; bh=EqDY7FxnFj8UvsCdAQMjVoP2+WAJvWlGJz/zwoqYAzQ=; b=HmGU8rp9kSd5zsimgUn9oDZCHJpwWX/Vjoy8nW8q8BG2FtAVMVn0WbG8yXAKS+9DSL iNg1jJh0kLiKCg0YKBl2Uf3miXyeBEzbd/otsf2VVBbq+aPHvxlPX73O7Jcq6Z7XgShC RwBprlmzo9twAcID2ljoMavjIu/GbiwvaY190DtDqqOyhNY/XQ/29kuRFFheai4Y5A/k nRpyGuXy3qwpy188pAR1iEtnbd2rf22YKn9S1HwElahQyNSb4LtbSJ0RPyl+XmBgaz1X RhFfkH42K5esYgTRhD/uVr20u5P2wRx1vQugxXw9HeDE6b1wyYl6dnhq8Biw6e69V4iP kwDg== X-Gm-Message-State: AKwxytejwr3MQwpdKrSDYPiY21FnZyCEEbfUdlB81Lk30EOowL86ZyTY KrtPHroIod8Ph1XXozd1o5c= X-Google-Smtp-Source: AH8x226vFguYRAzRGPhUtmOWaZjp2rYOAM6faOnI59PUxhRP6SaTVXxiwQexh6tEjaOdF/TBMs5Dmg== X-Received: by 10.200.1.82 with SMTP id f18mr1730524qtg.51.1516678240978; Mon, 22 Jan 2018 19:30:40 -0800 (PST) Received: from x1.lan ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id w8sm3848586qka.2.2018.01.22.19.30.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 19:30:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Alistair Francis , Peter Maydell , Igor Mitsyanko Date: Tue, 23 Jan 2018 00:30:16 -0300 Message-Id: <20180123033034.29493-1-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22a Subject: [Qemu-devel] [PATCH v3 00/18] SDCard: bugfixes, support UHS-I (part 5) 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" , Prasad J Pandit , Peter Crosthwaite , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Some refactors, few bugfixes, better SD/SPI support. With this series apply, machines can use cards in UHS-I mode. (mostly imported from Alistair Francis work) MMC mode split out for another series. Since v2: - split again in 2... other part is cleanup/tracing Since v1: - rewrote mostly all patches to keep it simpler. $ git backport-diff 001/18:[0003] [FC] 'sdcard: Don't always set the high capacity bit' 002/18:[down] 'sdcard: update the CSD CRC register regardless the CSD structure version' 003/18:[down] 'sdcard: fix the 'maximum data transfer rate' to 25MHz' 004/18:[down] 'sdcard: clean the SCR register and add few comments' 005/18:[down] 'sdcard: remove commands from unsupported old MMC specification' 006/18:[down] 'sdcard: simplify using the ldst API' 007/18:[down] 'sdcard: use the correct masked OCR in the R3 reply' 008/18:[down] 'sdcard: use the registerfields API for the CARD_STATUS register masks' 009/18:[down] 'sdcard: handles more commands in SPI mode' 010/18:[down] 'sdcard: handle CMD54 (SDIO)' 011/18:[down] 'sdcard: check the card is in correct state for APP CMD (CMD55)' 012/18:[down] 'sdcard: warn if host uses an incorrect address for APP CMD (CMD55)' 013/18:[down] 'sdcard: simplify SEND_IF_COND (CMD8)' 014/18:[down] 'sdcard: simplify SD_SEND_OP_COND (ACMD41)' 015/18:[down] 'sdcard: add SD SEND_TUNING_BLOCK (CMD19)' 016/18:[down] 'sdcard: add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit' 017/18:[down] 'sdcard: implement the UHS-I SWITCH_FUNCTION entries (Spec v3)' 018/18:[0006] [FC] 'sdcard: add an enum for the SD PHY Spec version' Based-on: 20180123032135.28863-13-f4bug@amsat.org Philippe Mathieu-Daudé (18): sdcard: Don't always set the high capacity bit sdcard: update the CSD CRC register regardless the CSD structure version sdcard: fix the 'maximum data transfer rate' to 25MHz sdcard: clean the SCR register and add few comments sdcard: remove commands from unsupported old MMC specification sdcard: simplify using the ldst API sdcard: use the correct masked OCR in the R3 reply sdcard: use the registerfields API for the CARD_STATUS register masks sdcard: handles more commands in SPI mode sdcard: handle CMD54 (SDIO) sdcard: check the card is in correct state for APP CMD (CMD55) sdcard: warn if host uses an incorrect address for APP CMD (CMD55) sdcard: simplify SEND_IF_COND (CMD8) sdcard: simplify SD_SEND_OP_COND (ACMD41) sdcard: add SD SEND_TUNING_BLOCK (CMD19) sdcard: add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit sdcard: implement the UHS-I SWITCH_FUNCTION entries (Spec v3) sdcard: add an enum for the SD PHY Spec version hw/sd/sd.c | 501 +++++++++++++++++++++++++++++++++++++---------------- hw/sd/trace-events | 1 + 2 files changed, 354 insertions(+), 148 deletions(-)