From patchwork Fri Mar 11 08:24:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 627771 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 p2B8O8US012548 for ; Fri, 11 Mar 2011 08:24:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096Ab1CKIYL (ORCPT ); Fri, 11 Mar 2011 03:24:11 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:51293 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950Ab1CKIYK (ORCPT ); Fri, 11 Mar 2011 03:24:10 -0500 Received: from axis700.grange (pD9EB8C3C.dip0.t-ipconnect.de [217.235.140.60]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0M3wF4-1QFuGS3doY-00rfrI; Fri, 11 Mar 2011 09:24:06 +0100 Received: by axis700.grange (Postfix, from userid 1000) id 884F7189B86; Fri, 11 Mar 2011 09:24:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 85CDB189B85; Fri, 11 Mar 2011 09:24:06 +0100 (CET) Date: Fri, 11 Mar 2011 09:24:06 +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/2 v2] mmc: tmio: fix power-mode interpretation In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:N/DgPf8tcDJJkRsYCVJ0WdjF+fUwA1fhtpYaDOwq7G3 vW9q1vsePfr16GmwCOE+bGdoLyxIQ+kfRGGOuWza4SuQ+xGw5y DNouEHCL5ULpU1Rhy5we4i+hXx48fNXc4MG8z56JYjXT3i8ma0 1qmahjB50HZPx2naSbPVMpR6m/WuYh0Mui2BhXOH4x9ZYmHQde YwHRG+guMb/hefAWtzGGE9PeS/4JyddPARJYAQZB9E= 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]); Fri, 11 Mar 2011 08:24:12 +0000 (UTC) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index e1aed25..69772ab 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -746,20 +746,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) {