From patchwork Wed May 4 07:14:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9011081 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CC788BF29F for ; Wed, 4 May 2016 07:14:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 150B32026F for ; Wed, 4 May 2016 07:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27E54202F0 for ; Wed, 4 May 2016 07:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751378AbcEDHOn (ORCPT ); Wed, 4 May 2016 03:14:43 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:39225 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757087AbcEDHOi (ORCPT ); Wed, 4 May 2016 03:14:38 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O6N00DVV5GC9N20@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Wed, 04 May 2016 16:14:36 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.116]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 37.38.04998.B51A9275; Wed, 4 May 2016 16:14:36 +0900 (KST) X-AuditID: cbfee68d-f79646d000001386-c5-5729a15b03c0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 17.57.06657.B51A9275; Wed, 4 May 2016 16:14:35 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O6N00EIN5GBAI30@mmp2.samsung.com>; Wed, 04 May 2016 16:14:35 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com, Jaehoon Chung Subject: [PATCH 1/2] mmc: dw_mmc: retry to switch voltage when failed Date: Wed, 04 May 2016 16:14:33 +0900 Message-id: <1462346074-19113-1-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsWyRsSkRDdmoWa4wfLnTBY3frWxWhz5389o cefJelaL42vDHVg87lzbw+bxd9Z+Fo++LasYPT5vkgtgieKySUnNySxLLdK3S+DKuNOSUfCK teLN8p8sDYzXWLoYOTkkBEwkuhc+ZoKwxSQu3FvP1sXIxSEksIJR4va1+UwwRZevXmaBSMxi lPjSeYAZwvnBKLH48itGkCo2AR2J7d+Og3WICMhK/PxzgQ3EZhaIk1h09Cc7iC0s4Cqxvesd mM0ioCoxffsmVhCbV8BNYsnmu8wQ2+QkTh6bzAphP2aTWLDcEKJeQOLb5ENAV3AAxWUlNh2A KpeUOLjiBssERsEFjAyrGEVTC5ILipPSiwz1ihNzi0vz0vWS83M3MQJD8fS/Z707GG8fsD7E KMDBqMTD+9JbM1yINbGsuDL3EKMp0IaJzFKiyfnAgM8riTc0NjOyMDUxNTYytzRTEudVlPoZ LCSQnliSmp2aWpBaFF9UmpNafIiRiYNTqoEx26RbLqqhVGPygS0GLa8qzGcsvBJ4dGGRKYNK ZUSASpbGGmODT7t/z/PfID3J9Gm2egVj2n+R92yROi28lw4b8WSdXBE2o8ajbOOt7fsEXR34 mVWcux48ismPytvMKfhqm67/ju8csYvr/3XLLlepcPt6LVDecvLJ4Feil6uOfCwvyPx05aoS S3FGoqEWc1FxIgC3m6F+QAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQd3ohZrhBjdXWVrc+NXGanHkfz+j xZ0n61ktjq8Nd2DxuHNtD5vH31n7WTz6tqxi9Pi8SS6AJaqB0SYjNTEltUghNS85PyUzL91W yTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMHaKWSQlliTilQKCCxuFhJ3w7ThNAQN10L mMYIXd+QILgeIwM0kLCGMeNOS0bBK9aKN8t/sjQwXmPpYuTkkBAwkbh89TKULSZx4d56ti5G Lg4hgVmMEl86DzBDOD8YJRZffsUIUsUmoCOx/dtxJhBbREBW4uefC2wgNrNAnMSioz/ZQWxh AVeJ7V3vwGwWAVWJ6ds3sYLYvAJuEks232WG2CYncfLYZNYJjNwLGBlWMUqkFiQXFCel5xrm pZbrFSfmFpfmpesl5+duYgQH/DOpHYwHd7kfYhTgYFTi4X3hrRkuxJpYVlyZe4hRgoNZSYR3 +TygEG9KYmVValF+fFFpTmrxIUZToAMmMkuJJucDozGvJN7Q2MTMyNLI3NDCyNhcSZz38f91 YUIC6YklqdmpqQWpRTB9TBycUg2MMUfeaL40tt91SWxN/aqTi4K9ZVhZyldclixbc0mdSf24 ylmen+FzdL2u9KvmCh3Z59kw3yT4CvOb1zcuvtux7ZTfibOXPdW47rDV5yXOKb51YqvcfY/+ s6/SGn66nD05SXu11f/z9zW7gvbeWKCSLr5qU/bRliZ+zpXJt9Zvqurz2Zq/Q3K2jhJLcUai oRZzUXEiADx08rGOAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 If vqmmc is used and failed to switch voltage, then retry to switch voltage. MMC core is providing the retrying scheame. Signed-off-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 9dd1bd3..28602cc 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1416,7 +1416,7 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) dev_dbg(&mmc->class_dev, "Regulator set error %d - %s V\n", ret, uhs & v18 ? "1.8" : "3.3"); - return ret; + return -EAGAIN; } } mci_writel(host, UHS_REG, uhs);