RE: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

2010-07-26 Thread Gabay, Benzy
Ohad,

 -Original Message-
 From: Ohad Ben-Cohen [mailto:o...@wizery.com]
 Sent: Thursday, July 22, 2010 6:18 PM
 To: Gabay, Benzy
 Cc: linux-wirel...@vger.kernel.org; linux-...@vger.kernel.org; linux-
 o...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
 li...@arm.linux.org.uk; Chikkature Rajashekar, Madhusudhan; Luciano
 Coelho; a...@linux-foundation.org; San Mehat; Roger Quadros; Tony
 Lindgren; Nicolas Pitre; Pandita, Vikram; Kalle Valo
 Subject: Re: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device
 powered off
 
 Hi Gever,
 
 On Wed, Jul 21, 2010 at 9:55 PM, Gabay, Benzy ben...@ti.com wrote:
  From: Ohad Ben-Cohen [mailto:o...@wizery.com]
  Sent: Wednesday, July 21, 2010 12:34 PM
  To: linux-wirel...@vger.kernel.org; linux-...@vger.kernel.org; linux-
 o...@vger.kernel.org
  Cc: linux-arm-ker...@lists.infradead.org; li...@arm.linux.org.uk;
 Chikkature Rajashekar, Madhusudhan; Luciano Coelho; a...@linux-
 foundation.org; San Mehat; Roger Quadros; Tony Lindgren; Nicolas Pitre;
 Pandita, Vikram; Kalle Valo; Ohad Ben-Cohen
  Subject: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device
 powered off
 
  Keep the MMC3 wl1271 WLAN device powered off until its
  SDIO function driver requests otherwise.
 
  Signed-off-by: Ohad Ben-Cohen o...@wizery.com
  ---
   arch/arm/mach-omap2/board-zoom-peripherals.c |    1 +
   arch/arm/mach-omap2/hsmmc.c                  |    3 +++
   arch/arm/mach-omap2/hsmmc.h                  |    1 +
   arch/arm/plat-omap/include/plat/mmc.h        |    3 +++
   drivers/mmc/host/omap_hsmmc.c                |    3 +++
   5 files changed, 11 insertions(+), 0 deletions(-)
 
  diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
 b/arch/arm/mach-omap2/board-zoom-peripherals.c
  index 3230801..3ab9125 100644
  --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
  +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
  @@ -217,6 +217,7 @@ static struct omap2_hsmmc_info mmc[] __initdata =
 {
                 .gpio_wp        = -EINVAL,
                 .gpio_cd        = -EINVAL,
                 .ocr_mask       = MMC_VDD_165_195,
  +               .dont_power_card = true,
                 .priv_data      = omap_zoom_wlan_data,
         },
         {}      /* Terminator */
 ...
  --
  1.7.0.4
 
  [Benzy Gabay] small comment: Please make sure that all 127x related
 changes are not bounded only to MMC3.
  On OMAP4 WLAN is used on MMC5.
 
 
 The only place MMC3 is bound is in the board files (see code snippet
 above), so that should be ok.
 
 I can probably split this patch to make this more obvious just by
 reading the diffstat if you prefer.


Yep. That will be great.

Benzy


 
 
 Thanks,
 Ohad.
 
 
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

2010-07-22 Thread Ohad Ben-Cohen
Hi Gever,

On Wed, Jul 21, 2010 at 9:55 PM, Gabay, Benzy ben...@ti.com wrote:
 From: Ohad Ben-Cohen [mailto:o...@wizery.com]
 Sent: Wednesday, July 21, 2010 12:34 PM
 To: linux-wirel...@vger.kernel.org; linux-...@vger.kernel.org; 
 linux-omap@vger.kernel.org
 Cc: linux-arm-ker...@lists.infradead.org; li...@arm.linux.org.uk; Chikkature 
 Rajashekar, Madhusudhan; Luciano Coelho; a...@linux-foundation.org; San 
 Mehat; Roger Quadros; Tony Lindgren; Nicolas Pitre; Pandita, Vikram; Kalle 
 Valo; Ohad Ben-Cohen
 Subject: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

 Keep the MMC3 wl1271 WLAN device powered off until its
 SDIO function driver requests otherwise.

 Signed-off-by: Ohad Ben-Cohen o...@wizery.com
 ---
  arch/arm/mach-omap2/board-zoom-peripherals.c |    1 +
  arch/arm/mach-omap2/hsmmc.c                  |    3 +++
  arch/arm/mach-omap2/hsmmc.h                  |    1 +
  arch/arm/plat-omap/include/plat/mmc.h        |    3 +++
  drivers/mmc/host/omap_hsmmc.c                |    3 +++
  5 files changed, 11 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
 b/arch/arm/mach-omap2/board-zoom-peripherals.c
 index 3230801..3ab9125 100644
 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
 +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
 @@ -217,6 +217,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
                .gpio_wp        = -EINVAL,
                .gpio_cd        = -EINVAL,
                .ocr_mask       = MMC_VDD_165_195,
 +               .dont_power_card = true,
                .priv_data      = omap_zoom_wlan_data,
        },
        {}      /* Terminator */
...
 --
 1.7.0.4

 [Benzy Gabay] small comment: Please make sure that all 127x related changes 
 are not bounded only to MMC3.
 On OMAP4 WLAN is used on MMC5.


The only place MMC3 is bound is in the board files (see code snippet
above), so that should be ok.

I can probably split this patch to make this more obvious just by
reading the diffstat if you prefer.


Thanks,
Ohad.



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

2010-07-21 Thread Ohad Ben-Cohen
Keep the MMC3 wl1271 WLAN device powered off until its
SDIO function driver requests otherwise.

Signed-off-by: Ohad Ben-Cohen o...@wizery.com
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |1 +
 arch/arm/mach-omap2/hsmmc.c  |3 +++
 arch/arm/mach-omap2/hsmmc.h  |1 +
 arch/arm/plat-omap/include/plat/mmc.h|3 +++
 drivers/mmc/host/omap_hsmmc.c|3 +++
 5 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 3230801..3ab9125 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -217,6 +217,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.gpio_wp= -EINVAL,
.gpio_cd= -EINVAL,
.ocr_mask   = MMC_VDD_165_195,
+   .dont_power_card = true,
.priv_data  = omap_zoom_wlan_data,
},
{}  /* Terminator */
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index f06ddd2..24c4144 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -284,6 +284,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info 
*controllers)
if (c-vcc_aux_disable_is_sleep)
mmc-slots[0].vcc_aux_disable_is_sleep = 1;
 
+   if (c-dont_power_card)
+   mmc-slots[0].dont_power_card = 1;
+
mmc-slots[0].priv_data = c-priv_data;
 
/* NOTE:  MMC slots should have a Vcc regulator set up.
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h
index 434a3ed..e200786 100644
--- a/arch/arm/mach-omap2/hsmmc.h
+++ b/arch/arm/mach-omap2/hsmmc.h
@@ -23,6 +23,7 @@ struct omap2_hsmmc_info {
int ocr_mask;   /* temporary HACK */
/* Remux (pad configuation) when powering on/off */
void (*remux)(struct device *dev, int slot, int power_on);
+   booldont_power_card;/* keep card power off at boot (default is n)*/
void*priv_data; /* private data to SDIO function driver */
 };
 
diff --git a/arch/arm/plat-omap/include/plat/mmc.h 
b/arch/arm/plat-omap/include/plat/mmc.h
index 9db1617..d042494 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -140,6 +140,9 @@ struct omap_mmc_platform_data {
 
unsigned int ban_openended:1;
 
+   /* keep this card powered off at boot (default is n) */
+   unsigned int dont_power_card:1;
+
/* card private data that should be used by function driver */
void *priv_data;
} slots[OMAP_MMC_MAX_SLOTS];
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4ac548e..4fb6634 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2157,6 +2157,9 @@ static int __init omap_hsmmc_probe(struct platform_device 
*pdev)
if (mmc_slot(host).nonremovable)
mmc-caps |= MMC_CAP_NONREMOVABLE;
 
+   if (mmc_slot(host).dont_power_card)
+   mmc-caps |= MMC_CAP_DONT_POWER_CARD;
+
mmc_set_embedded_data(mmc, mmc_slot(host).priv_data);
 
omap_hsmmc_conf_bus_power(host);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

2010-07-21 Thread Gabay, Benzy
Ohad,


-Original Message-
From: Ohad Ben-Cohen [mailto:o...@wizery.com] 
Sent: Wednesday, July 21, 2010 12:34 PM
To: linux-wirel...@vger.kernel.org; linux-...@vger.kernel.org; 
linux-omap@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org; li...@arm.linux.org.uk; Chikkature 
Rajashekar, Madhusudhan; Luciano Coelho; a...@linux-foundation.org; San Mehat; 
Roger Quadros; Tony Lindgren; Nicolas Pitre; Pandita, Vikram; Kalle Valo; Ohad 
Ben-Cohen
Subject: [PATCH v2 19/20] omap: zoom: keep the MMC3 wl1271 device powered off

Keep the MMC3 wl1271 WLAN device powered off until its
SDIO function driver requests otherwise.

Signed-off-by: Ohad Ben-Cohen o...@wizery.com
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |1 +
 arch/arm/mach-omap2/hsmmc.c  |3 +++
 arch/arm/mach-omap2/hsmmc.h  |1 +
 arch/arm/plat-omap/include/plat/mmc.h|3 +++
 drivers/mmc/host/omap_hsmmc.c|3 +++
 5 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 3230801..3ab9125 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -217,6 +217,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.gpio_wp= -EINVAL,
.gpio_cd= -EINVAL,
.ocr_mask   = MMC_VDD_165_195,
+   .dont_power_card = true,
.priv_data  = omap_zoom_wlan_data,
},
{}  /* Terminator */
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index f06ddd2..24c4144 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -284,6 +284,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info 
*controllers)
if (c-vcc_aux_disable_is_sleep)
mmc-slots[0].vcc_aux_disable_is_sleep = 1;
 
+   if (c-dont_power_card)
+   mmc-slots[0].dont_power_card = 1;
+
mmc-slots[0].priv_data = c-priv_data;
 
/* NOTE:  MMC slots should have a Vcc regulator set up.
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h
index 434a3ed..e200786 100644
--- a/arch/arm/mach-omap2/hsmmc.h
+++ b/arch/arm/mach-omap2/hsmmc.h
@@ -23,6 +23,7 @@ struct omap2_hsmmc_info {
int ocr_mask;   /* temporary HACK */
/* Remux (pad configuation) when powering on/off */
void (*remux)(struct device *dev, int slot, int power_on);
+   booldont_power_card;/* keep card power off at boot (default is n)*/
void*priv_data; /* private data to SDIO function driver */
 };
 
diff --git a/arch/arm/plat-omap/include/plat/mmc.h 
b/arch/arm/plat-omap/include/plat/mmc.h
index 9db1617..d042494 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -140,6 +140,9 @@ struct omap_mmc_platform_data {
 
unsigned int ban_openended:1;
 
+   /* keep this card powered off at boot (default is n) */
+   unsigned int dont_power_card:1;
+
/* card private data that should be used by function driver */
void *priv_data;
} slots[OMAP_MMC_MAX_SLOTS];
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4ac548e..4fb6634 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2157,6 +2157,9 @@ static int __init omap_hsmmc_probe(struct platform_device 
*pdev)
if (mmc_slot(host).nonremovable)
mmc-caps |= MMC_CAP_NONREMOVABLE;
 
+   if (mmc_slot(host).dont_power_card)
+   mmc-caps |= MMC_CAP_DONT_POWER_CARD;
+
mmc_set_embedded_data(mmc, mmc_slot(host).priv_data);
 
omap_hsmmc_conf_bus_power(host);
-- 
1.7.0.4

[Benzy Gabay] small comment: Please make sure that all 127x related changes are 
not bounded only to MMC3. 
On OMAP4 WLAN is used on MMC5.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html