Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2619011imm; Fri, 24 Aug 2018 02:22:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYYQCvtA0IrY2B8Zv/GdOKqfoi+bJJJ6G4Xf/quyAFFAoQduHVy9Oi/vIC9cvyYdhbFLI+W X-Received: by 2002:a63:7d7:: with SMTP id 206-v6mr912084pgh.17.1535102536971; Fri, 24 Aug 2018 02:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535102536; cv=none; d=google.com; s=arc-20160816; b=LG0uNpUaStdNU1cXy8q2Xc6BaQ4A86kX1Tff4x6SCY4xaTL478QU+fTzI8kEe1lKG1 aBvz2uRxSFf0CdwzNRRenwTV4lIY1Bm/XTnaMFmB2OlUab7JpfmZCj99g6UUys6c9/19 DSAIXYCcSskMWvgXUv78fi0/aXL0WMCuX7j3J/MxMgkmCI/V84veSmW7WCRSbAVrC4jb dRZob8/mR4Fapzd5U06/ZL5JT3pfhO1Bq59fKuMHiP7xRPWD2djP15WrYrZgbhnDPg2p pT+QLc4AupjbUnsA/3fp0occRdH8qqarldM+XJ17pnh44basgOvdm+nEIW8Y02YmQkQf gPZw== 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=f/whnT45VLYYT7w6rFBlzxRiuaWu7shxKSHq6DL46Lo=; b=0Ny3JtPzhH3xc9UkyFh8pF5vi6KElSINi3zb23ryCUW+uFEhmmZRW49qIOL7DzrDPf iLBu7b7wteOpMVNDv8DSgbpFqu/PepJ+lXy4e5NbdSQ0sEApGB8mrUpHe764DcgckY1r BqtLFGtV7lqOW/KdyF/m3/PZkJhLc1OQvSmzCeFyCYqFLsarj+be0JWSOcZzlFeB6aDc jE/WxHqA8uMa9sJjFlBdC2yY3eENv64iZGJYsefVEmrOGDm1ZUQjO9I8CPwsqV8RzsMQ cA0Fwrcge9Yg1iLiU/mb7j9zOfzqAx3iCM7ztHbDJqcwjOeD9Ugj+XeVshauTwlMNDnC bK3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QC1FLX8N; 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 7-v6si6525090pgr.438.2018.08.24.02.22.01; Fri, 24 Aug 2018 02:22:16 -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=QC1FLX8N; 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 S1727547AbeHXMya (ORCPT + 99 others); Fri, 24 Aug 2018 08:54:30 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41234 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727490AbeHXMya (ORCPT ); Fri, 24 Aug 2018 08:54:30 -0400 Received: by mail-pl1-f195.google.com with SMTP id p4-v6so850890pll.8 for ; Fri, 24 Aug 2018 02:20: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=f/whnT45VLYYT7w6rFBlzxRiuaWu7shxKSHq6DL46Lo=; b=QC1FLX8NO+5Z5Qx4mk2qc2OYS/dPke18g604agAfWM8KHjicg8oxmog4sc0LIQOy+p uxORZiwVSpvou8xnClCjeXyG5MDXN5oXwj2QUd0UKlN7Knf6p3Nr3W29zN90d5DzZXCL whquSrHXHlpWrkvkRzNqunFjWQaXKVWFi4sII= 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=f/whnT45VLYYT7w6rFBlzxRiuaWu7shxKSHq6DL46Lo=; b=FDGd3QRW65/6NOglS8Nc6m/H7KoBV4prdXmO6VjsGNaHE1ZQgMMOeULIkPm7T9eVl8 xKcyLBeKZNN+mu9n//sIvtXgHhyP7zgoy7SzezEIgSSKHng74YWwK3U1NR5aBSWD3obe aGD8ScwkgCxQR8kipVuqofyoOv5M6NdzAT10yIkO1b89NAjvA9p7pPxWIGXiszaYzDsk b+F63SDc6Djs8SYwniW6JLPnCk+ei0F/aL3XzUN6THxVHIaLX/jJLfz7Q7dnrotQ9hhr R0Z9kIjcvMXJHYat7V/cL40cZlbJ6ZifHqmdeDsgVxzqU0eJ0SYjpe/OEOkej27p/FEi mjyA== X-Gm-Message-State: APzg51C/Cf77dVzdM2ITN8KjRHhukVP5uVuSYr/+Y8pOWKhDYyb+p7ia B2V37Nx7aglHjr366nAmqLeJxQ== X-Received: by 2002:a17:902:7246:: with SMTP id c6-v6mr909938pll.38.1535102444372; Fri, 24 Aug 2018 02:20:44 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id g6-v6sm9520314pfb.11.2018.08.24.02.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 02:20: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 , Chunyan Zhang Subject: [PATCH V6 0/9] mmc: add support for sdhci 4.0 Date: Fri, 24 Aug 2018 17:20:19 +0800 Message-Id: <1535102428-20332-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. This patchset is based on the unmerged patch: https://lkml.org/lkml/2018/8/20/140 Changes from V5: - Added SDHCI_QUIRK2_BROKEN_32BIT_BLK_CNT; - Removed sdhci_enable_cmd23(); - Added setting SDHCI_ARGUMENT2 for CMD23 in v4_mode; - Clear SDHCI_CMD23_ENABLE when not using CMD23; - Moved disabling auto-CMD23 to sprd sdhci driver; - Added sdhci_sprd_request() function to hook to mmc_host_ops.request. Previous patch series: v5: https://lkml.org/lkml/2018/8/16/122 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 (9): 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: 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 | 485 +++++++++++++++++++++ drivers/mmc/host/sdhci.c | 225 ++++++++-- drivers/mmc/host/sdhci.h | 23 +- 6 files changed, 738 insertions(+), 50 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sprd.txt create mode 100644 drivers/mmc/host/sdhci-sprd.c -- 2.7.4