All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit
@ 2012-05-07 19:56 Russ Dill
  2012-05-07 20:31 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Dill @ 2012-05-07 19:56 UTC (permalink / raw)
  To: linux-omap; +Cc: Russ Dill

On Beagleboard-xM (all revisions) only MMC1_DAT0-MMC1_DAT3 are wired up.
Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7be8d65..3b9647a 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -523,6 +523,10 @@ static void __init omap3_beagle_init(void)
 
 	if (beagle_config.mmc1_gpio_wp != -EINVAL)
 		omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
+
+	/* All xM versions have 4-bit MMC bus */
+	if (cpu_is_omap3630())
+		mmc[0].caps &= ~MMC_CAP_8_BIT_DATA;
 	omap_hsmmc_init(mmc);
 
 	omap3_beagle_i2c_init();
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit
  2012-05-07 19:56 [PATCH] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit Russ Dill
@ 2012-05-07 20:31 ` Tony Lindgren
  2012-05-08  2:24   ` [PATCH v2] " Russ Dill
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2012-05-07 20:31 UTC (permalink / raw)
  To: Russ Dill; +Cc: linux-omap

* Russ Dill <Russ.Dill@ti.com> [120507 13:00]:
> On Beagleboard-xM (all revisions) only MMC1_DAT0-MMC1_DAT3 are wired up.
> Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4.
> 
> Signed-off-by: Russ Dill <Russ.Dill@ti.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7be8d65..3b9647a 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -523,6 +523,10 @@ static void __init omap3_beagle_init(void)
>  
>  	if (beagle_config.mmc1_gpio_wp != -EINVAL)
>  		omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
> +
> +	/* All xM versions have 4-bit MMC bus */
> +	if (cpu_is_omap3630())
> +		mmc[0].caps &= ~MMC_CAP_8_BIT_DATA;
>  	omap_hsmmc_init(mmc);
>  
>  	omap3_beagle_i2c_init();

This would be better done in omap3_beagle_init_rev as various other
things are already initialized there based on the revision.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit
  2012-05-07 20:31 ` Tony Lindgren
@ 2012-05-08  2:24   ` Russ Dill
  2012-05-09  0:14     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Dill @ 2012-05-08  2:24 UTC (permalink / raw)
  To: linux-omap; +Cc: Russ Dill

On Beagleboard-xM (all revisions) only MMC1_DAT0-MMC1_DAT3 are wired up.
Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4.

v2 - Moved logic into omap3_beagle_init_rev

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7be8d65..ae7d3a7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -83,11 +83,13 @@ static struct {
 	int usb_pwr_level;
 	int reset_gpio;
 	int usr_button_gpio;
+	int mmc_caps;
 } beagle_config = {
 	.mmc1_gpio_wp = -EINVAL,
 	.usb_pwr_level = GPIOF_OUT_INIT_LOW,
 	.reset_gpio = 129,
 	.usr_button_gpio = 4,
+	.mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
 };
 
 static struct gpio omap3_beagle_rev_gpios[] __initdata = {
@@ -145,10 +147,12 @@ static void __init omap3_beagle_init_rev(void)
 		printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
 		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
 		beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
+		beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
 		break;
 	case 2:
 		printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
 		omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
+		beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
 		break;
 	default:
 		printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@ -251,7 +255,7 @@ static void __init beagle_display_init(void)
 static struct omap2_hsmmc_info mmc[] = {
 	{
 		.mmc		= 1,
-		.caps		= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
+		.caps		= MMC_CAP_4_BIT_DATA,
 		.gpio_wp	= -EINVAL,
 		.deferred	= true,
 	},
@@ -523,6 +527,7 @@ static void __init omap3_beagle_init(void)
 
 	if (beagle_config.mmc1_gpio_wp != -EINVAL)
 		omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
+	mmc[0].caps = beagle_config.mmc_caps;
 	omap_hsmmc_init(mmc);
 
 	omap3_beagle_i2c_init();
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit
  2012-05-08  2:24   ` [PATCH v2] " Russ Dill
@ 2012-05-09  0:14     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2012-05-09  0:14 UTC (permalink / raw)
  To: Russ Dill; +Cc: linux-omap

* Russ Dill <Russ.Dill@ti.com> [120507 19:27]:
> On Beagleboard-xM (all revisions) only MMC1_DAT0-MMC1_DAT3 are wired up.
> Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4.
> 
> v2 - Moved logic into omap3_beagle_init_rev

Thanks applying into board branch.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-09  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 19:56 [PATCH] [OMAP] Mark Beagleboard-xM MMC bus as 4-bit Russ Dill
2012-05-07 20:31 ` Tony Lindgren
2012-05-08  2:24   ` [PATCH v2] " Russ Dill
2012-05-09  0:14     ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.