Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752809AbbBYKhl (ORCPT ); Wed, 25 Feb 2015 05:37:41 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:49726 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbbBYKhj (ORCPT ); Wed, 25 Feb 2015 05:37:39 -0500 X-AuditID: cbfee68e-f79b46d000002b74-ba-54eda5f10723 Message-id: <54EDA5F1.2060203@samsung.com> Date: Wed, 25 Feb 2015 19:37:37 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-version: 1.0 To: Addy Ke , ulf.hansson@linaro.org, olof@lixom.net, heiko@sntech.de Cc: huangtao@rock-chips.com, lintao@rock-chips.com, cf@rock-chips.com, linux-rockchip@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] mmc: dw_mmc: rockchip: add support MMC_CAP_RUNTIME_RESUME capability References: <1423812140-24196-1-git-send-email-addy.ke@rock-chips.com> <1424399860-3394-1-git-send-email-addy.ke@rock-chips.com> In-reply-to: <1424399860-3394-1-git-send-email-addy.ke@rock-chips.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsWyRsSkQPfj0rchBjtPGVks+/+dyaK14xWb xf9Hr1kttiz4zmwx50OcxabH11gtLu+aw2Zx5H8/o8WnB/+ZLU5d/8xmcXxtuAO3x51re9g8 Ni+p97hyoonV4++s/Swe26/NY/b4vEkugC2KyyYlNSezLLVI3y6BK+P7ouNsBYcEKi6vv8Ta wLiYt4uRk0NCwERi6vKp7BC2mMSFe+vZuhi5OIQEljJKbNvfzQJTdO7fbGYQW0hgEaPE04tq EEWvGSXOrTgCluAV0JKY8fQuK4jNIq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WOzf0H1sEp4CZx 88QFoA4OoA49ifsXtUDCzALyEpvXvGWewCgwC8mOWQhVs5BULWBkXsUomlqQXFCclJ5rpFec mFtcmpeul5yfu4kRnACeSe9gXNVgcYhRgINRiYc3UfhNiBBrYllxZe4hRgkOZiUR3v0z34YI 8aYkVlalFuXHF5XmpBYfYjQFhsBEZinR5HxgcsoriTc0NjEzsjQyN7QwMjZXEudVsm8LERJI TyxJzU5NLUgtgulj4uCUamAs2Jj1VV9LNTJ//wNrPuEWJjdvnaPZ7o4zFNW62d8rrSy/Pi9L gEFlt2YMq9nPiZp6wWmlx28YTOC2PeFg11p0ufTaI/3/Nb6C8224+ZKOXD7/rEXwn2BFHmdp kMWH33qN54O9/y/a9a0rSmzljFO8M8KKlS+u4Lh6m/d61p7iql29y8q0/ymxFGckGmoxFxUn AgDbLAlCFgMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2298 Lines: 66 Hi, Addy. Acked-by: Jaehoon Chung Thanks! Best Regards, Jaehoon Chung On 02/20/2015 11:37 AM, Addy Ke wrote: > To support HS200 and UHS mode, mmc core will call init_card() to > execute tuning: > - sdio: init_card can be executed at runtime resume. > - sd and mmc: init_card can be executed at resume or runtime resume, > which depends on MMC_CAP_RUNTIME_RESUME capability. > > On rk3288 SoC, host will get DRTO interrupt when host send command > to read tuning data. This will spend more than 111ms: > drto_ms = drto_clks * 1000 / bus_hz = 111ms. > > And the total tuning time will be more than 400ms. > > So we should add MMC_CAP_RUNTIME_RESUME capability to execute tuning > at runtime resume. Only if we do so, can we pass resume test. > > Reviewed-by: Doug Anderson > Signed-off-by: Addy Ke > --- > Changes in v2: > - add this capability for all 4 slots, suggested by Doug Anderson. > > drivers/mmc/host/dw_mmc-rockchip.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c > index e2a726a..dbf166f 100644 > --- a/drivers/mmc/host/dw_mmc-rockchip.c > +++ b/drivers/mmc/host/dw_mmc-rockchip.c > @@ -76,12 +76,20 @@ static int dw_mci_rockchip_init(struct dw_mci *host) > return 0; > } > > +/* Common capabilities of RK3288 SoC */ > +static unsigned long dw_mci_rk3288_dwmmc_caps[4] = { > + MMC_CAP_RUNTIME_RESUME, /* emmc */ > + MMC_CAP_RUNTIME_RESUME, /* sdmmc */ > + MMC_CAP_RUNTIME_RESUME, /* sdio0 */ > + MMC_CAP_RUNTIME_RESUME, /* sdio1 */ > +}; > static const struct dw_mci_drv_data rk2928_drv_data = { > .prepare_command = dw_mci_rockchip_prepare_command, > .init = dw_mci_rockchip_init, > }; > > static const struct dw_mci_drv_data rk3288_drv_data = { > + .caps = dw_mci_rk3288_dwmmc_caps, > .prepare_command = dw_mci_rockchip_prepare_command, > .set_ios = dw_mci_rk3288_set_ios, > .setup_clock = dw_mci_rk3288_setup_clock, > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/