From patchwork Thu Sep 17 05:50:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yangbo lu X-Patchwork-Id: 7202381 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E9009F380 for ; Thu, 17 Sep 2015 05:57:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92690208F4 for ; Thu, 17 Sep 2015 05:57:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A466207C6 for ; Thu, 17 Sep 2015 05:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752984AbbIQF5Q (ORCPT ); Thu, 17 Sep 2015 01:57:16 -0400 Received: from mail-bl2on0128.outbound.protection.outlook.com ([65.55.169.128]:47772 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752827AbbIQF5P (ORCPT ); Thu, 17 Sep 2015 01:57:15 -0400 Received: from BN3PR0301CA0068.namprd03.prod.outlook.com (10.160.152.164) by BN3PR0301MB1188.namprd03.prod.outlook.com (10.160.156.15) with Microsoft SMTP Server (TLS) id 15.1.268.17; Thu, 17 Sep 2015 05:57:13 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:157) by BN3PR0301CA0068.outlook.office365.com (2a01:111:e400:401e::36) with Microsoft SMTP Server (TLS) id 15.1.274.16 via Frontend Transport; Thu, 17 Sep 2015 05:57:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Thu, 17 Sep 2015 05:57:12 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t8H5ux5p032206; Wed, 16 Sep 2015 22:57:10 -0700 From: Yangbo Lu To: , CC: Yangbo Lu Subject: [v2, 2/8] mmc: sdhci: add a callback of tuning block setting Date: Thu, 17 Sep 2015 13:50:48 +0800 Message-ID: <1442469054-23644-2-git-send-email-yangbo.lu@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1442469054-23644-1-git-send-email-yangbo.lu@freescale.com> References: <1442469054-23644-1-git-send-email-yangbo.lu@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:ZQfyHHKP14GHrnvJlrclc3E3kdaTTsNhgdVlQk2KV39p74hBJfCeuFrKpRGRi+d5LDgnAagJIVcRz0Fn7Gupzq4R8YSkRULXhXBTz8oJUQalrT+NGcIXf4RxfYNaIL/s+f27HKLgIcLXHcEqHIjNk3JZ98jxtxoA/Qfnq0Bzy6/Y/oFgmobgTb/bvKmp/2uL8CInxgZI5+I8i/rlxG/KFtTJgmlLcLQ2hKQuxxjFjAyoLeC7YCGpXhhxR1zgxc9F4cfMiKnc1/CKQsjqNQkBi+1W8Ags4ytgxzMuFqcLqU4jRwQnsQ60dGfY8EVPS6HyitcPB7lSFc8Eirp2yqHp02RWgVbU5wPlbHErYvVDcCrTjY6EP9O/vV5bnGm3A32npARAkpBPUYfxxq6Lb5Hw1A== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(87936001)(5007970100001)(92566002)(77156002)(106466001)(189998001)(11100500001)(46102003)(5001960100002)(50226001)(62966003)(105606002)(2950100001)(50466002)(48376002)(107886002)(33646002)(5003940100001)(229853001)(69596002)(81156007)(36756003)(86362001)(6806004)(5001770100001)(77096005)(76176999)(5001860100001)(64706001)(50986999)(5001830100001)(19580395003)(97736004)(19580405001)(104016003)(68736005)(4001540100001)(47776003)(85426001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0301MB1188; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1188; 2:Ubn6zFRBtieZc8AToFeUlYhcRMZjjFo4K5OUjjlUW8/zAWj7adUFE56N461bW5w+YyXE041g/sraI1A90DsXxIhv2BqQ9JrB53YMkln+mWif4czPN7RENmvfyG0KRXJ1KphHiLb07oBvjEqpbFslb+0RcEkgTuaSWMaAgwGGsRk=; 3:04CKshkw3TiNu4ameLnUE3LNsmr2zPFCYfAPwbOW7ra46HouqzzwYAtlSU7M7uOWN8FDkEYBCxbH2Kw5xFdUDE8E2tD+xG5k6ztEMoZw2uqwlXkMK1Fc81ykadB/954fg0ygYnxDjBCQlItrAgnuDDoqoxTABVl/Plu2qsRO1Vhndn4oXBxywcq/F0LQBYfCkC/6xdSHqw6UGMbdlUaTs+9qxiXpZekTNj1VwBbWvN4=; 25:VJpQMe1BjGAMfOtvw5RZui00sraid30Q1UjVmdSKQP5Xf/z+BjizVVzmWeOSp9VlfdFTiB70WpdT8lG2OnZQ6PMePLveOFdhqcMz5dV3aUuZb0yR0zzlvBS9qoZJdxz9tdYFDJuPh18kdULDiqY9ulgrT8YAbZ51bty3fZeyMleuUZkQuntDKxcaiKQuO7vWGRJUkkJHZTk3lrqEq11oclAn2rotH4THM8yzB+iCyR8dgmjtQjf4to1ieHQ2b5yhhN+tzXxVN5lfCUkVU3EzIQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1188; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1188; 20:71zlr98Cd5amGHWLxrFgAeQcIwQEbORi2eMhbyqd4NY7wFsstuYp5nxfkE2OALvHA2JpE/dkOZ4vLBMumi8HFtKeQQW6uFvcNrsuuepg9CVn0tVf9bO+O4g7xjPQcZ9w0MqRlk/A1CTzz02XJLrtfJ3O/QmBIKwZ5c5u5IWLDZ1U4/mWa2v9U9SsEoLv0837wA4ATnMx/ocv7/SkseAviTeEcNb+d/0rVFWLt3FPOWpaxo8Umw1JsolHhSh6F8n6c41tYeXzVXD5zrU4rzpA+NDS0gSxAws2umm7jeYYcdanA3Wly4rBGYbsgAQk01ZIwzOMDZ9o3DOkwD8JqHq7Em05dTCjARPHvoukpPpeajE=; 4:TX87lQIE8l+JG/XqxUv1I2EDRYkPmB+oxsv0m0/ND2dEpDMcbDOZt8kb657kl4lmWyf7jtCiovxDWKl7KERVWNmvmOcJqij1UrFlJ/H/c8NDo27o7nETFHRH9ykUERHMgint2KzVoyQ775XJ1YcMF9YmxMCtWKlTnnoV+rYbj9zNbYKzzYQthmoDr3efpBhCDsofchFXv6H/lcgkA6+ZONFxfVGlaKklN5DrMQmPBS0iFvwS+S+jCB6okL1bz2qv4dj/kTpYyGK/tWARaQ3vZM0qA/hq5x+D6oHdZlNm8bv7Qti55r7ZVbo+ZHoASmYAoyk/0cpQTVxxMzz2Rs1w4wCm9pkzj3uD+XYvg5T/tOo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(5005006)(520078)(520075)(3002001); SRVR:BN3PR0301MB1188; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0301MB1188; X-Forefront-PRVS: 07025866F6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1188; 23:sT8g4ZcqS+pdzYq4TMAZBvB9TTjIWHsmaqee7/l?= =?us-ascii?Q?uzuWAgv7aOv2KmJ7iLWr6RBO7fewkyUA6hEVNGS71CCV+3149Dguj+xUund6?= =?us-ascii?Q?0u7lpNO+B6ERWxWXkUTOMHSYw+Pf9Pt7AJ7AgpfsqTNnuuqS2bAxcw95vkVj?= =?us-ascii?Q?JiK5bCLZpKiDjHGQfD6JLEp03ATqH7QEGoWLHVkm3lSa40Vb+FP6GcTfSUhh?= =?us-ascii?Q?avk9GUKHFvlBznBn2rAUBdr2Fd1qQGne+EMGgoCSEtw/0i1hvQ4Wop0v43Yf?= =?us-ascii?Q?A1ErcEFTZ2JZE7A03JyQazs1PYl9RnXYmTXhdd1/q5zUEKoP+F/B7h/sRuJe?= =?us-ascii?Q?Gje2zd1HgnBTYIVuESMrVAVfg+fnGvNsg2SovkGd28svIoR3DywBkuB8F1IV?= =?us-ascii?Q?dTKqz/CeNPZJWPZwsVrEVL02EWBl/l3UYQ2hMJxJVIWuKSs05/RSIm3WqPZg?= =?us-ascii?Q?dEmzLopnwMts3YBgij7YepWf/ecLQlc3q/X6BiVs6hRZJ/CMTNlVi6BYB+ZG?= =?us-ascii?Q?FLaOGDuC45whcrDA7Ls1zxtkdACV1M1xVOsVibHqzx2laORu762YSrTkNdsn?= =?us-ascii?Q?pKmoi0+KGnIFrCMqEfbafMRLB8s1BUUUL2ADCc1ugzohZiBq1cnsYqHZ8ivC?= =?us-ascii?Q?7RDkprHOhiK0WHRFM/NEgn/utbxLnT5tsFcVS0pg97gJUXYLGSBDHq3INoPs?= =?us-ascii?Q?PnzfA6k630P7N+uZI3hRxJzs70fTWyRfSiqnvezPULUfG0ejRrOqqvi3LtgL?= =?us-ascii?Q?ZXWHt4fBdCCfdnhHTuqT79U1dwk+6nmNusOE7Rvx6YNyIgg8Sv/ttUQxYVsG?= =?us-ascii?Q?33R1Ehz1+OnHELyLDR2nfWv+jpM+1Rj0y3UsnVIj4wOmzJ/qpwDZZ+UeZzng?= =?us-ascii?Q?ZtjPjK0HAwaXxITOUksiQH+bko0X/gBY6NF2TZUnSbA/AGi9YPdfhhhBtk3B?= =?us-ascii?Q?7k0TOgemE24BANMbrASsS2NHLlGzFRTfuJtWRo6eQxOseuVlpty/sWShNwsF?= =?us-ascii?Q?HuYOhy8OUWYTJW1rOaAm02SVwJeViXO2XKGhNbxxBJxLlKH6smg3mp+eWvPh?= =?us-ascii?Q?t3z+YS5SiZ6T01TGqAwWz01rFCxRisHFuq/rHhQYhNsq6OA0PYN8fn10ZhWY?= =?us-ascii?Q?hzhcvgkTIqzEm69W/gn9TyiJ+Urfyl/wzPxN9Sdh9fIAvzJ/zVY7/NezyzoN?= =?us-ascii?Q?X9DV5KERtEX7eYePM1ZQnfEaOoUyvDnKwwlLN6bPxlwFDaJmYoVG7V5eibp4?= =?us-ascii?Q?jshoBfUB08umSdAys4wz2x3kq3JhtWfDvrw0Ccw86?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1188; 5:Zg0dgJkblNlUz+gzwGm85gJ5ooqZWph7qEX6KwXiOBl7wuWyFQsceYRlCkTrD1XkdJMpEUETp/FSNCMaw1/bcPSmhJISyg/LJXE+ZWSsPR5iEw2Jyi+n0oVvTXhI6zPJXZQ6/8IAcJy47nVbCe6sxg==; 24:t5wvMGtuLoX2O4moNo/leAt4XXeDLhHXLWJ86mmiF0efb3ea5pxc9ebWZZW/0fwL9laMpLQQKT8oSvPIb0VEK8oNp/2xEoLtrJ4D7STJqGo=; 20:icNlyzRzmIvUNC6vyKmpD+lbTJB8LBV/7hmT5oaRHv5mnrk2O9cG9c+ntfv/Q4CjjRGWDR6ssFD/P7ZTupzBoA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 05:57:12.7119 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1188 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a tuning block setting callback to let host set its tuning block before 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 9b3d4c2..9da4644 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1939,6 +1939,9 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) return err; } + if (host->ops->set_tuning_block) + host->ops->set_tuning_block(host); + ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl |= SDHCI_CTRL_EXEC_TUNING; if (host->quirks2 & SDHCI_QUIRK2_TUNING_WORK_AROUND) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 723f034..98f239b 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -546,6 +546,7 @@ struct sdhci_ops { int card_drv, int *drv_type); void (*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