From patchwork Fri Aug 4 21:35:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9882083 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 9451C603F4 for ; Fri, 4 Aug 2017 21:36:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85B9D28994 for ; Fri, 4 Aug 2017 21:36:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A9FB289E4; Fri, 4 Aug 2017 21:36:48 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 18336289AB for ; Fri, 4 Aug 2017 21:36:47 +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: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:In-Reply-To: References:List-Owner; bh=UnRvyoHak6q1nSuAOQK9oiqDGpmiptZGLr73c46ASF0=; b=dm/ YASys+iSTt7IwGas3sKICfpuxFOG7fsow2OQ1nGPVd6eg+gJAFrr9GFbNDg1usYr0bL6Kz6RH3Vt5 NPQCaWas+glvcbfp4xPPKRx+PJsEb4+tkblb2GegSn3kgIGyWEC3j8d5s04E0xUuY9xBlqNIrOQ3K Mmaawfh1oDuXk68brOdLaBgY3n1LcBfyvZYS9h52ltiKbhxLkg4VldgWrODT7YAKY3/+pIt8ZyW4H EbtW7M5rm7ZLK4HT03XpsQ9QJfqLLcW41j87K6+XTVvrVqeWi3E/MpbRRvl2W1uHSJBo0YptfYYE+ y2SXKAPH0zdCvas2I0SiO4v3rf0WS9g==; 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 1ddkGw-00006U-CL; Fri, 04 Aug 2017 21:36:42 +0000 Received: from nov-007-i542.relay.mailchannels.net ([46.232.183.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddkGr-0008VK-E2 for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2017 21:36:40 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5AFAE368ECA; Fri, 4 Aug 2017 21:36:10 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.137.196]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id BD2E33689E8; Fri, 4 Aug 2017 21:36:09 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.66.218]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.9.10); Fri, 04 Aug 2017 21:36:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Whispering-Lonely: 3ea24ed008cbb2f9_1501882570236_717976980 X-MC-Loop-Signature: 1501882570236:89168987 X-MC-Ingress-Time: 1501882570236 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 9DC19420FC; Fri, 4 Aug 2017 21:36:04 +0000 (UTC) From: Icenowy Zheng To: Ulf Hansson , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH 1/2] mmc: sunxi: fix support for new timings mode only SoCs Date: Sat, 5 Aug 2017 05:35:54 +0800 Message-Id: <20170804213555.6024-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170804_143638_229622_A994C739 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-sunxi@googlegroups.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The A83T MMC support code introduces the timings mode switch, however such a switch doesn't exist on new SoCs with only new timings mode. Only execute the switch if the SoC really have the timings mode switch, to fix the regression shown on new timings mode only SoCs (A64, H5, etc). Fixes: b0600daebf31 ("mmc: sunxi: Support controllers that can use both old and new timings") Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai --- drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 3777517982dd..59aba93beffb 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -784,7 +784,7 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host, clock <<= 1; } - if (host->use_new_timings) { + if (host->use_new_timings && host->cfg->has_timings_switch) { ret = sunxi_ccu_set_mmc_timing_mode(host->clk_mmc, true); if (ret) { dev_err(mmc_dev(mmc),