From patchwork Tue May 22 14:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 136556 Delivered-To: patches@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1704496lji; Tue, 22 May 2018 07:26:34 -0700 (PDT) X-Received: by 2002:a2e:1055:: with SMTP id j82-v6mr15736810lje.94.1526999194922; Tue, 22 May 2018 07:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526999194; cv=none; d=google.com; s=arc-20160816; b=pOcLV3VQzdCckTG4YvT2YJxzyIaJRagYzQ3qnUj7bskHPXM+dY7pV4x+yPU/Ckp0ne 5VsTQPWElZBj6neuDNQ/XM+OqhfBzBMJLSTmpsOw+6VpVdC7sULWkXZQCEtpmXE87V7n jM14ozsM970cWyuGRaOD7VFM5DHIkkZ/hoo+m/ZcGzzTjj6yrTMh2tud6bmA5Pu1mqak ALlPjYJvpT7G+ufOZ8QkL7eB4s5BU6ljOxGl+KEI1In+CgFoPlWyEOe/kHnzcKuqKrsC 1/tBcjo3w8rfJQFVpPzJqR7Pky6/Z5uRGs0nz/kfjEmtc+1JEC/u8hm2CDZBdtCy21AT e2dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=+aV+VEoMQpIRuQNGudSEJ/QJz2A/3DNiDr5bGk87oDI=; b=KXQTKGbQuM/56LqoohYZzVHDnqKLjk6NIu5Psbp6A5LcFpwcUfwCZ0t52YHhPpD3HS ytFqBH1oni+9Y5hh6ex+/R4WesrqUKmYE7Z7SFQ+MIsSQXTkXC0IEmE7IEMEPm1Oo+EU YPlClkRirmX4zmrNMGFgN62HHlUI6ncjM58cwA2Ad/PuCiC4nOxUgCKMSgT5AZ5BRdOU lkppoZk/GTIzJR7UhwO7mEU5kclcMuoZ2YTsggVw9PlKWlRx6CEc62EVxUfccxXhv3VU r4tsmJJyRTykZuNvIbDMlxJiC3nJ4x1VoBpFB+MzfAi5lVkndyg6j9eHnzAbcFZ1uVbL Dhdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XP/qWy9a; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w17-v6sor3690954ljh.94.2018.05.22.07.26.34 for (Google Transport Security); Tue, 22 May 2018 07:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XP/qWy9a; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+aV+VEoMQpIRuQNGudSEJ/QJz2A/3DNiDr5bGk87oDI=; b=XP/qWy9aPUhY0OOYkH8Rd2g0aFY8fxjAT9EePbrwfZzzAtaUKtkk+fVFH7B7sFHTgM kMaK4nRUSIWh21EmzcbbztYDN3VBEHtOzsmeUQPVFtR8lTKpAR+dgCeNsgPekDzfuW4I fwlbK0nysz+fPegBFwP2tijrlJXoyJogYpIJg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+aV+VEoMQpIRuQNGudSEJ/QJz2A/3DNiDr5bGk87oDI=; b=gjzm7gdx1hRRWjhYkbB05NbRhfU7PyPDXkR4pABm6JPUlgmpe2e8h1LwFJ607hdlLC HFtbHGCJ7bSbqt1dvPeMqHeZTfcWSFo3iKgFlMWpx9NFFIRDlGY4Gv7LAwAlwnOfX+G0 hLCVDMiPYxs2d71IHaYEy7gY6KEEF9pGy2UlnXQAEjyaXkjk8woy8lQrykQuehpdNWvY 8J9zXyF1oLwWJ8dxC2JZ6/o9D/FiOFuna8nUdWv10Sn9DknaS9NhLlIK1hvdLlYGWI9V 2wudtdCTvcc+dS2jUXWmDx0q0PTxYxEpCGsRo/doajv+NJ4FEPU/err0fwuAjpArx/ra B7CQ== X-Gm-Message-State: ALKqPwd3UYnsG0c/JRvdeCtjclmMjcjdoB08It5yoeNY1XtGBRFZcrwR sQhsqsaGCLQ109w+OKtJwVnPceEl X-Google-Smtp-Source: AB8JxZp/0TM1DZZZ+cIR4lBoM7yJApLlT648wbH1eBhmB7G9rChhWwYV7y9JzcSKvGWAlNVy8O7W9Q== X-Received: by 2002:a2e:958e:: with SMTP id w14-v6mr14624466ljh.75.1526999194734; Tue, 22 May 2018 07:26:34 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c79-v6sm2971638ljd.47.2018.05.22.07.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 May 2018 07:26:34 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Simon Horman , Wolfram Sang , Adrian Hunter Subject: [PATCH] mmc: core: Move calls to ->prepare_hs400_tuning() closer to mmc code Date: Tue, 22 May 2018 16:26:26 +0200 Message-Id: <1526999186-20128-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 Move the calls to ->prepare_hs400_tuning(), from mmc_retune() into mmc_hs400_to_hs200(), as it better belongs there, rather than being generic to all type of cards. Signed-off-by: Ulf Hansson --- drivers/mmc/core/host.c | 3 --- drivers/mmc/core/mmc.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.7.4 Reviewed-by: Simon Horman diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index c57ffff..abf9e88 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -143,9 +143,6 @@ int mmc_retune(struct mmc_host *host) goto out; return_to_hs400 = true; - - if (host->ops->prepare_hs400_tuning) - host->ops->prepare_hs400_tuning(host, &host->ios); } err = mmc_execute_tuning(host->card); diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 57a8bd3..4466f5d 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1282,6 +1282,10 @@ int mmc_hs400_to_hs200(struct mmc_card *card) mmc_set_bus_speed(card); + /* Prepare tuning for HS400 mode. */ + if (host->ops->prepare_hs400_tuning) + host->ops->prepare_hs400_tuning(host, &host->ios); + return 0; out_err: