From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752861AbbE1IEn (ORCPT ); Thu, 28 May 2015 04:04:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbbE1IEd (ORCPT ); Thu, 28 May 2015 04:04:33 -0400 Message-ID: <5566CC0C.1050103@redhat.com> Date: Thu, 28 May 2015 10:04:28 +0200 From: Hans de Goede User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ulf Hansson CC: Michal Suchanek , linux-sunxi@googlegroups.com, Maxime Ripard , =?UTF-8?B?RGF2aWQgTGFuemVuZMO2cmZlcg==?= , Chen-Yu Tsai , Peter Griffin , linux-mmc , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] mmc: sunxi: Also set SDXC_LOW_POWER_ON References: <29e003a6fb8253b1e103f341405d4e8322e3edc2.1432491958.git.hramrach@gmail.com> <5562C90D.8070507@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 28-05-15 10:02, Ulf Hansson wrote: > On 25 May 2015 at 09:02, Hans de Goede wrote: >> Hi, >> >> On 24-05-15 20:04, Michal Suchanek wrote: >>> >>> The function sunxi_mmc_oclk_onoff filters out the SDXC_LOW_POWER_ON flag >>> but never sets it. >>> >>> Set SDXC_LOW_POWER_ON when oclk is disabled. >> >> >> Nack, looking at the datasheet I do not thing this patch actually >> does anything, according to the datasheet setting this bit to 1 results >> in: "Turn off card clock when FSM in IDLE state", iow this does mmc clock >> gating on idle automatically in hardware, since we completely disable the >> clock on clock-off by clearing SDXC_CARD_CLOCK_ON setting this bit on >> clock-off is a nop. >> >> We could consider actually setting this to safe power when setting the clock >> on, for doing that it would be good to look at the android code and see if >> it ever sets this bit and if so when. >> >> WRT CONFIG_MMC_CLKGATE we are probably better off using SDXC_LOW_POWER_ON >> then that when it is enabled. So maybe we should set SDXC_LOW_POWER_ON >> based on #ifdef WRT CONFIG_MMC_CLKGATE, and have some way to tell the >> mmc core to not do clock gating on this host ? > > I am planning to remove the entire thing for CONFIG_MMC_CLKGATE, maybe > it's time to do that now!? Removing it now sounds like a good plan to me, we would still need to look into maybe enabling SDXC_LOW_POWER_ON on sunxi in some cases to save power, but that is an orthogonal problem. Regards, Hans