Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp54845imm; Thu, 30 Aug 2018 08:10:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbsPQvz5KYO3CpUPgu/7PibiZYVvIj3QqG8CDNznRTCuPudwGZyOI5wSjuNFYW16r3f3jal X-Received: by 2002:a62:2b50:: with SMTP id r77-v6mr10800631pfr.51.1535641818853; Thu, 30 Aug 2018 08:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535641818; cv=none; d=google.com; s=arc-20160816; b=A0CBF6PEzxEhADKcI57LFFgpBVSOj7LPthGBMyiuEy6aKMuEmYzpBzohIuM6irCLln y2PhxSKJs+D9byBC6hB+20rM2uaUwjmm6Fq3W2KLSEL0SzO49R10+Sfn6LUe6HdldSBi 6yR7nekfN0vY7LlpAc++zqJNBBzVrsjGjA/BICIYkFsAK492PqqRI5NgbN2Axq8/IDvS 4gLMvHVE6MZnPEfo7ZKgC+YDsEArVwkfq8ZppIsiYBjiLmHwPD3ViWbuTc9Vbhfh3WJt 8pU8aUpgbhCjitEtjlclJmW6zFmS/sFHWG5WpI5YtB5GAX8F/W0QeIwC6JDj7D6GiyxY Sy+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=jvIJQaANoSh+FJc4ZHcJXsatU3LOto81vnk3DaZhMYo=; b=miB75yPQSR2zMRJpNrkWLF3OBhHgnJbtoGYh/Rgqxs/YWMRGmbMyFAWaQUTRzAzGpr 1JE+cM2yOR78C+YMJ4ZqoaYXDSb2Ey2l95twaX0kT2rMrbTCr/tjFEri09wlSZOD3IEt UBnHDGJByswoBoCmMBPAi5XjBnbkiCvozumL9YOd3mJkOEoT910VE/XDvcUY4VdjYlnr 2dECX+LG83hNZ/3gi7sD0a7VjxJgNggBfT9TnRv92FPgUl+gOZANdaEp5+T91OFvlYH4 Bw/9QRW12fJddtRO+xVDzvzrakJvukKV2KpJRsn0zij2CR8wvTJb/+6nbnLSoVEW77eX q6qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d70-v6si7193161pfd.114.2018.08.30.08.09.58; Thu, 30 Aug 2018 08:10:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729698AbeH3TKQ (ORCPT + 99 others); Thu, 30 Aug 2018 15:10:16 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:2664 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728787AbeH3TKP (ORCPT ); Thu, 30 Aug 2018 15:10:15 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 30 Aug 2018 08:07:39 -0700 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 30 Aug 2018 08:07:39 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 30 Aug 2018 08:07:39 -0700 Received: from HQMAIL112.nvidia.com (172.18.146.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 30 Aug 2018 15:07:38 +0000 Received: from HQMAIL104.nvidia.com (172.18.146.11) by HQMAIL112.nvidia.com (172.18.146.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 30 Aug 2018 15:07:38 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 30 Aug 2018 15:07:38 +0000 Received: from dhcp-10-21-25-168.Nvidia.com (Not Verified[10.21.25.201]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Thu, 30 Aug 2018 08:07:38 -0700 From: Aapo Vienamo To: Rob Herring , Mark Rutland , Thierry Reding , Jonathan Hunter , Ulf Hansson , Adrian Hunter , Mikko Perttunen , "Stefan Agner" CC: , , , , Aapo Vienamo Subject: [PATCH v3 17/38] mmc: tegra: Perform pad calibration after voltage switch Date: Thu, 30 Aug 2018 18:06:18 +0300 Message-ID: <20180830150639.21048-18-avienamo@nvidia.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180830150639.21048-1-avienamo@nvidia.com> References: <20180830150639.21048-1-avienamo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Run the automatic pad calibration after voltage switching if tegra_host->pad_calib_required is set. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index a3e31f18db48..71b3b3e1c648 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -587,6 +587,8 @@ static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios) { struct sdhci_host *host = mmc_priv(mmc); + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host); int ret = 0; if (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_330) { @@ -601,6 +603,9 @@ static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host *mmc, ret = tegra_sdhci_set_padctrl(host, ios->signal_voltage); } + if (tegra_host->pad_calib_required) + tegra_sdhci_pad_autocalib(host); + return ret; } -- 2.18.0