Message ID | 1490600982-5410-5-git-send-email-yangbo.lu@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8931A602D6 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 27 Mar 2017 08:04:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 788382815E for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 27 Mar 2017 08:04:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A45028338; Mon, 27 Mar 2017 08:04:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F3BB32815E for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 27 Mar 2017 08:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=siDVxeWCNohuAf3P0ETLoSgp6QFAPnzkVOc4pTMZ3Xs=; b=SXi9sg2n5XW9By PmhZdF95AUZ9b1OLInbcwrFNMchxBXcVZnycb6cJzOymmAXC4Ze7DUWNNpB7s1aG3XhylrzN8OWI3 XHisrm3t5s5qlkeGcDlnw7sVrMRjl1JFR7UEnT5n3qunSYJJ4oU1c+PrxYS5f/vJ1XjZmMGkft7Bo BmsYeWtKdBO+IP07EuVzwn8JFXd3ZVKUrJaGce5awFolv2/H1Go1OjdsBEUqQVetjlkW+vuM4lCHr WvkJ7g43CHe8VZsigCu0KlpXzIutKaMmdf+K2wX+DTCctn6wQtfSUEqlad/ZqBklUtpZRMK6QfB36 wIKSsyvNgcayDlZMqOeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1csPe6-00065i-M8; Mon, 27 Mar 2017 08:04:58 +0000 Received: from mail-sn1nam02on0089.outbound.protection.outlook.com ([104.47.36.89] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1csPdt-0005i4-E6 for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2017 08:04:48 +0000 Received: from BN3PR0301CA0083.namprd03.prod.outlook.com (10.160.152.179) by BY2PR0301MB1958.namprd03.prod.outlook.com (10.163.196.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Mon, 27 Mar 2017 08:04:23 +0000 Received: from BL2FFO11FD009.protection.gbl (2a01:111:f400:7c09::113) by BN3PR0301CA0083.outlook.office365.com (2a01:111:e400:401e::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Mon, 27 Mar 2017 08:04:23 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD009.mail.protection.outlook.com (10.173.161.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Mon, 27 Mar 2017 08:04:22 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2R842ko024493; Mon, 27 Mar 2017 01:04:18 -0700 From: Yangbo Lu <yangbo.lu@nxp.com> To: <linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <ulf.hansson@linaro.org>, Adrian Hunter <adrian.hunter@intel.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com> Subject: [v3, 4/7] mmc: sdhci: Control the delay between tuning commands Date: Mon, 27 Mar 2017 15:49:39 +0800 Message-ID: <1490600982-5410-5-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1490600982-5410-1-git-send-email-yangbo.lu@nxp.com> References: <1490600982-5410-1-git-send-email-yangbo.lu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131350754628468031; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39840400002)(39860400002)(39380400002)(39400400002)(39850400002)(39410400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(85426001)(356003)(47776003)(104016004)(5660300001)(68736007)(2906002)(50226002)(5003940100001)(2201001)(86362001)(38730400002)(4326008)(8936002)(76176999)(8656002)(77096006)(33646002)(105606002)(106466001)(8676002)(50986999)(7416002)(36756003)(54906002)(81166006)(189998001)(50466002)(305945005)(53936002)(48376002)(6666003)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB1958; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD009; 1:JvN289icxZKMi24g/ywroaEwiFoAvja0OwML9QyEIaxgR8qdja5fDduviU/bRQQEkY50v3gzEi1O68oJhKxJvdd6DqMWCe5sUUlS82WhEYKc8J3Y0UcRijxB0rqleqE0JBtocyvT7bsTuzyjHhFTy041hsPZRFUIWGonl6aEQzBJMY2Ll2ut1lC8skqwaaEWBY3KadHa1XkqNYxhNg1f3sn0Bk5sR6MZwFmj2YrshebYe/NgwfoPrcxT8ezrMpVKkBfzAtucEUuRNVUGNROVEHs0JkaabDlMTcmWiV0suEGjO1wmuIv425qCJpSKoZS8xEv1HpiaM4xrcE3nKt5VULReU5P1WUdyDc7OKmHfbSxEEqouF81tp0A/OyjvUOmflv721/kNYv/OM72cGI5Us3d2j/NWiI+70yj3heU+8wMdYY/MR3xnu7ksUSBn6Wpdb70GsMlNz5iDo3qnOj4OCQ/VA9ITWnr6gZi15vq6YdFnvYS1sRbNPBFL/jF9E4Vc/XHhewPfg9DvaYAFlK3hxIE1TeAKP4rOmFoSt8NPKSbqWDBJbf4a8dxPewq+HO0z7eblwgRzMZi+y6rKyL/VmuuzlwTebJ3LQTq0nKXD96iAdoaLYricIraPSY0/lZrnVPCw5C/YshVhCYnDBTAyKp5kH8TL+OF2Xq8h2afGCgyhhEV4PcK97Y/lhdHb7WLYEXPpnJ7xCzt73oS8K5I+WPei4bIC7zKyGXl6aPWz8xG6/gbrLsdZu0toeGloCJ7e MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 305542e8-6202-4ad3-9bde-08d474e7e110 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB1958; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1958; 3:nROxxiBXUHD0xNVqRhiLAhfG9ODSzV3FfkZxjsBFkJ0yy9SB5MvDdNlFWx8ZPaTVwOkoIcf8BlByfZoaHXKMjxBjshQtsWFBpWtgn3p6aT20EF5X2/TcgffLk7ZqIAOVlCqAag9LX34i2PqGRfDsH/ZvApBJ0aHqgk8vK9hVfpg30N/CTzzGteMUOYEKVKeHFlGHzXJfGp62eA3kh6wv9cUfwKIB86gHZi6SNn5Br2yVYcJQfY/5mVKTodnCwKBx3cqgNJunb18YlpxvkOMvEpMnB2WuYEhCoP1z9vNZX+fiWjJGePRDCiIyz87HoCmtR2u6Fj0zVu3sFNLmiM2YjNnZXEPxhExyupShudwhoW1YHstEiLXg5uxMMK3VsrBy; 25:G/vJo/0Azs3h9kWYl33BEqu8X6GopbHIghrH8w8W8AfCE6QK/l/VXjSYImjA4i2TtJPg1f6u7RdHPCmpL7V17mmLo0jrDKVnxYcV1fMYkQoeU9fmXplYS5UMhKj5ivty2IEQ8HF7v9ex++RwQNy+em/ZGBwey40vmJJGPdF3i/x1/voeRm+lgX95nKUi5iFp8yQvu0Oj9Y7kEzposjTnHPeFGHiKOenz1TuyoBy7d9FyVymAQcpune3be0MfzFu+S4itmluaqORYfyOqHukxvuw+yZvw1F90oUEWRn86wetYYwJk1gZMZjW7fsMRFtYUlO9IVJdCeWfibZUq/+WxGCfwGcjXLbEkd/L58ZBt8fztYo+MHbYAaA9ZSGgEcmCN3B4HsP3fMtXAoFbdxHSJc+26bosMnpxuZM4yb4q5fspbGsXg8sM6BFPi4GIcZsRilzBS6awtmRpvtxOz0lGrUw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1958; 31:21WZrQ+08DnJNiLuQlET/IHBu1iIajUTFSbgXxXd9TIEU1GquOvo6uGaqXKpwBLNn6qemMf8rjvjA7Y9oOdimo038vlAoghtvgVk25Uv45GE5BtxMW2/6+pwFTGmvUjNnzCb+NPJD2OhcT4d9QwRz3MHj4VdZbVOX6tEQBiSefectn+6eC+r4jitgD6xag160oxSex5azG09oDtkvzIgcdgFqedFr756udRFX8srapjf/jt1ACo9w9dd7iF8aZlrZZP6vkiFEC9niWbFW2vQgg== X-Microsoft-Antispam-PRVS: <BY2PR0301MB19581DC980F8C4C430C0C6D7F8330@BY2PR0301MB1958.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(13018025)(13017025)(5005006)(13015025)(13024025)(13023025)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123565025)(20161123563025); SRVR:BY2PR0301MB1958; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB1958; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1958; 4:89BanrTT6/LNzKldq++dben90xd76kBKDbhIFDhEgFvCDkZ6Ya1ICsmg7E2uNMnkyprZqJeTH/0+EOYxQpbpPqezgbQsf1D811BNXwjFdJ2LflflZfR6r2iS52uFXPUIaIDsu4v+3FiTGhrDbK78m2Z0hUwj/B0MbqfKZ1c1Mjg0qmAV8AbXMpXI2EBKRdyYP4v9UbruHxy4HzwW+bjMUJiG5rLqYxB9fmtqmROM7/helxXCsARviTqsewJRuYER0RmfYffRFP1vc3w7UGabqxok7L2hR+QIEKHsicygQkhIa0ZwTX+oCDTFaluxaGilU1LWlsxGOntQtwl1lDnd62Q1DpC4aimzk3Iirlub9dAUfIbbKvoVDZiCdulWqAsWYMqgOKMiwgTJSTtFRMRw2074yRoMXACmZBTkGbWUiMHrrOLzLKC5/Fh36cWb1lhVxVhBEgFxrCveOIMnBYrZVBNhy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oZIY8YBY5/BHFJRqCAE910IgnAsef4qaX9JSeI/Ar6Du0ndYbHfQ6zyvTUk9c72w+Oh8E7Ls+ZpvAGiQHFb+e5ASjtzxv0yPkTHUuBgD3+SY9ols4I63g0qYTpt9G53FJJsQsJZlGWB+/Oy1KclaJ+ZFNWBPcZDktf2tnsOod7jCBbM1r+UndZhb9CHn9/IVGnvZXj6+B3+c6En5Hg==; 5:I9FEyLVXLnVjBxTXJaTwowhqaj53rPhfR3R4wlGjooWTfrnJh5r2mEqjv41C2ISano1lnJNzPBC3OLdRinDZrVKT7jZOmyvMsNTtMFKrF9dWQoM9U+EH3WOlh7+7BAJsBSx1jnyTiX8KZ5yuE9pSYxW6Qq6Z1w15B9k3XDSgr/R/NkSuTDDM/8WsXEAsK5RR; 24:xRbDBQFhWkgfOeIr4OFREC+OMT6NjmRCMmCj6njy7MA04thiUflsh90Z5s1GOJ3Ma2WIYJpk80b4LxhLSYFhUlRrdAh9k7+WZcnsiv26sTA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1958; 7:ANRhadxfdLncJ0oiym1x3CFN70rGofRPOffxC0Uho9xbU8uT/8kjEvwPnVcYOIXvuV/GJJpCZD8UVBzQi+dNLqWxbB0xsUuEd6zU5EGnkN3j+XiwUre2yDVD3Yt4u2iz8eZV/YwyokeA7EhO2cxsEDZYpLGmgyQJO7ieqh6fx/tIjng1gc7+Giwwd4bQdR5MYJ1XNG2Np7Vs08mOij1WGY/2VFw4zrNJe9yVzy3enP28dXXC4vjhIVIokZRY42xaQR4IlCEMBxJR/EmzKs3Cb3EL2LY0K17vL/XcH9Ytkc313N9mCKZH5nkLzHTRriF+YbOyx4EWZHJp8ACOV0EdVg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2017 08:04:22.6596 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB1958 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170327_010445_752636_F06B100C X-CRM114-Status: GOOD ( 18.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>, Yangbo Lu <yangbo.lu@nxp.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0d4485d..ffd1607 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2100,9 +2100,9 @@ static void __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode) break; } - /* eMMC spec does not require a delay between tuning cycles */ - if (opcode == MMC_SEND_TUNING_BLOCK) - mdelay(1); + /* Spec does not require a delay between tuning cycles */ + if (host->tuning_delay > 0) + mdelay(host->tuning_delay); } pr_info("%s: Tuning failed, falling back to fixed sampling clock\n", @@ -2164,6 +2164,9 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) host->mmc->retune_period = tuning_count; + if (host->tuning_delay < 0) + host->tuning_delay = opcode == MMC_SEND_TUNING_BLOCK; + sdhci_start_tuning(host); __sdhci_execute_tuning(host, opcode); @@ -3108,6 +3111,8 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev, host->cqe_ier = SDHCI_CQE_INT_MASK; host->cqe_err_ier = SDHCI_CQE_INT_ERR_MASK; + host->tuning_delay = -1; + return host; } diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index fdb5d7e..2407960 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -538,6 +538,8 @@ struct sdhci_host { #define SDHCI_TUNING_MODE_1 0 #define SDHCI_TUNING_MODE_2 1 #define SDHCI_TUNING_MODE_3 2 + /* Delay (ms) between tuning commands */ + int tuning_delay; unsigned long private[0] ____cacheline_aligned; };