From: Tony Lindgren <tony@atomide.com>
To: Sukumar Ghorai <s-ghorai@ti.com>
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)
Date: Thu, 30 Sep 2010 11:38:19 -0700 [thread overview]
Message-ID: <20100930183818.GK3117@atomide.com> (raw)
In-Reply-To: <20100923230819.GS4211@atomide.com>
* Tony Lindgren <tony@atomide.com> [100923 16:00]:
> * Sukumar Ghorai <s-ghorai@ti.com> [100915 07:41]:
> > wires variable is renamed, extended and this single variable to be used to
> > pass the platform capabilities, e.g DDR mode. Also removed the hardcoded
> > value was using as bus-width.
>
> This looks like a nice clean-up, I'll queue this via the omap
> patches.
And of course this patch breaks all of mach-omap1 and omap2420.
Sukumar, your patch modified also drivers/mmc/host/omap.c and board-n8x0.c
to use caps instead of nwires. When you do things like that you absolutely
_must_test_your_changes_ before sending out any patches.
Planning on merging the following fix.
Tony
From: Tony Lindgren <tony@atomide.com>
Date: Thu, 30 Sep 2010 10:25:46 -0700
Subject: [PATCH] Subject: [PATCH] omap: Keep nwires for omap1 and 2420 MMC controller
A patch from Sukumar Ghorai <s-ghorai@ti.com> changed the
nwires to use caps instead. However, nwires is still
needed for the earlier controller.
Signed-off-by: Tony Lindgren <tony@atomide.com>
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;
next prev parent reply other threads:[~2010-09-30 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 14:49 [PATCH] omap mmc: extended to pass host capabilities from board file Sukumar Ghorai
2010-09-23 23:08 ` Tony Lindgren
2010-09-30 18:38 ` Tony Lindgren [this message]
2010-10-01 5:23 ` [PATCH] omap: Keep nwires for omap1 and 2420 MMC controller (Re: [PATCH] omap mmc: extended to pass host capabilities from board file) Ghorai, Sukumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100930183818.GK3117@atomide.com \
--to=tony@atomide.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).