From patchwork Wed Dec 22 08:59:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 426411 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 oBM8vjb4012876 for ; Wed, 22 Dec 2010 08:59:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752230Ab0LVI7v (ORCPT ); Wed, 22 Dec 2010 03:59:51 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35877 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751868Ab0LVI7u (ORCPT ); Wed, 22 Dec 2010 03:59:50 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 7C712A38EA; Wed, 22 Dec 2010 09:59:45 +0100 (CET) Date: Wed, 22 Dec 2010 09:59:44 +0100 Message-ID: From: Takashi Iwai To: zhangfei gao Cc: Philip Rakity , Chris Ball , Aries Lee , Qiming Wu , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mmc: Test bus-width for old MMC devices (v2) In-Reply-To: References: <20101216234032.GA17239@void.printf.net> <50D31EC8-BD9E-4920-8CEB-2AD10DF9C5C5@marvell.com> <20101217034342.GA19673@void.printf.net> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Dec 2010 08:59:52 +0000 (UTC) === From b66b9704f8d2fefa402741fb17949224b2766b4f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 22 Dec 2010 09:54:33 +0100 Subject: [PATCH] mmc: fix mmc_set_bus_width_ddr() call without bus-width-test cap With the bus-width test patch, mmc_set_bus_width*() isn't called properly when the driver doesn't set MMC_CAP_BUS_WIDTH and no DDR mode. This patch fixes the regression by moving the call up before the cap test. Signed-off-by: Takashi Iwai --- drivers/mmc/core/mmc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 1d8409f..c86dd73 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -558,6 +558,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, EXT_CSD_BUS_WIDTH, ext_csd_bits[idx][0]); if (!err) { + mmc_set_bus_width_ddr(card->host, + bus_width, MMC_SDR_MODE); /* * If controller can't handle bus width test, * use the highest bus width to maintain @@ -565,8 +567,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, */ if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST)) break; - mmc_set_bus_width_ddr(card->host, - bus_width, MMC_SDR_MODE); err = mmc_bus_test(card, bus_width); if (!err) break;