From patchwork Thu Apr 21 07:09:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 724051 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 p3L7AawL020282 for ; Thu, 21 Apr 2011 07:10:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998Ab1DUHKf (ORCPT ); Thu, 21 Apr 2011 03:10:35 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:64944 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922Ab1DUHKe (ORCPT ); Thu, 21 Apr 2011 03:10:34 -0400 Received: from axis700.grange (pD9EB9449.dip0.t-ipconnect.de [217.235.148.73]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LkRpr-1PaROt1UGx-00bk7x; Thu, 21 Apr 2011 09:10:00 +0200 Received: by axis700.grange (Postfix, from userid 1000) id F297A189B89; Thu, 21 Apr 2011 09:09:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id E6D28189B88; Thu, 21 Apr 2011 09:09:59 +0200 (CEST) Date: Thu, 21 Apr 2011 09:09:59 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-mmc@vger.kernel.org cc: linux-sh@vger.kernel.org, Magnus Damm , Simon Horman , Ian Molton , Chris Ball Subject: [PATCH] MMC: tmio: fix a recent regression: restore .set_ios(MMC_POWER_UP) handling Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:WIGsHZSgGyKpcni6MO++x/sV1EgsFVKR0sk2PKNbIOO vsetJBjKThxYxaeLJu61JtREaAg7LWEAZUbSAb4WsuG/f7NcwJ TTb2a/DB7ESwm6j1Ox/0bBkxtALOYRfKu8ox65Rt/QvKOqGfoY c9IBWXStCsjTRykNUIWdbutzL84c595vzYaZotyJxoExhvx7J+ GlhMUOzXwaE6jzkelcZSmXhepDDeQytHLdK5tsDWg8= Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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]); Thu, 21 Apr 2011 07:10:36 +0000 (UTC) The aggressive clock gating for TMIO MMC patch has broken switching interface power on, using MFD or platform callbacks. Restore the ios->power_mode == MMC_POWER_UP && ios->clock == 0 case handling. Signed-off-by: Guennadi Liakhovetski --- This one should go in 2.6.39 drivers/mmc/host/tmio_mmc_pio.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 6e3271d..f4fac9f 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -772,15 +772,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) tmio_mmc_set_clock(host, ios->clock); /* Power sequence - OFF -> UP -> ON */ - if (ios->power_mode == MMC_POWER_OFF || !ios->clock) { + if (ios->power_mode == MMC_POWER_UP) { + /* power up SD bus */ + if (host->set_pwr) + host->set_pwr(host->pdev, 1); + } else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) { /* power down SD bus */ if (ios->power_mode == MMC_POWER_OFF && host->set_pwr) host->set_pwr(host->pdev, 0); tmio_mmc_clk_stop(host); - } else if (ios->power_mode == MMC_POWER_UP) { - /* power up SD bus */ - if (host->set_pwr) - host->set_pwr(host->pdev, 1); } else { /* start bus clock */ tmio_mmc_clk_start(host);