From patchwork Wed Apr 21 10:31:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 425283 Delivered-To: patches@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp203429jao; Wed, 21 Apr 2021 03:32:06 -0700 (PDT) X-Received: by 2002:a2e:7403:: with SMTP id p3mr14750198ljc.225.1619001126005; Wed, 21 Apr 2021 03:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619001126; cv=none; d=google.com; s=arc-20160816; b=CeFQvDWZdbmXVCpmqMCyJ5WkwPyHW6HGZ2Iy1rVyOyV+QbnVjQvj6G6xZpQsP5NH4f rVq790DRr9iTIvWqfewRULDuPDd7Bcg9Mk02uu2VrXrSvWP3ZXXf6ug7Co1CDFw9hVUy XyQzFKe8HXUhm218J1y0UqkA9MvVza4UmcS9EP4QcFkzJgaHiZxy2YQLNGnZMuuEN+S2 JZSjuBVXANyXSYFVZ19AU/vPFJWPwcbgvwLPuF99ixsmhFb69ERQrBkCGuYZY+EDDKVt 2FPKwsvvYALEmHRFVHo6ZSpuLKdZSowo4t/LZoJKrG7aGcZV0y+Ss3WKHvCnbYZxJaD9 /umg== 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=fBQWyNtRNzkXZ2Gc9WUvzsz7njLiu60umO7wwJKluZY=; b=z5yvVkQnyvRMOc+qnM0jAnijSC1a+bYXes9LROTp/uoZjnIKcF8F9IWOnqBC1T2/cP 7koXauwbue0oxL036vub4simAiKfg77VKZAYNeCVOdVPr+LU9iS9lE72BX9qx1VgLVbq TCN0YZDuP4veFw1GpQX4n1F3wTh29ZJE187PBBuFxd+ro4nlUkFCIhBRWgV3De6PL2dw jkTgcfMZTL7Pmq3CEio8+I7EmmewJTp3XPt7pRo1/Ji85fQ+ZF+Ehuyp1pnQy8VFIu5P betknlCI5MEOa4Gjv/GPl32xmhr7XHVsazKU3in3lU5/kxdSokuEMeOb0JRK4MCnV1GS xvBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LKOFJpHS; 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 c8sor811418ljd.29.2021.04.21.03.32.05 for (Google Transport Security); Wed, 21 Apr 2021 03:32:05 -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=LKOFJpHS; 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=fBQWyNtRNzkXZ2Gc9WUvzsz7njLiu60umO7wwJKluZY=; b=LKOFJpHSObmujmQdunPXOFFv/fgR3WYfzBlUopgCGKd3UJChtrfRG0BfGIocMOYwhy p+JGmUdiga+COnlSgspTSEEmLIIB851zeucmhnQ3rGwPYlLIJ3uJOJC6nybTICFpq9AT jRbghH9a23GbT/Brtcm9voCyswA0OIAvk3oWea5cq4SNq480J0zPKeHpm2sdppSPhW+8 /0JPkyATAZa8OXpNB0ePQqks8jjWwnEWhWhmzVdTS4klK5r8bB6Wz6Fqee6Lf5FSEsGi ZKaAiXmU5O28U261JKx1Nf4k3+LQoLgDVYS07XXOuIaoJua9cwp2PZuJPo3OhSKNr0ns Vvqg== 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=fBQWyNtRNzkXZ2Gc9WUvzsz7njLiu60umO7wwJKluZY=; b=YjACIV4CLkKiNgtHFFk+njNwKR+BQHaa8gkQsbvKuHK/nemzGwAj26nsp4zYebdZh3 4IcT7MPYdLV8jiXNsc1VDRBBwVTExn6Q3SEiYssDnRUI5whzd5HeK7qsPHIP2/mDYNnk jf9XQFzu1qwEP1W0OTmd4Ku5G5foCP/wRpow8EfUfH2moHNpxPSA3//SekeyV6otmMl/ g7O+3OGrJC2Ms2FIkdopvYaITEkR1w0AAEKJ6QZzefMi5Ad3EnhbLoMQzmPNzLItv20I 2hzEQaRiGHt3nWjGF/2etAHowjcWTMYAdyiKiJsf4M4aJA44zPy6iBfOgCfaYEpAXQgp NZxg== X-Gm-Message-State: AOAM533/B2TrQFGfftth0+Ns6bjrpiPlft0Cdrk98oYvg5rzm+HDG1Bf wzbuo7vFywvqMLX7D/5SZ1/sB8v5 X-Google-Smtp-Source: ABdhPJy2QAMm2KR9a2HuLbV6o3dBB1eV4thW4JJzL9UYl4tSBGf5+jl5vFKnquBcNTYNJBkExFvAfQ== X-Received: by 2002:a2e:7817:: with SMTP id t23mr17354186ljc.240.1619001125567; Wed, 21 Apr 2021 03:32:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-129-234.NA.cust.bahnhof.se. [155.4.129.234]) by smtp.gmail.com with ESMTPSA id u13sm170603lfg.139.2021.04.21.03.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 03:32:04 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Shawn Lin , Avri Altman , Masami Hiramatsu , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] mmc: core: Read/parse SD function extension registers Date: Wed, 21 Apr 2021 12:31:50 +0200 Message-Id: <20210421103154.169410-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 In the SD spec v4.x the SD function extension registers were introduced, together with a new set of commands (CMD48/49 and CMD58/59) to read and write to them. Moreover, in v4.x a new standard function for power management features were added, while in v6.x a new standard function for performance enhancements features were added. This series doesn't implement the complete support for any of the new power/perf features, but starts out by reading and parsing the new registers and stores the information in the struct mmc_card about what features the SD card supports. Note that, there are no HW updates need for the host to support reading/parsing of the these new SD registers. Tested with a 64GB Sandisk Extreme PRO UHS-I A2 card. Additional tests and reviews are of course greatly appreciated. Kind regards Ulf Hansson Ulf Hansson (4): mmc: core: Parse the SD SCR register for support of CMD48/49 and CMD58/59 mmc: core: Prepare mmc_send_cxd_data() to be used for CMD48 for SD cards mmc: core: Read the SD function extension registers for power management mmc: core: Read performance enhancements registers for SD cards drivers/mmc/core/mmc_ops.c | 11 +- drivers/mmc/core/mmc_ops.h | 2 + drivers/mmc/core/sd.c | 222 ++++++++++++++++++++++++++++++++++++- include/linux/mmc/card.h | 21 ++++ include/linux/mmc/sd.h | 3 + 5 files changed, 252 insertions(+), 7 deletions(-) -- 2.25.1