From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E711C433DF for ; Tue, 16 Jun 2020 15:41:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60C1420C56 for ; Tue, 16 Jun 2020 15:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322074; bh=mBnQN4Ex9jVGvZAugizJRWy2rfQJ1lYAFpAUvJ2znTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JIk/G7H9wbqhXF2jUTrhOIIgVEpqrCPN+tHDJb9q/Wg6ou6GyqvnMepIghAWbkDHj Z+13nFJ6Q2mDNYSalT+1LfoLS+eenrSzNw7ktuEi3VvJJUN2or5Y4uwHaJL5y8OM9B NkBnoHZhantuTDxTopxpBgDg/AC9GB6auzZCMGTY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730515AbgFPPlM (ORCPT ); Tue, 16 Jun 2020 11:41:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:56518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729861AbgFPPlJ (ORCPT ); Tue, 16 Jun 2020 11:41:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BD3F220C56; Tue, 16 Jun 2020 15:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322069; bh=mBnQN4Ex9jVGvZAugizJRWy2rfQJ1lYAFpAUvJ2znTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kf9gIYDYBV1JCRpkVKdEBzQ6h3E1XKQ/hNdJTnDua7dACBu0Z9rWqqdEZ3Y9UTGrB 8v409qdg4ymDO8KCh1Ri8WwtkSB32gz1Zp1gwE3Bjsvq6f0qBU9vXeABjT0VgAReCN Ghu+RAvBk6UD3xnLWjTNbW8WaXXeEL59q4U9Xu+U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Veerabhadrarao Badiganti , Ulf Hansson Subject: [PATCH 5.4 124/134] mmc: sdhci-msm: Clear tuning done flag while hs400 tuning Date: Tue, 16 Jun 2020 17:35:08 +0200 Message-Id: <20200616153106.725964658@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200616153100.633279950@linuxfoundation.org> References: <20200616153100.633279950@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Veerabhadrarao Badiganti commit 9253d71011c349d5f5cc0cebdf68b4a80811b92d upstream. Clear tuning_done flag while executing tuning to ensure vendor specific HS400 settings are applied properly when the controller is re-initialized in HS400 mode. Without this, re-initialization of the qcom SDHC in HS400 mode fails while resuming the driver from runtime-suspend or system-suspend. Fixes: ff06ce417828 ("mmc: sdhci-msm: Add HS400 platform support") Cc: stable@vger.kernel.org Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/1590678838-18099-1-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-msm.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -1113,6 +1113,12 @@ static int sdhci_msm_execute_tuning(stru msm_host->use_cdr = true; /* + * Clear tuning_done flag before tuning to ensure proper + * HS400 settings. + */ + msm_host->tuning_done = 0; + + /* * For HS400 tuning in HS200 timing requires: * - select MCLK/2 in VENDOR_SPEC * - program MCLK to 400MHz (or nearest supported) in GCC