Message ID | 20171002122743.32334-3-jbrunet@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 1225660365 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:29:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0438E1FFAD for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:29:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECCE92018F; Mon, 2 Oct 2017 12:29:07 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AC9951FFAD for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yYptAtyMl0GOj8IIxTKVxXnguQe7Qjn34qRILcAn2Cc=; b=rezz+EOoq/CEhq0mGBOWQoHqiT +13+SyPC9qKaqtgKQUed3+EMB8DtgzgCq3CZ6IGDKJ/amg2J5DLD455WrtQ6p4sK8VGsf5C1skm83 c73VbFh1A8fV5IiRie8oV9mMlVbKX/Mtn6T+HrGcU/Bytvm5LJim/SGIWbUWgCkeExp9O8fDM4c/s BUzguU/+DV4SjT6jdiQ7xBqHcwSPKKhfLo8n1xyeMQ2UhjarHUcMgiKLo3cqWh7me1rpB++I0crob yBDBxz5y8FCyp4HB3rs42oSyFkeRuucBuLaUww/+6MOevd/ph6qL8e3Igv0Xfm+JZwyZj2gSDThfU wKmAF/yw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dyzqG-0001Bw-Ei; Mon, 02 Oct 2017 12:29:00 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyzpV-0000PF-QE for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 12:28:18 +0000 Received: by mail-wm0-x233.google.com with SMTP id m72so10261349wmc.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 02 Oct 2017 05:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B5aNHi8LR4Wf2/fXrjR5+cPr5lKC5mPx5dEboI9Wmvo=; b=lnBi7lU3WI+0GRXMWHYo074p53OPMfuMvoykDJba4U/EIP2fDOIaaM+Mq8s78vlwrN 90bD5mkEnF5T0pTlfPX4wot+Daui54D9hmtJZtphvSEejswFsHoa8dHILBbof974mATO o6LwrDj2UYUwBTWt7dSJs7+e0/Bhi80h0C5s7yPTh6GLch30lhe37keERTjLrNOXj6ZN BiK1PuLYklPkLUrAppMj/e5XbXSvVAHExC0UI+ObONxjlGwfPaVoICujF0DrTfA3eFR/ tktqll26HTFbcEsACzpHUaEutf2yOdGLotpAgXUo0vbGC0H/f26p3lrNakdPR1DIYdc/ uOvw== 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:in-reply-to :references; bh=B5aNHi8LR4Wf2/fXrjR5+cPr5lKC5mPx5dEboI9Wmvo=; b=hQMk3JQALbDt84WQkvi+f7+gIpk7aLaXxa7UalX0wfmdPbmOuGx8j+uYXquEYyTBsZ yjbqrt3AVch8B0C5A499sJAhosVkcW6cupymLnoyZbRuPFmXyC0rKe24b8jaIE0xO7nY 871vogjElh9LclxDgOmZjudteSnTn9OJKSqQCBL9QZTRVYz4cS94V2M1g5dosraM5gXX TO3vxa1k+85mxjAut3jLaiasmIuAC1WyWz4asuCd2Fv4TG3TsAwh0jLitixLgkB8cdWN m2xnctHvg+cb1UkHnzHrN4PGngyeXYOClBpbAS+bHt0g6sLhz5eJF7gGp5CZi4NUGfoN xwtQ== X-Gm-Message-State: AHPjjUgQXtrtpi1/1bAT8TwrTJBf/NAnjSRZsFTmdNuP85DL3F99/MWR 276jjR7x7svnM7Du2AN3BCNAZw== X-Google-Smtp-Source: AOwi7QCNp0fPjCLDY9b/z8ssOqetHUDVDxYTPrgF4hpJmXD2en0HxRpmZHDJb9WwMsgCavBY8nj2Rg== X-Received: by 10.28.103.195 with SMTP id b186mr11211301wmc.86.1506947272271; Mon, 02 Oct 2017 05:27:52 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id u96sm14354287wrc.68.2017.10.02.05.27.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Oct 2017 05:27:51 -0700 (PDT) From: Jerome Brunet <jbrunet@baylibre.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Carlo Caione <carlo@caione.org>, Kevin Hilman <khilman@baylibre.com> Subject: [PATCH 2/3] mmc: meson-gx: fix rx phase reset Date: Mon, 2 Oct 2017 14:27:42 +0200 Message-Id: <20171002122743.32334-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20171002122743.32334-1-jbrunet@baylibre.com> References: <20171002122743.32334-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171002_052814_096477_F162BE9C X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet <jbrunet@baylibre.com>, linux-arm-kernel@lists.infradead.org, Heiner Kallweit <hkallweit1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 421c8719c202..08a55c2e96e1 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -745,6 +745,10 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) case MMC_POWER_UP: if (!IS_ERR(mmc->supply.vmmc)) mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); + + /* Reset rx phase */ + clk_set_phase(host->rx_clk, 0); + break; case MMC_POWER_ON: @@ -758,8 +762,6 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->vqmmc_enabled = true; } - /* Reset rx phase */ - clk_set_phase(host->rx_clk, 0); break; }
Resetting the phase when POWER_ON is set the set_ios() call means that the phase is reset almost every time the set_ios() is called, while the expected behavior was to reset the phase on a power cycle. This had gone unnoticed until now because in all mode (except hs400) the tuning is done after the last to set_ios(). In such case, the tuning result is used anyway. In HS400, there are a few calls to set_ios() after the tuning is done, overwriting the tuning result. Resetting the phase on POWER_UP instead of POWER_ON solve the problem. Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)