From patchwork Mon Mar 7 18:47:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 616391 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p27Im8ks030437 for ; Mon, 7 Mar 2011 18:48:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755115Ab1CGSry (ORCPT ); Mon, 7 Mar 2011 13:47:54 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:56317 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918Ab1CGSrw (ORCPT ); Mon, 7 Mar 2011 13:47:52 -0500 Received: from axis700.grange (pD9EB8CE6.dip0.t-ipconnect.de [217.235.140.230]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MWxmu-1PQpFJ0qRQ-00VyHb; Mon, 07 Mar 2011 19:47:49 +0100 Received: by axis700.grange (Postfix, from userid 1000) id D9B08189B86; Mon, 7 Mar 2011 19:47:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id D76A5189B85; Mon, 7 Mar 2011 19:47:48 +0100 (CET) Date: Mon, 7 Mar 2011 19:47:48 +0100 (CET) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-mmc@vger.kernel.org, Chris Ball , Ian Molton Subject: [PATCH/RFC 1/5] mmc: tmio: fix power-mode interpretation In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:UTbGhDmYPmiZO1xcSLwKmeJNDftA9dpYTuj5nj81of1 ho3XbGg/xIe6uTc268qPgZbX8yZFyP95YTlRPZ2nIFvwvdIX0W h1oFO2JCvSPb6KybMthj1F9BFmDb4w/UHpiZApkFq57xvXkvkc GpgCDzKjIujg+/MUQEGPBsT1BOt63UTf67Aq9ZX8W8Yc9hE6LD pknZtFda7PlGwrUj4Qru3ioLHSsLgyis57+U5n9Btk= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 07 Mar 2011 18:48:10 +0000 (UTC) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index f5ec5e6..91a31d2 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -1162,20 +1162,20 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (ios->clock) tmio_mmc_set_clock(host, ios->clock); - /* Power sequence - OFF -> ON -> UP */ + /* Power sequence - OFF -> UP -> ON */ switch (ios->power_mode) { case MMC_POWER_OFF: /* power down SD bus */ if (host->set_pwr) host->set_pwr(host->pdev, 0); tmio_mmc_clk_stop(host); break; - case MMC_POWER_ON: /* power up SD bus */ + case MMC_POWER_ON: /* start bus clock */ + tmio_mmc_clk_start(host); + break; + case MMC_POWER_UP: /* power up SD bus */ if (host->set_pwr) host->set_pwr(host->pdev, 1); break; - case MMC_POWER_UP: /* start bus clock */ - tmio_mmc_clk_start(host); - break; } switch (ios->bus_width) {