From patchwork Tue Dec 20 05:53:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9481159 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E17D660820 for ; Tue, 20 Dec 2016 05:54:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D375827D4D for ; Tue, 20 Dec 2016 05:54:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C866128475; Tue, 20 Dec 2016 05:54:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1C7D27DC2 for ; Tue, 20 Dec 2016 05:54:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933423AbcLTFxx (ORCPT ); Tue, 20 Dec 2016 00:53:53 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42372 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933416AbcLTFxu (ORCPT ); Tue, 20 Dec 2016 00:53:50 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A235161161; Tue, 20 Dec 2016 05:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482213229; bh=2p7eRAKKmeBwjq3JjiF5D6G8BMPP0IviQCymSGGDqhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uner87Z20SM/BQa9jLWZOdBl+UzW++sYmzlM7CxIQZRKN0MK3l0iy4RLSBw3/9SP2 PMcGiBaBy5D4J8tmQ5FPehau+QLVMrD1QreNdaqC7tei6j2oLInygmcySmLMJUyXva 9v9bbleaeq0vWfhuNb8KT7D1IlcgwDycRsSJ+t9U= Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EB9B1615B4; Tue, 20 Dec 2016 05:53:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482213229; bh=2p7eRAKKmeBwjq3JjiF5D6G8BMPP0IviQCymSGGDqhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uner87Z20SM/BQa9jLWZOdBl+UzW++sYmzlM7CxIQZRKN0MK3l0iy4RLSBw3/9SP2 PMcGiBaBy5D4J8tmQ5FPehau+QLVMrD1QreNdaqC7tei6j2oLInygmcySmLMJUyXva 9v9bbleaeq0vWfhuNb8KT7D1IlcgwDycRsSJ+t9U= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org EB9B1615B4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=riteshh@codeaurora.org From: Ritesh Harjani To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, shawn.lin@rock-chips.com, 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, Ritesh Harjani Subject: [PATCH 3/4] mmc: mmc: enable ios.enhanced_strobe before mmc_set_timing Date: Tue, 20 Dec 2016 11:23:18 +0530 Message-Id: <1482213199-29152-4-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1482213199-29152-1-git-send-email-riteshh@codeaurora.org> References: <1482213199-29152-1-git-send-email-riteshh@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);