From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Subject: Re: [PATCH] mmc: dw_mmc: rockchip: Don't recalc the clock when it goes off Date: Thu, 16 Oct 2014 11:21:47 +0900 Message-ID: <543F2BBB.6090709@samsung.com> References: <1413304752-7823-1-git-send-email-dianders@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout3.samsung.com ([203.254.224.33]:53738 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbaJPCVu (ORCPT ); Wed, 15 Oct 2014 22:21:50 -0400 In-reply-to: <1413304752-7823-1-git-send-email-dianders@chromium.org> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Doug Anderson , Ulf Hansson , Seungwon Jeon Cc: Addy Ke , Sonny Rao , Alim Akhtar , Andrew Bresticker , heiko@sntech.de, chris@printf.net, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Hi, Doug. It looks good to me. Acked-by: Jaehoon Chung On 10/15/2014 01:39 AM, Doug Anderson wrote: > The "set_ios" function is called with a clock of 0 when the clock is > turning off. There's no reason to go through all the extra Rockchip > logic (whose goal is to make sure DIV is 0 or 1) in that case. The > Rockchip logic happened to work because the CCF will pick the lowest > possible rate when you ask it for a clock of 0, but it's silly to go > through all the remuxing and adjusting for no reason. > > Signed-off-by: Doug Anderson > --- > drivers/mmc/host/dw_mmc-rockchip.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c > index f0c2cb1..bbb4ec3 100644 > --- a/drivers/mmc/host/dw_mmc-rockchip.c > +++ b/drivers/mmc/host/dw_mmc-rockchip.c > @@ -37,6 +37,9 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios) > unsigned int cclkin; > u32 bus_hz; > > + if (ios->clock == 0) > + return; > + > /* > * cclkin: source clock of mmc controller > * bus_hz: card interface clock generated by CLKGEN >