Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755060AbcLZHNe (ORCPT ); Mon, 26 Dec 2016 02:13:34 -0500 Received: from lucky1.263xmail.com ([211.157.147.132]:52530 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbcLZHNc (ORCPT ); Mon, 26 Dec 2016 02:13:32 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: asutoshd@codeaurora.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <89fffd0ed49fc553b7bd3a322e51f491> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH 3/4] mmc: mmc: enable ios.enhanced_strobe before mmc_set_timing To: Ritesh Harjani , ulf.hansson@linaro.org, adrian.hunter@intel.com References: <1482213199-29152-1-git-send-email-riteshh@codeaurora.org> <1482213199-29152-4-git-send-email-riteshh@codeaurora.org> <2bb5dca4-faad-fc93-1dfb-18d1e1e72961@codeaurora.org> Cc: shawn.lin@rock-chips.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, stummala@codeaurora.org, georgi.djakov@linaro.org, linux-arm-msm@vger.kernel.org, pramod.gurav@linaro.org, jeremymc@redhat.com, venkatg@codeaurora.org, asutoshd@codeaurora.org From: Shawn Lin Message-ID: Date: Mon, 26 Dec 2016 15:12:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <2bb5dca4-faad-fc93-1dfb-18d1e1e72961@codeaurora.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2064 Lines: 70 On 2016/12/23 17:18, Ritesh Harjani wrote: > Hi Shawn, > > Do you think, below change should be fine? yes. > I am still checking on what we discussed on Patch2. > > why I am asking is because - for HS400 in SDHC-MSM, we do the DLL > re-calibration as per the HW sequence. So it is done in both the cases, > for HS400 mode without and with enhanced strobe mode. > > This can be done as part of set_ios when mmc_set_timing is called in > sdhci-msm driver. > > I am still trying to check more on what would be more generic and > appropriate way inside sdhci-msm, for that I would like to know if > ios.enhanced_strobe = true before calling mmc_set_timing should be > acceptable or not ? > Sure. > > Regards > Ritesh > > On 12/20/2016 11:23 AM, Ritesh Harjani wrote: >> Some controllers may need to configure few registers based on enhanced >> strobe mode while configuring to HS400 timing, thus make >> ios.enhanced_strobe to true before mmc_set_timing in mmc_select_hs400es. >> >> Signed-off-by: Ritesh Harjani >> --- >> drivers/mmc/core/mmc.c | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c >> index eb69497..052368e 100644 >> --- a/drivers/mmc/core/mmc.c >> +++ b/drivers/mmc/core/mmc.c >> @@ -1327,12 +1327,18 @@ static int mmc_select_hs400es(struct mmc_card >> *card) >> goto out_err; >> } >> >> + /* >> + * Enable enhanced_strobe in ios, as some controllers >> + * may need to configure few registers based on enhanced >> + * strobe while changing HS400 timing. >> + */ >> + host->ios.enhanced_strobe = true; >> + >> /* Set host controller to HS400 timing and frequency */ >> mmc_set_timing(host, MMC_TIMING_MMC_HS400); >> mmc_set_bus_speed(card); >> >> /* Controller enable enhanced strobe function */ >> - host->ios.enhanced_strobe = true; >> if (host->ops->hs400_enhanced_strobe) >> host->ops->hs400_enhanced_strobe(host, &host->ios); >> >> > -- Best Regards Shawn Lin