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: 10418733 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 D0EAC60224 for ; Tue, 22 May 2018 14:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C018028C73 for ; Tue, 22 May 2018 14:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B40F128C7D; Tue, 22 May 2018 14:26:38 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 6DAE928C73 for ; Tue, 22 May 2018 14:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751236AbeEVO0g (ORCPT ); Tue, 22 May 2018 10:26:36 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36196 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbeEVO0g (ORCPT ); Tue, 22 May 2018 10:26:36 -0400 Received: by mail-wm0-f67.google.com with SMTP id n10-v6so344906wmc.1 for ; Tue, 22 May 2018 07:26:35 -0700 (PDT) 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=qu/JgHI0lPxztPBMjTuNBrl7dvhQoVA99PdZXOw1bfK5yHcqtCpQJLiNKyZbU2iRjW GRUeOtFguDn2y9X+q+oYbZC6Jhp34L19Vq2DgW+QH3uSfv1mH5Y5v5fDCzVLtaJIL9+A nynWX719HxLz2ethf0u2Ka8/cuO0lA04oYEg4FecGoikexKEflZ5wAGO278/NqgJXNxF sNdC8ysTpEFIJYxmOLizmkciQlHE9nmcsm7DndQqbrDuVWGPdX0wWH4JIcDNtE07aYUg fxFovP5rrYuyLRzYEpyhh/eaimT6NkGPdCyYcYAP6wipl7KCcwO8h8swIH7D+xe6jiL1 OIrg== X-Gm-Message-State: ALKqPwdA17OqdA5UeZQYhth0Yoo1E+Sh6rYr0AEROVcFGGyAgmy0fCK/ /1/DroIi/5xpmcokbUBxP1LmjiySsa8= 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) 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Simon Horman --- drivers/mmc/core/host.c | 3 --- drivers/mmc/core/mmc.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) 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: