From patchwork Thu Nov 8 08:35:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 1714451 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3E1733FC8F for ; Thu, 8 Nov 2012 08:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573Ab2KHIfq (ORCPT ); Thu, 8 Nov 2012 03:35:46 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:56560 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549Ab2KHIfp (ORCPT ); Thu, 8 Nov 2012 03:35:45 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD500II1UJGAMI0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Thu, 08 Nov 2012 17:35:44 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.42]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9A.74.01231.FDE6B905; Thu, 08 Nov 2012 17:35:43 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-8d-509b6edf4c10 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 4A.74.01231.FDE6B905; Thu, 08 Nov 2012 17:35:43 +0900 (KST) Received: from [10.90.51.55] by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD500LVNUJJG180@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 08 Nov 2012 17:35:43 +0900 (KST) Message-id: <509B6ED1.7030707@samsung.com> Date: Thu, 08 Nov 2012 17:35:29 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-version: 1.0 To: linux-mmc Cc: Chris Ball , Kyungmin Park , Will Newton , James Hogan , Seungwon Jeon Subject: [PATCH v3 1/4] mmc: dw-mmc: relocate the position called dw_mci_setup_bus() Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+Zlu79vNkBBv1tNhZH/vczOjB6fN4k F8AYxWWTkpqTWZZapG+XwJXxZ9Z+1oJ5XBXb37xjamA8y9HFyMkhIWAisWTLfxYIW0ziwr31 bF2MXBxCAssYJZo2fWTvYuQAK7r5kxciPp1RYu3Pw1BF7UwS6zf/Zwfp5hXQkrg2cy8TiM0i oCqx/uYtMJtNQEdi+7fjTCCDRAXCJHZuTocoF5T4Mfke2GIRAU2Jzu0rwWYyCxxglNj78SvY YmGg+ocrJEFqmIHG7G+dxgZhy0tsXvOWGWKVgMS3yYdYIO6Uldh0gBlkjITAazaJtl/fmCEe k5Q4uOIGywRGkVlIVs9CMnYWkrELGJlXMYqmFiQXFCel5xrqFSfmFpfmpesl5+duYoQEuNQO xpUNFocYBTgYlXh4NSRnBwixJpYVV+YeYpTgYFYS4V3mDBTiTUmsrEotyo8vKs1JLT7E6AN0 7URmKdHkfGD05ZXEGxobGBsaWhqamVqaGuAQVhLnbfZICRASSE8sSc1OTS1ILYIZx8TBKdXA WBeXnf/uWTH3Jld5vwcT1NO//Fny+p3Knlf65g71p/drhf7h49635l2e0ftFT8yDupcYrTWf L3j64tYpv4wzJ+ky/ul/2L/zRLGf3P+fFV2lF89eDBdMuv5ox5HPjc9TZ5k8sDr6K/md5pnZ ck35+hyHfT4uLouterG/tVVNzW1yfNLGzRVW/5VYijMSDbWYi4oTARJlccedAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsVy+t9jQd37ebMDDObfNLM48r+f0YHR4/Mm uQDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjD+z9rMWzOOq2P7mHVMD 41mOLkYODgkBE4mbP3m7GDmBTDGJC/fWs3UxcnEICUxnlFj78zCU084ksX7zf3aQKl4BLYlr M/cygdgsAqoS62/eArPZBHQktn87zgQyVFQgTGLn5nSIckGJH5PvsYDYIgKaEp3bV4LNZBY4 wCix9+NXdpB6YaD6hyskQWqYgcbsb53GBmHLS2xe85Z5AiPfLCSjZiEpm4WkbAEj8ypG0dSC 5ILipPRcQ73ixNzi0rx0veT83E2M4Ph5JrWDcWWDxSFGAQ5GJR5eDcnZAUKsiWXFlbmHGCU4 mJVEeJc5A4V4UxIrq1KL8uOLSnNSiw8x+gA9OpFZSjQ5HxjbeSXxhsYmZkaWRmbGJubGxjiE lcR5mz1SAoQE0hNLUrNTUwtSi2DGMXFwSjUwHl4Yrm1tnrtV7dWeOBOXxFrG6FBe7gM2Aht6 zPcf2fnQrZf32evStz87Et4aPTJW+Ocwt8xPhb2jdcOn53fvGH9Y+yalTiRVbfbONP7kzuDz vsuPlG6ZMG1d+CnBhvdHJvhKrpozzSfuwIQF2qu2ysx2vizI7bxgiteFxKMN4RO6/TW2zjbg UGIpzkg01GIuKk4EABrpmlnMAgAA X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org To ensure the stable clock need to enable before set the DW_MMC_CARD_NEED_INIT flag. If set DW_MMC_CARD_NEED_INIT flag, wait for 80-clock before first command after power-up. Signed-off-by: Jaehoon Chung Signed-off-by: Kyungmin Park Acked-by: Seungwon Jeon Acked-by: Will Newton --- Changelog v2-v3: - Modified the commit-message drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index c0667c8..a1369aa 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -683,9 +683,6 @@ static void __dw_mci_start_request(struct dw_mci *host, if (host->pdata->select_slot) host->pdata->select_slot(slot->id); - /* Slot specific timing and width adjustment */ - dw_mci_setup_bus(slot); - host->cur_slot = slot; host->mrq = mrq; @@ -812,6 +809,9 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (drv_data && drv_data->set_ios) drv_data->set_ios(slot->host, ios); + /* Slot specific timing and width adjustment */ + dw_mci_setup_bus(slot); + switch (ios->power_mode) { case MMC_POWER_UP: set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags);