From patchwork Thu Sep 30 18:38:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 220862 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 o8UIcSoT027537 for ; Thu, 30 Sep 2010 18:38:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018Ab0I3SiZ (ORCPT ); Thu, 30 Sep 2010 14:38:25 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:55478 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578Ab0I3SiZ (ORCPT ); Thu, 30 Sep 2010 14:38:25 -0400 Received: from c-67-188-36-105.hsd1.ca.comcast.net ([67.188.36.105] helo=localhost.localdomain) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1P1O1O-0008u9-Cr; Thu, 30 Sep 2010 18:38:22 +0000 Received: from Mutt by mutt-smtp-wrapper.pl 1.2 (www.zdo.com/articles/mutt-smtp-wrapper.shtml) X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.188.36.105 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19B1UTeamF4bpG0pKlniB1d Date: Thu, 30 Sep 2010 11:38:19 -0700 From: Tony Lindgren To: Sukumar Ghorai Cc: linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH] omap: Keep nwires for omap1 and 2420 MMC controller (Re: [PATCH] omap mmc: extended to pass host capabilities from board file) Message-ID: <20100930183818.GK3117@atomide.com> References: <1284562163-2828-1-git-send-email-s-ghorai@ti.com> <20100923230819.GS4211@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100923230819.GS4211@atomide.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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]); Thu, 30 Sep 2010 18:38:30 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index abd7e77..6bd9d9a 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -488,7 +488,7 @@ static struct omap_mmc_platform_data mmc1_data = { .max_freq = 24000000, .dma_mask = 0xffffffff, .slots[0] = { - .caps = MMC_CAP_4_BIT_DATA, + .wires = 4, .set_power = n8x0_mmc_set_power, .set_bus_mode = n8x0_mmc_set_bus_mode, .get_cover_state = n8x0_mmc_get_cover_state, diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index 4f819fc..bc85010 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h @@ -73,9 +73,16 @@ struct omap_mmc_platform_data { struct omap_mmc_slot_data { - /* 4/8 wires and any additional host capabilities - * need to OR'd all capabilities (ref. linux/mmc/host.h) */ - u32 caps; + /* + * 4/8 wires and any additional host capabilities + * need to OR'd all capabilities (ref. linux/mmc/host.h) + */ +#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2420) + u8 wires; /* Used for the MMC driver on omap1 and 2420 */ +#endif +#ifdef CONFIG_ARCH_OMAP2PLUS + u32 caps; /* Used for the MMC driver on 2430 and later */ +#endif /* * nomux means "standard" muxing is wrong on this board, and diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index a9d62cf..d98ddcf 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1317,7 +1317,7 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id) host->slots[id] = slot; mmc->caps = 0; - if (host->pdata->slots[id].caps & MMC_CAP_8_BIT_DATA) + if (host->pdata->slots[id].wires >= 4) mmc->caps |= MMC_CAP_4_BIT_DATA; mmc->ops = &mmc_omap_ops;