From patchwork Thu Mar 2 09:47:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 9599797 Return-Path: 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 4810360522 for ; Thu, 2 Mar 2017 10:04:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 371622858F for ; Thu, 2 Mar 2017 10:04:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BD232859B; Thu, 2 Mar 2017 10:04:24 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6BFB28598 for ; Thu, 2 Mar 2017 10:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751016AbdCBKEX (ORCPT ); Thu, 2 Mar 2017 05:04:23 -0500 Received: from mail-sn1nam01on0056.outbound.protection.outlook.com ([104.47.32.56]:11018 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750771AbdCBKEU (ORCPT ); Thu, 2 Mar 2017 05:04:20 -0500 Received: from DM2PR03CA0004.namprd03.prod.outlook.com (10.141.96.14) by DM2PR0301MB0736.namprd03.prod.outlook.com (10.160.97.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Thu, 2 Mar 2017 10:01:45 +0000 Received: from BN1AFFO11FD046.protection.gbl (2a01:111:f400:7c10::170) by DM2PR03CA0004.outlook.office365.com (2a01:111:e400:2428::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12 via Frontend Transport; Thu, 2 Mar 2017 10:01:45 +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 BN1AFFO11FD046.mail.protection.outlook.com (10.58.53.61) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.933.11 via Frontend Transport; Thu, 2 Mar 2017 10:01:45 +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 v22A1OJ9007146; Thu, 2 Mar 2017 03:01:41 -0700 From: Yangbo Lu To: , , Adrian Hunter , Rob Herring , Mark Rutland , Catalin Marinas , "Will Deacon" CC: , , Xiaobo Xie , Yangbo Lu Subject: [PATCH 4/9] mmc: sdhci: add a callback for using tuning block Date: Thu, 2 Mar 2017 17:47:25 +0800 Message-ID: <1488448050-7574-5-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1488448050-7574-1-git-send-email-yangbo.lu@nxp.com> References: <1488448050-7574-1-git-send-email-yangbo.lu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131329225055911461; (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)(7916002)(39850400002)(39410400002)(39860400002)(39840400002)(39450400003)(39380400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(47776003)(4326008)(38730400002)(81166006)(104016004)(8676002)(8936002)(50226002)(85426001)(76176999)(50986999)(33646002)(68736007)(189998001)(5003940100001)(305945005)(53936002)(36756003)(8656002)(2906002)(356003)(50466002)(77096006)(626004)(105606002)(6666003)(48376002)(106466001)(2950100002)(86362001)(5660300001)(7416002)(92566002)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0736; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD046; 1:JKqCwXoOLq6ux3XrX0tgKnf3g005508Upw7WpTfq22i2RgQLQFoVVykacz65IrK+BaprJMFijl/VBoSpNegcCyO7lBY0OtKA5Uap1IymnBF6IPiClcGvUaaM8RCU0JAQFIltoidYlrGxcLyqHYH4MZnGQDiRQUr05pHNjhOGHVnPlOZk7TJAxjrLVJuqakCs2sUiK5B/ZhZOqG4iY/t/XrdyJu5acavHONFMcicu/2SmYR9ie5tYcQRYOwH4zYB3ZHEY6Nfl4SmR2nC2s8bwDmMZ+kXVicnRGS/fgPANWdihGpb7vVNiQUqKuwt5nT1GiK/pj3N/J1hKlrQFS2KqNZLKZ+ujnX/BXxjxKM9N3GdU8oGUl/EjJ6POXXp3JJWswg61lPQapfJChcO6HdO9jHCx7DbPeEjtMe81+GfDYs53OXY5iB8a3cEJ1Iu+SOYdsc7BJyhkEvfYFHateprkHeJ2XGIHgzGriFJRNg6837XAfJ8VVaxWX9oE+/Ts1PbRrSddiehdtmC0PR2XepCkxRSvNtFGpZKGlLQZNSA3UX6jFvlB2tAFqLsKgmcFtOwGGzhMINGnvwYL84xNgr+BN1C6ItT6S4kyxcV6HKRtOYXi8mVT7ObcsMfSYdlTjguyeAabV7MJL3lq/8B8ppq+RHAnYn0aV0rD1zTdyJaOVb4zks53QUQUgg98scZmK1d+xAY0ECT/y79+3HqzMe+72J7bE+vnimo53lyKrjkUkzs0ab8RnJzTiegEQPoN69be MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a3f1d0d4-c5f1-4352-fb67-08d461532287 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0736; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 3:1npQPii3fjYsEvyyXMqTWOnRN35sMa+yJPJdMJGwR8fWH1Qd1XjcOBRc1of7pRMWB7rcUVWCHH5/U0EO6cPrp4Fg4TghBkFv5Rp5oM95yQRxVhfxlZ1YmoIWzFqXp0mIQl+0HM19wNlgSndw5BcK5NYB6fkfCag1JaezU5xj+Tc0iV2U2Wi2AltiKjzlyfU7GgNEOJFrg/i5RmaRiWcGErPM/N89Qf+yiHpB2Gfmg0zL9eQtWjtWuou5FAb3wDKwkZ4+maie+MhCnV36AJfyNxLzIJAVTvPvHD6IehgfU6wVxg2+n5hjeY/00rxBpqfYoI8Ysx3CpeVvXRfFGlG7pXL4ArqrizPKmnak9QF15LFMvO75AakDJOqFN2VRGc5w; 25:lIOY4dXe6NB3cO7v9cDRMwh0kDrPMp5ydHvbBF6wCfQi9neVfBPdQOFuGjZzJbWfzcV4709/bP7b1ObM6vW2Ecf8AH4KH/AcpeYmJXiCJQP5Pe6NpUM7vgscWHJJELGlSmw7hpYnKHZc0d6ICl7bHZXtl7gY8N06uLrYG+P5qNggU1W8yLIlrpCM9XDpUP/iQp6lNTKoR6qONqNVYYz5068J9ohSxYEhgDlLWVtVTLzrZYLRiatVd7oK37BSXwyr8QVlL28uivBosrgbzjq1fbSsOsgQTI5fhT1Vvt25ANLs7FNmNKWIMc2u9FkvKXZAw9BtfhNCa9TeHTUPP0Nn5iIBACD5FILlaRhS2DgEt4paBPqB8SUo3Mg7/Xwmo1o4eqH4yfkUkUi7tXdBlv5TVWkN9lnfgW7yLp1yvB6L5rN5K9YPZyUEmVKeG3MNQoxftBaebS08n5EnSGkHc1YVMg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 31:c93fvWOq1Zp26Gqv8uFQhbHtTL3u+oGHQASItzTFtgvhhlFllfepMwrYIGd3wdztDN8B/TTBxvgkGjOqiWu/leH4XXYKL4C/gCq+IXHiWqbiOPJkwH/xixN2VQDl3g7MBhppr/MiEGszedJ1MVBNNggIztwv7HOMgHSMrDN/DyOggh97hcZxCV/aUGO9pX+AaBYBkKlwY2ONTq1XEGp20XpFtiSDJrZZjKQVnNKgOgAAcWwaPBO6lIl46PDdizQPB4dufbcAGrfh8b7v+nwjb5OtFuqP1ZgiR0z3Os/69pY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13023025)(13015025)(13017025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123556025)(20161123559025)(20161123563025); SRVR:DM2PR0301MB0736; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0736; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 4:YcFVFMkp5cs1jpib3Qj2B6MWKgv+hQWA30XyETbxYMavWMWfDU94L3Mz32cEQxaTcoBhUTHOroZNWc6P+wbig5i3Ck7nj12iWHsw1V5K2DP6fWMCrwEtOpRWKcBbcyZ0TduFxUpyjoRtt5r0SZN+ksQXNPbx42+xYKEq3edBCoyXoxVUoh9nkTMirvGEsC2Zb9ajBsPW2TITQxD6OuFywyZkYuo4Qw+eFoG+L5WisVPnhUkLyixP5F1QO53P+e/bkr7FDt+0Kxo2WAi53s5daskT5DegeL+fLU/W1ByLJvCVdjrbO9gLI8oe/hao37LtOLmebKAIyjD1xeXH1IWmOZm4CliOQY3FqvbaAiItdOHnK+VQtICAhbrOSrhWlOf0nU3Wz/4EID10ZOAHOeOFqEthYNm9/OuSKmCmMpq5yY2l4UFNSdxzfj4PJb8/RyRD8Cmw802r8E3DFsxBI5n3DWA0PlCw6Xym00U4BoVQOwhEExOvlB8V5O2XKEb+7dgaTomC49Kiz90WZL1SqqRh9iec4bk9h0oJPtyEv21lzA2wa7/OpD2/wAXpbBwxopr3H/irL6TmWaM890Gv77agmJ0r98/d4o3j+gzUzReRN2eVLgFTvZrs2Y6HeQikbRU6HlHs4O2GLgb3a6f89LaaRNUiN7axSYLTGGeghAcM9JeO14tmW9QZAPBDVVYb75zLdpzHdTPqXkOgfT3YZLFNkLpkiUuM5WDVbDWWfllpw6mH0HDLEZ4BDhyIbIruHxQA X-Forefront-PRVS: 023495660C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0736; 23:AfYWo+hS3J66pcdOa1gyVIxO4pSfTTTbFVEbaf6?= =?us-ascii?Q?znTm9MlBQqhO/tcHr427NrYF34sZxOvtvnYLqJxOlPjkl9k+msph+WTDaET5?= =?us-ascii?Q?2Wp/7UiQn41zRxVWYOGFQ5aK4s4v5MPKz8CxS3L0soDYEysuMBL91uFxD8iy?= =?us-ascii?Q?CXNjufxKtL/vOBYvFvH560Nh2/HsTGdp/50lN/0VCoy1Ya4XqUyTRu++nXtW?= =?us-ascii?Q?2y/sepvuVga4INGyYCtvnD3MccSiiX3XtH78TmlDbeN+4BTDWdUvEi1ADZW/?= =?us-ascii?Q?0yjyIsrncrjYJKe7fwaO4lvmWJbwAotngCExHCjROe31SUZHMXuP8cooq5wD?= =?us-ascii?Q?9i4IKL4MZ9qmK61uRrSqHb8Fa3KNvz4VHaJuzaq8aRE9ADZvqkHiUiIVu1eS?= =?us-ascii?Q?IFQ1S3m8uiohYCgDP6tFl3pIVejMPB5ZMRZotmp/ARWIaV8V/BT2m/7Lbvcl?= =?us-ascii?Q?XNQNa2Vh8iGPqQu8xzu4/mr1nDK3DA2223EB+M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7YD1WSJX6DHHdIgUB7upEG+R3jeA5bn2k0KB1wqw+lThSmgNfPEsb9u9czxizQmvlO45qC2F+YDeYkm3PK/DOfzDFZLAFgtxwuMGUChG5U62C+S7g0N4UiWXdoI5tzkxawyPrjYySiQOpYpMeCg7XWFCVxokmoK1E+hMbiE0u4thi3BAeFmcsWgBYEBtVr3N0XDQb+pOft7+C/GwYqW1suOai94GYlwxA4CzvM+4UyWRkWdPNIqeus8dAal19+tVTyN1yAnSTHJWFAM26tClrQ2fYGl+jiHdcJv+2abAGpnLTUkBsEQjbKEJdzd5UumcgmflJhSyACh4KuZo4cWvg=; 5:+SIX64fXUdLocHoLGJu/lcVxkH01JAt/HHQArtNLxA21xAGwXsE92WfPhPxhX3WB5Ug/lcGL1JRWw/AsLNEQNIOA0Jw7XluSuqhKBHEB4LWApWDZ5QSQISiGGeG2AA7TahkeIVzrOvxq46CcfH80Ax/401P6kunFavkLA+ZQCPsMaenpAuJvkfFGr6BhOX0U; 24:1O92cB76kIASaw8hD8nstKyg1oqsBnzItSjCUqGtf5GoHl8Rg/b6UAlZzhLwQ4NyRj4zK19wi+vGMpieFilBGwzUL56MsPCaSUdy51NA7JM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 7:zW+1m2yJwnWLZz4LYQOGSZR9ZO6joCn1qSGU7arTsgDjaDgXtHOu2it8DQUBUs6nILaW6yp6mHJ+45/A0QSqTF2eYY2kOQ0vtSHoNMha+Qfuk4ZDw7W1aFNI4612FywCCL1pMgTHm6i9PmgKzzNK6eIYn9U1gqyrUjrXwRsOKGnavTtBw9OuVt5aUpZcuccMd/T2vGo37lHjZKh0bK27ACnX4ylan95xkWVJaKIhbv7v8PESXd1BjfAgCRCz7kl/qM5C+HfMBjfcJlA6V5tdDSpxib/KiP5esULEO9Vy3gj3pZw6d14hi3GkkYaHefso39/woubqcojPkyn6OxnavQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 10:01:45.3883 (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: DM2PR0301MB0736 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some non-standard SD host controllers may use tuning block for executing tuning procedure. Signed-off-by: Yangbo Lu --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3c9a924..051b192 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2166,6 +2166,9 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) goto out_unlock; } + if (host->ops->set_tuning_block) + host->ops->set_tuning_block(host); + host->mmc->retune_period = tuning_count; sdhci_start_tuning(host); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 04af687..d43519b 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -568,6 +568,7 @@ struct sdhci_ops { int card_drv, int *drv_type); int (*start_signal_voltage_switch)(struct sdhci_host *host, unsigned char signal_voltage); + void (*set_tuning_block)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS