From patchwork Thu May 6 14:58:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 431663 Delivered-To: patches@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1523308jao; Thu, 6 May 2021 07:58:37 -0700 (PDT) X-Received: by 2002:a2e:a365:: with SMTP id i5mr3830913ljn.344.1620313116751; Thu, 06 May 2021 07:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620313116; cv=none; d=google.com; s=arc-20160816; b=l+nW51HF9Yi4QHw0faGH23dclOsTMVZUQueQE6/Sn8ffL7id2axdg1Dd2dZUxg5kM3 snCxoC/ERx+j7ggk70t/kZjSMf2YYusDp/m+g3E0G6BA1kx2DPfu4qDNuzcT5mosi/V1 P1L6DtV6o6Kk5lBE9t/eNBZToSssEnez3/bLtOaW4gS99j4ILS94HuVKe+2DmmL3f6YR bH6YYct4hNQHWb3caY2WIWy0pXvZC3nL5Nc2Qujtp2mGv+OUN0vFx1+KzEzOICHLKq4B oAPNCSl40tfFuuthzj5wdbKrqKjQisJNeKSimp3SVKU3+P8T1ERJA0ndnHIdRM9zKBl9 +3Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=pJwR0jpCnsf9y/FTF427NMZV9yLVm+aDyiKh9n5GVw8=; b=X/72UfqZQOzLjaPHRZXLAQ8TbRn+fNAu+mEi2ZJd/sFn7D05G3LQOX+QnwoC5nTY3r rzmfQo273Q5ZFp4V5FzyTEnHNh7geGprTnSh5pZtzffGEXjtSkEt7WOj1xvjpoNNs3hH GkmYLqBkGCXULhCyBBTHHs2IxsIGj3EADCpnMEJadleLaQsX62qDWlsTT4DTIsSllJKx OmjIeGiIulGAaMXWEtmg+Oh150OmuHfGCHa7h61Ycuzpa/QMOd6x6AR7cvo3UuKtpWoh T8WuGTWdZxRdGebsR7BG6UY963JPKrVM3NuRJHqS6VwfcddpZY4BXTPoJPe+iN923Dfu xz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ckf5P4Fn; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id q11sor1388846ljj.18.2021.05.06.07.58.36 for (Google Transport Security); Thu, 06 May 2021 07:58:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ckf5P4Fn; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pJwR0jpCnsf9y/FTF427NMZV9yLVm+aDyiKh9n5GVw8=; b=ckf5P4FnVIgnAHqJq6sdLjCngYSbfUg9saTg+UiXj9SlkI/WGnQwAHvP73bcuenuLn L7egDnA2Bpz69apbjpLOE9r6EvVccEOT1FRPTuv6dRbIkAe3xO+6Qxn4jdiaEjQKInIJ BQLQlDiQyEAN5jFMAZ7L2W1G+ko0d7WyDTHA2pQnoBvLhq0Ij6AfAApkFBDbicUmsAC2 W+X2caWQmRzlxeeDNdFVtIzN23PKzcZnUnc4ohOaw9A2s8xGoLzaqQPZKqP4ZRHzLEfG j87mbrJYImqP1sc8y03BhRUTRTVhzmPdK81KPskIoRSyU5dfmt7eJfJWnrld24OYkG4D Msag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pJwR0jpCnsf9y/FTF427NMZV9yLVm+aDyiKh9n5GVw8=; b=mOEaMUT5uxLH5a2uqB+K145myIgZeeuQGuaZV/j/qOP8ZOOiOf5MBBmYpnBxIEstZ0 8nEFtOjE139xRvc4LMbWdkrR+eWI2hts+3IUj8sBjpcnci+Rsv+qReCSl6RSnMug0HOn ZhizmQl577NGX/0fpZsHNMqkWPkRmet+wZDX7drxdhuqDgghg8ZeZoJjzFITIImbN95S pzw+sn86fawQOZrEH1c1Iap05SPlw1e1mvpniJg8EFUYB1o0IOPPl21pN06qZ/59oFh0 eouk0smWo7UvEeTtfGp583KAnBtQoI95ZlHbLWi61ZKh2EGyG1eUlB0c8L96aCvh/m/j 1RXA== X-Gm-Message-State: AOAM531yjIemj6plgAGcc7sJAGRyoh86BeX8WaypD2L6nqtwcTjwA62Q IrBRiKjDayfahUuPqQEET3MJj+Qa X-Google-Smtp-Source: ABdhPJzv7VVM6GvFLywf+ZD+Zrrlqtw+C+gVfu7nh8M9qTE51onRSgb9pssQA/ZXXGrDIZCqFFfsKg== X-Received: by 2002:a2e:a0ca:: with SMTP id f10mr3882282ljm.66.1620313116244; Thu, 06 May 2021 07:58:36 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-129-146.NA.cust.bahnhof.se. [155.4.129.146]) by smtp.gmail.com with ESMTPSA id g24sm968774ljl.44.2021.05.06.07.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 07:58:35 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Linus Walleij , Wolfram Sang , Shawn Lin , Avri Altman , Masami Hiramatsu , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] mmc: core: Implement support for cache ctrl for SD cards Date: Thu, 6 May 2021 16:58:27 +0200 Message-Id: <20210506145829.198823-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 In the SD spec v6.x the SD function extension registers for performance enhancements were introduced. As a part of this an optional internal cache on the SD card can be used to improve performance. To let the SD card use the cache, the host needs to enable it and take care of flushing of the cache. This series implement support for this. Note that, there are no HW updates needed for the host to support this feature. This has been tested on 64GB Sandisk Extreme PRO UHS-I A2 card. The series is based upon another recently posted series [1] that added support for poweroff notification. Tests and reviews are of course greatly appreciated! Kind regards Ulf Hansson [1] https://patchwork.kernel.org/project/linux-mmc/list/?series=476933 Ulf Hansson (2): mmc: core: Move eMMC cache flushing to a new bus_ops callback mmc: core: Add support for cache ctrl for SD cards drivers/mmc/core/block.c | 2 +- drivers/mmc/core/core.h | 9 ++++ drivers/mmc/core/mmc.c | 25 +++++++++- drivers/mmc/core/mmc_ops.c | 22 +-------- drivers/mmc/core/mmc_ops.h | 2 +- drivers/mmc/core/sd.c | 98 ++++++++++++++++++++++++++++++++++++++ include/linux/mmc/card.h | 1 + 7 files changed, 134 insertions(+), 25 deletions(-) -- 2.25.1