Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2209284imm; Thu, 16 Aug 2018 06:50:41 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxveVl00RyDZZ+KvrngGORinqG0tIRG6OIkMwQOqntUy6LnWEBPFdk7GIDReysKGZt0jX5A X-Received: by 2002:a63:8848:: with SMTP id l69-v6mr28624545pgd.377.1534427441879; Thu, 16 Aug 2018 06:50:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534427441; cv=none; d=google.com; s=arc-20160816; b=hHvDAaFskywSp8hsKi4LhD/Os8ylVF4UqJSgjnOC0GH/lbMU5BFI0Wtt0qNE3MHJJe cBqaXKm8WotGac7CM+VI1K8BdchWhZbTnytOnDzxMtEww+YSF7b7vX3lyY1nIEHoTQPQ Zf3dgVg4zbnyC4rKXCkWkOCN73QgYmUfdBr5sLCfboAyzjKseVAZFyhTdEwVUHIsjXMT 67g7GMw2It4qAA2DEoW1pZkjQrx4SzIq0ThHokR2gHwl0hEbLFnK8zLXAYdWN2k88Y2x mdzVpglq8gEgM/AAkNAaFsRGX53dlD0zYcmNqrio6DunXKdWEV7G8Idx+6aqSfszfsE3 CEww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=FIdLgY0zruSsyBRB+jlR99n4k0RGFju7v2eM0n3VOrY=; b=jFXpj2UnViOSgxVoJ+bt9pfrlBJPKlYrh48joENhtNTCYjBpC0qztYR67o/zNA0HdS 23XU4ypRsnf76ShNFFUrGd/zIh2KiXAmKctzSACCJz33SmZxG5Kde3/87pG2M+SfepX7 HQ0sCgnZMcM1WMuaAPGcKsG67C+DkhLwepih++cZ67BKVi+E7Vh9vJY2CxC9R3viyMbJ wz7EVsg+iPlEqB6jCcuHNibav7o7YIXsOOuhFdfUjLHLCmDQRwiXhIWmVolTwfmBFJB9 b32ypFdLGtTfKaqJAsLjnCuSME52DijmYfZIOUer8NkvgNx45QLgfjliVAzx5/ixBvNX 2pvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YqU269qC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20-v6si25033637pgl.573.2018.08.16.06.50.24; Thu, 16 Aug 2018 06:50:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YqU269qC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389534AbeHPKvZ (ORCPT + 99 others); Thu, 16 Aug 2018 06:51:25 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33852 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbeHPKvZ (ORCPT ); Thu, 16 Aug 2018 06:51:25 -0400 Received: by mail-pl0-f68.google.com with SMTP id f6-v6so1706562plo.1 for ; Thu, 16 Aug 2018 00:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=FIdLgY0zruSsyBRB+jlR99n4k0RGFju7v2eM0n3VOrY=; b=YqU269qCRl9VeyBS1YUIbrUIyUH0gdWoImVQo8c+DJWVeu9ibifMaJJIoDXOKS6LfU 0hUHIoYOvILymPYlgk3EpL/sdhNThpzZgo63q5TgVIDV3d99WyLwcR+YxFc8jfNTSaP2 w4qHNJi3ugQqOntKYInBibW3w9m0HOtkDVRoo= 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; bh=FIdLgY0zruSsyBRB+jlR99n4k0RGFju7v2eM0n3VOrY=; b=TNkZ09TDlgM9opKO+xa3LtF2B7FY2Rl8inyr3Pfp5z6QpDpfpeBjLZ9KEEVBXOPs9+ 8+qTknH8MYKUgs4YwAXkdj+zDXI6vEZbqWDhF+/78mq89sNnWD5WdU4uZ1hjiiw4lD+W G8IKcdS2K/qlEjWUtBX9cNftK7VtzEJ6IF5XQpkFb5k2PVpiqH+st8uu7LkRX4LDnNkB 0tDBlNn+lp6R7H09vvoO+0y2YcGgBiDO6zo0bxe5aSlBK0r9Mo5IsMbK9qgsN2Cvbr4C aUYpsCQbUOKQzTqRHuIo0jd+4v+MK9yRIEQixSm6Hi0GRklEQ6EkmCbGk5VwKc1NgB9b lPYw== X-Gm-Message-State: AOUpUlFvhKiuaC2H997liEJWAUd8ndu/7sEJIQcFyri1JhLDMsloX224 AeMLPZQZCDVWBTa8cClFeoclAA== X-Received: by 2002:a17:902:7446:: with SMTP id e6-v6mr28122209plt.161.1534406084089; Thu, 16 Aug 2018 00:54:44 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i25-v6sm50838137pfi.150.2018.08.16.00.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Aug 2018 00:54:43 -0700 (PDT) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Orson Zhai , Baolin Wang , Billows Wu , Jason Wu , Chunyan Zhang Subject: [PATCH V5 00/10] mmc: add support for sdhci 4.0 Date: Thu, 16 Aug 2018 15:54:14 +0800 Message-Id: <1534406064-10065-1-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From the SD host controller version 4.0 on, SDHCI implementation either is version 3 compatible or version 4 mode. This patch-set covers those changes which are common for SDHCI 4.0 version, regardless of whether they are used with SD or eMMC storage devices. This patchset also added a new sdhci driver for Spreadtrum's controller which supports v4.0 mode. This patchset has been tested on Spreadtrum's mobile phone, emmc can be initialized, mounted, read and written, with these changes for common sdhci framework and sdhci-sprd driver. Changes from V4: * Addressed Adrian's comments: - Enable v4 mode in __sdhci_read_caps() and sdhci_init() instead of sdhci_do_reset(); - Move the added member 'v4_mode' to following with other bools; - Add more comments in the added function sdhci_config_dma(); - Instead of enabling auto-CMD23 in init, enabled it only if receiving sbc from cards and the argument is suitable for host to deal with; - Make the addition of the SDHCI_SPEC_4xx defines a separate patch; - Disable auto-CMD23 if stuff bits is set in the argument of CMD23 in sdhci_request(). * For V4 mode, SDMA also can use auto-CMD23, adjusted host->flags in sdhci_setup_host(). Previous patch series: v4: https://lkml.org/lkml/2018/7/23/269 v3: https://lkml.org/lkml/2018/7/8/239 v2: https://lkml.org/lkml/2018/6/14/936 v1: https://lkml.org/lkml/2018/6/8/108 Chunyan Zhang (10): mmc: sdhci: Add version V4 definition mmc: sdhci: Add sd host v4 mode mmc: sdhci: Change SDMA address register for v4 mode mmc: sdhci: Add ADMA2 64-bit addressing support for V4 mode mmc: sdhci: Add 32-bit block count support for v4 mode mmc: sdhci: Disable auto-CMD23 if stuff bits is set in CMD23 argument mmc: sdhci: Add Auto CMD Auto Select support mmc: sdhci: SDMA may use Auto-CMD23 in v4 mode mmc: sdhci-sprd: Add Spreadtrum's initial host controller dt-bindings: sdhci-sprd: Add bindings for the sdhci-sprd controller .../devicetree/bindings/mmc/sdhci-sprd.txt | 41 ++ drivers/mmc/host/Kconfig | 13 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-sprd.c | 464 +++++++++++++++++++++ drivers/mmc/host/sdhci.c | 251 ++++++++--- drivers/mmc/host/sdhci.h | 22 +- 6 files changed, 741 insertions(+), 51 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sprd.txt create mode 100644 drivers/mmc/host/sdhci-sprd.c -- 2.7.4