From patchwork Tue Dec 21 16:36:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 424691 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 oBLGdhWU006774 for ; Tue, 21 Dec 2010 16:39:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751957Ab0LUQje (ORCPT ); Tue, 21 Dec 2010 11:39:34 -0500 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:37725 "HELO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751020Ab0LUQjd convert rfc822-to-8bit (ORCPT ); Tue, 21 Dec 2010 11:39:33 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTRDYOwGVBj8KhVIE+YqVv/MCRyO+KHRG@postini.com; Tue, 21 Dec 2010 08:39:33 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Tue, 21 Dec 2010 08:36:25 -0800 From: Philip Rakity To: zhangfei gao CC: Takashi Iwai , Chris Ball , Aries Lee , Qiming Wu , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Tue, 21 Dec 2010 08:36:22 -0800 Subject: Re: [PATCH] mmc: Test bus-width for old MMC devices (v2) Thread-Topic: [PATCH] mmc: Test bus-width for old MMC devices (v2) Thread-Index: AcuhLTVYJ0RCpNpWQzS1UDlXGQu+tg== Message-ID: References: <20101216234032.GA17239@void.printf.net> <50D31EC8-BD9E-4920-8CEB-2AD10DF9C5C5@marvell.com> <20101217034342.GA19673@void.printf.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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]); Tue, 21 Dec 2010 16:39:44 +0000 (UTC) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 1d8409f..77072c8 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; @@ -586,7 +586,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, } else if (ddr) { mmc_card_set_ddr_mode(card); mmc_set_bus_width_ddr(card->host, bus_width, ddr); - } + } else + mmc_set_bus_width (card->host, bus_width); } if (!oldcard)