2010-08-10 22:13:24

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 0/9] native support for wl1271 on ZOOM

This patch series adds native support for wl1271 on ZOOM.

Changes since v2:
- mmc/sdio power manipulation is removed, and will be
posted separately in the shape of mmc/sdio runtime pm.
- the platform device is back, used to deliver board-specific
platform data (i.e. irq and ref clock)

Patches are based on linux-next (as of Aug 7th), and tested
on ZOOM2.

Please note that I am going to have a very limited email access
in the next three weeks, so I might not respond right away.

Thanks,

Ohad Ben-Cohen (9):
wireless: wl1271: make wl12xx.h common to both spi and sdio
wireless: wl1271: support return value for the set power func
wireless: wl1271: add platform driver to get board data
wireless: wl1271: take irq info from private board data
wireless: wl1271: make ref_clock configurable by board
omap: hsmmc: remove unused variable
omap: zoom: add fixed regulator device for wlan
omap: hsmmc: support mmc3 regulator power control
omap: zoom: add mmc3/wl1271 device support

arch/arm/mach-omap2/board-zoom-peripherals.c | 69 +++++++++++++++
arch/arm/mach-omap2/hsmmc.c | 10 ++-
drivers/mmc/host/omap_hsmmc.c | 68 +++++++++++++--
drivers/net/wireless/wl12xx/wl1251_sdio.c | 2 +-
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +-
drivers/net/wireless/wl12xx/wl1271.h | 15 +++-
drivers/net/wireless/wl12xx/wl1271_boot.c | 9 +-
drivers/net/wireless/wl12xx/wl1271_boot.h | 1 -
drivers/net/wireless/wl12xx/wl1271_io.h | 8 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 4 +-
drivers/net/wireless/wl12xx/wl1271_sdio.c | 120 +++++++++++++++++++++++---
drivers/net/wireless/wl12xx/wl1271_spi.c | 8 ++-
include/linux/spi/wl12xx.h | 34 -------
include/linux/wl12xx.h | 35 ++++++++
14 files changed, 311 insertions(+), 74 deletions(-)
delete mode 100644 include/linux/spi/wl12xx.h
create mode 100644 include/linux/wl12xx.h



2010-08-11 11:01:43

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

On Wed, Aug 11, 2010 at 1:52 PM, Roger Quadros <[email protected]> wrote:
> On 08/11/2010 01:05 PM, Hunter Adrian (Nokia-MS/Helsinki) wrote:
>>
>> Ohad Ben-Cohen wrote:
>>>
>>> Prepare for mmc3 regulator power control by splitting the power
>>> control functions of mmc2 and mmc3, and expecting mmc3 to have
>>> a single, dedicated, regulator support.
>>
>> Why? ?Can't the controller be connected to an eMMC with 2 power
>> supplies? ?At a glance, it is not obvious why this patch is needed.
>>
> I agree with Adrian. This patch is not required at all.
>

Thanks guys, I'll check it out.

I'm about to leave until e/o August and I still have to sort out some
stuff, so I might not respond right away, but please send any comments
you may still have.

2010-08-11 16:01:40

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

On Wed, Aug 11, 2010 at 1:05 PM, Adrian Hunter <[email protected]> wrote:
> Ohad Ben-Cohen wrote:
>>
>> Prepare for mmc3 regulator power control by splitting the power
>> control functions of mmc2 and mmc3, and expecting mmc3 to have
>> a single, dedicated, regulator support.
>
> Why? ?Can't the controller be connected to an eMMC with 2 power
> supplies? ?At a glance, it is not obvious why this patch is needed.

I had ZOOM too much in mind when I did that. Removed now, thanks !

2010-08-10 22:13:42

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 5/9] wireless: wl1271: make ref_clock configurable by board

The wl1271 device is using a reference clock that may change
between board to board.

Make the ref_clock parameter configurable by the board
files that set up the device, instead of having a hard coded
value in the driver source itself.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271.h | 1 +
drivers/net/wireless/wl12xx/wl1271_boot.c | 9 +++++----
drivers/net/wireless/wl12xx/wl1271_boot.h | 1 -
drivers/net/wireless/wl12xx/wl1271_sdio.c | 1 +
drivers/net/wireless/wl12xx/wl1271_spi.c | 2 ++
include/linux/wl12xx.h | 1 +
6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 013eabb..f0988a4 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -342,6 +342,7 @@ struct wl1271 {

void (*set_power)(bool enable);
int irq;
+ int ref_clock;

spinlock_t wl_lock;

diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c
index f36430b..95c636a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_boot.c
+++ b/drivers/net/wireless/wl12xx/wl1271_boot.c
@@ -457,17 +457,18 @@ int wl1271_boot(struct wl1271 *wl)
{
int ret = 0;
u32 tmp, clk, pause;
+ int ref_clock = wl->ref_clock;

wl1271_boot_hw_version(wl);

- if (REF_CLOCK == 0 || REF_CLOCK == 2 || REF_CLOCK == 4)
+ if (ref_clock == 0 || ref_clock == 2 || ref_clock == 4)
/* ref clk: 19.2/38.4/38.4-XTAL */
clk = 0x3;
- else if (REF_CLOCK == 1 || REF_CLOCK == 3)
+ else if (ref_clock == 1 || ref_clock == 3)
/* ref clk: 26/52 */
clk = 0x5;

- if (REF_CLOCK != 0) {
+ if (ref_clock != 0) {
u16 val;
/* Set clock type (open drain) */
val = wl1271_top_reg_read(wl, OCP_REG_CLK_TYPE);
@@ -516,7 +517,7 @@ int wl1271_boot(struct wl1271 *wl)
wl1271_debug(DEBUG_BOOT, "clk2 0x%x", clk);

/* 2 */
- clk |= (REF_CLOCK << 1) << 4;
+ clk |= (ref_clock << 1) << 4;
wl1271_write32(wl, DRPW_SCRATCH_START, clk);

wl1271_set_partition(wl, &part_table[PART_WORK]);
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.h b/drivers/net/wireless/wl12xx/wl1271_boot.h
index f829699..f73b0b1 100644
--- a/drivers/net/wireless/wl12xx/wl1271_boot.h
+++ b/drivers/net/wireless/wl12xx/wl1271_boot.h
@@ -46,7 +46,6 @@ struct wl1271_static_data {
/* delay between retries */
#define INIT_LOOP_DELAY 50

-#define REF_CLOCK 2
#define WU_COUNTER_PAUSE_VAL 0x3FF
#define WELP_ARM_COMMAND_VAL 0x4

diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index b565e64..bfb18b6 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -296,6 +296,7 @@ static int __devinit wl1271_probe(struct sdio_func *func,
}

wl->irq = wlan_data->irq;
+ wl->ref_clock = wlan_data->board_ref_clock;

ret = request_irq(wl->irq, wl1271_irq, 0, DRIVER_NAME, wl);
if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c
index de56d8d..ced0a9e 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -372,6 +372,8 @@ static int __devinit wl1271_probe(struct spi_device *spi)
goto out_free;
}

+ wl->ref_clock = pdata->board_ref_clock;
+
wl->irq = spi->irq;
if (wl->irq < 0) {
wl1271_error("irq missing in platform data");
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
index 137ac89..ef6eed9 100644
--- a/include/linux/wl12xx.h
+++ b/include/linux/wl12xx.h
@@ -29,6 +29,7 @@ struct wl12xx_platform_data {
/* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
int irq;
bool use_eeprom;
+ int board_ref_clock;
};

#endif
--
1.7.0.4


2010-08-11 15:39:11

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

On Wed, Aug 11, 2010 at 11:37 AM, Roger Quadros <[email protected]> wrote:
>> + ? ? ? ? ? ? ? .ocr_mask ? ? ? = MMC_VDD_165_195,
>
> Do we really need to specify ocr_mask here?

Removed, thanks!

2010-08-10 22:19:07

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 3/9] wireless: wl1271: add platform driver to get board data

Dynamically create and register a platform driver, that will
be used to to receive board-specific information like irq and
reference clock numbers.

The driver is created dynamically in order to avoid the 1-device
limitation of a fixed platform driver name.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271.h | 12 ++++
drivers/net/wireless/wl12xx/wl1271_sdio.c | 103 +++++++++++++++++++++++++++--
2 files changed, 108 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index faa5925..013eabb 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -31,6 +31,7 @@
#include <linux/list.h>
#include <linux/bitops.h>
#include <net/mac80211.h>
+#include <linux/platform_device.h>

#include "wl1271_conf.h"
#include "wl1271_ini.h"
@@ -319,8 +320,19 @@ struct wl1271_if_operations {
void (*disable_irq)(struct wl1271 *wl);
};

+/* exact size needed for "wl1271_plat.x" */
+#define WL12XX_PLAT_NAME_LEN 14
+
+struct wl12xx_plat_instance {
+ struct platform_driver pdriver;
+ char name[WL12XX_PLAT_NAME_LEN];
+ struct wl12xx_platform_data *pdata;
+ struct completion data_ready;
+};
+
struct wl1271 {
struct platform_device *plat_dev;
+ struct wl12xx_plat_instance *pinstance;
struct ieee80211_hw *hw;
bool mac80211_registered;

diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index c41293a..5b43626 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -28,7 +28,11 @@
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/card.h>
+#include <linux/mmc/host.h>
+#include <linux/wl12xx.h>
#include <linux/gpio.h>
+#include <linux/platform_device.h>
+#include <linux/completion.h>

#include "wl1271.h"
#include "wl12xx_80211.h"
@@ -182,10 +186,84 @@ static struct wl1271_if_operations sdio_ops = {
.disable_irq = wl1271_sdio_disable_interrupts
};

+static int wl1271_plat_probe(struct platform_device *pdev)
+{
+ struct wl12xx_platform_data *pdata;
+ struct platform_driver *pdriver;
+ struct wl12xx_plat_instance *pinstance;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ wl1271_error("no platform data");
+ return -ENODEV;
+ }
+
+ pdriver = container_of(pdev->dev.driver, struct platform_driver,
+ driver);
+ pinstance = container_of(pdriver, struct wl12xx_plat_instance, pdriver);
+
+ pinstance->pdata = pdata;
+
+ complete(&pinstance->data_ready);
+
+ return 0;
+}
+
+static struct wl12xx_platform_data *wl1271_get_data(struct wl1271 *wl, int id)
+{
+ int ret;
+ struct wl12xx_plat_instance *pinstance;
+
+ #define WL1271_PLAT_NAME "wl1271_plat.%d"
+
+ pinstance = kzalloc(sizeof(*pinstance), GFP_KERNEL);
+ if (!pinstance)
+ return ERR_PTR(-ENOMEM);
+
+ init_completion(&pinstance->data_ready);
+
+ pinstance->pdriver.probe = wl1271_plat_probe;
+
+ ret = snprintf(pinstance->name, ARRAY_SIZE(pinstance->name),
+ WL1271_PLAT_NAME, id);
+ if (ret >= WL12XX_PLAT_NAME_LEN) {
+ wl1271_error("truncated plat drv name\n");
+ goto out_free;
+ }
+
+ pinstance->pdriver.driver.name = pinstance->name;
+ pinstance->pdriver.driver.owner = THIS_MODULE;
+
+ ret = platform_driver_register(&pinstance->pdriver);
+ if (ret < 0) {
+ wl1271_error("failed to register plat driver: %d", ret);
+ goto out_free;
+ }
+
+ ret = wait_for_completion_interruptible_timeout(&pinstance->data_ready,
+ msecs_to_jiffies(15000));
+ if (ret <= 0) {
+ wl1271_error("can't get platform device (%d)", ret);
+ ret = (ret == 0 ? -EAGAIN : ret);
+ goto unreg;
+ }
+
+ wl->pinstance = pinstance;
+
+ return pinstance->pdata;
+
+unreg:
+ platform_driver_unregister(&pinstance->pdriver);
+out_free:
+ kfree(pinstance);
+ return ERR_PTR(ret);
+}
+
static int __devinit wl1271_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
struct ieee80211_hw *hw;
+ struct wl12xx_platform_data *wlan_data;
struct wl1271 *wl;
int ret;

@@ -205,17 +283,24 @@ static int __devinit wl1271_probe(struct sdio_func *func,
/* Grab access to FN0 for ELP reg. */
func->card->quirks |= MMC_QUIRK_LENIENT_FN0;

+ wlan_data = wl1271_get_data(wl, func->card->host->index);
+ if (IS_ERR(wlan_data)) {
+ ret = PTR_ERR(wlan_data);
+ wl1271_error("missing wlan data (needed for irq/ref_clk)!");
+ goto out_free;
+ }
+
wl->irq = gpio_to_irq(RX71_WL1271_IRQ_GPIO);
if (wl->irq < 0) {
ret = wl->irq;
wl1271_error("could not get irq!");
- goto out_free;
+ goto put_data;
}

ret = request_irq(wl->irq, wl1271_irq, 0, DRIVER_NAME, wl);
if (ret < 0) {
wl1271_error("request_irq() failed: %d", ret);
- goto out_free;
+ goto put_data;
}

set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING);
@@ -236,13 +321,13 @@ static int __devinit wl1271_probe(struct sdio_func *func,

return 0;

- out_irq:
+out_irq:
free_irq(wl->irq, wl);
-
-
- out_free:
+put_data:
+ platform_driver_unregister(&wl->pinstance->pdriver);
+ kfree(wl->pinstance);
+out_free:
wl1271_free_hw(wl);
-
return ret;
}

@@ -253,6 +338,10 @@ static void __devexit wl1271_remove(struct sdio_func *func)
free_irq(wl->irq, wl);

wl1271_unregister_hw(wl);
+
+ platform_driver_unregister(&wl->pinstance->pdriver);
+ kfree(wl->pinstance);
+
wl1271_free_hw(wl);
}

--
1.7.0.4


2010-08-11 10:06:28

by Adrian Hunter

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

Ohad Ben-Cohen wrote:
> Prepare for mmc3 regulator power control by splitting the power
> control functions of mmc2 and mmc3, and expecting mmc3 to have
> a single, dedicated, regulator support.

Why? Can't the controller be connected to an eMMC with 2 power
supplies? At a glance, it is not obvious why this patch is needed.

>
> Signed-off-by: Ohad Ben-Cohen <[email protected]>
> ---
> arch/arm/mach-omap2/hsmmc.c | 10 ++++--
> drivers/mmc/host/omap_hsmmc.c | 67 ++++++++++++++++++++++++++++++++++++----
> 2 files changed, 66 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 1ef54b0..5d3d789 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -174,7 +174,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,
> }
> }
>
> -static void hsmmc23_before_set_reg(struct device *dev, int slot,
> +static void hsmmc2_before_set_reg(struct device *dev, int slot,
> int power_on, int vdd)
> {
> struct omap_mmc_platform_data *mmc = dev->platform_data;
> @@ -325,14 +325,16 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
> c->transceiver = 1;
> if (c->transceiver && c->wires > 4)
> c->wires = 4;
> - /* FALLTHROUGH */
> - case 3:
> if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
> /* off-chip level shifting, or none */
> - mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
> + mmc->slots[0].before_set_reg = hsmmc2_before_set_reg;
> mmc->slots[0].after_set_reg = NULL;
> }
> break;
> + case 3:
> + mmc->slots[0].before_set_reg = NULL;
> + mmc->slots[0].after_set_reg = NULL;
> + break;
> default:
> pr_err("MMC%d configuration not supported!\n", c->mmc);
> kfree(mmc);
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index d50e917..6f5cea0 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -258,7 +258,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
> return ret;
> }
>
> -static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
> +static int omap_hsmmc_2_set_power(struct device *dev, int slot, int power_on,
> int vdd)
> {
> struct omap_hsmmc_host *host =
> @@ -309,6 +309,31 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
> return ret;
> }
>
> +static int omap_hsmmc_3_set_power(struct device *dev, int slot, int power_on,
> + int vdd)
> +{
> + struct omap_hsmmc_host *host =
> + platform_get_drvdata(to_platform_device(dev));
> + int ret = 0;
> +
> + if (power_on) {
> + ret = mmc_regulator_set_ocr(host->vcc, vdd);
> + /* Enable interface voltage rail, if needed */
> + if (ret == 0 && host->vcc) {
> + ret = regulator_enable(host->vcc);
> + if (ret < 0)
> + ret = mmc_regulator_set_ocr(host->vcc, 0);
> + }
> + } else {
> + if (host->vcc)
> + ret = regulator_disable(host->vcc);
> + if (ret == 0)
> + ret = mmc_regulator_set_ocr(host->vcc, 0);
> + }
> +
> + return ret;
> +}
> +
> static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
> int vdd, int cardsleep)
> {
> @@ -319,7 +344,7 @@ static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
> return regulator_set_mode(host->vcc, mode);
> }
>
> -static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
> +static int omap_hsmmc_2_set_sleep(struct device *dev, int slot, int sleep,
> int vdd, int cardsleep)
> {
> struct omap_hsmmc_host *host =
> @@ -358,6 +383,31 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
> return regulator_enable(host->vcc_aux);
> }
>
> +static int omap_hsmmc_3_set_sleep(struct device *dev, int slot, int sleep,
> + int vdd, int cardsleep)
> +{
> + struct omap_hsmmc_host *host =
> + platform_get_drvdata(to_platform_device(dev));
> + int err = 0;
> +
> + /*
> + * If we don't see a Vcc regulator, assume it's a fixed
> + * voltage always-on regulator.
> + */
> + if (!host->vcc)
> + return 0;
> +
> + if (cardsleep) {
> + /* VCC can be turned off if card is asleep */
> + if (sleep)
> + err = mmc_regulator_set_ocr(host->vcc, 0);
> + else
> + err = mmc_regulator_set_ocr(host->vcc, vdd);
> + }
> +
> + return err;
> +}
> +
> static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
> {
> struct regulator *reg;
> @@ -370,10 +420,13 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
> mmc_slot(host).set_sleep = omap_hsmmc_1_set_sleep;
> break;
> case OMAP_MMC2_DEVID:
> - case OMAP_MMC3_DEVID:
> /* Off-chip level shifting, or none */
> - mmc_slot(host).set_power = omap_hsmmc_23_set_power;
> - mmc_slot(host).set_sleep = omap_hsmmc_23_set_sleep;
> + mmc_slot(host).set_power = omap_hsmmc_2_set_power;
> + mmc_slot(host).set_sleep = omap_hsmmc_2_set_sleep;
> + break;
> + case OMAP_MMC3_DEVID:
> + mmc_slot(host).set_power = omap_hsmmc_3_set_power;
> + mmc_slot(host).set_sleep = omap_hsmmc_3_set_sleep;
> break;
> default:
> pr_err("MMC%d configuration not supported!\n", host->id);
> @@ -386,9 +439,9 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
> /*
> * HACK: until fixed.c regulator is usable,
> * we don't require a main regulator
> - * for MMC2 or MMC3
> + * for MMC2
> */
> - if (host->id == OMAP_MMC1_DEVID) {
> + if (host->id != OMAP_MMC2_DEVID) {
> ret = PTR_ERR(reg);
> goto err;
> }


2010-08-11 20:18:34

by kishore kadiyala

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

Oops didn't notice ,,,

Thanks,
Kishore

On Thu, Aug 12, 2010 at 1:42 AM, Ohad Ben-Cohen <[email protected]> wrote:
> Hi Kishore,
>
> On Wed, Aug 11, 2010 at 11:09 PM, kishore kadiyala
> <[email protected]> wrote:
>> Since you specified the voltage source is fixed, and if MMC3 has any
>> dedicated regulator as MMC1 & MMC2 you can go with
>> Roger's comments.
>
> You are reading an old batch of the patches.
>
> Scroll down to v4 ;)
>
> Thanks,
> Ohad.
>
>> If the LDO is fixed voltage source from TWL then since regulator
>> framework supports only adjustable LDO's, I think you can
>> have ocr_mask defined as above in board file.
>>
>> Regards,
>> Kishore
>>>
>>> Removed, thanks!
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>>> the body of a message to [email protected]
>>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>>>
>>
>

2010-08-11 10:29:32

by Adrian Hunter

[permalink] [raw]
Subject: Re: [PATCH v3 6/9] omap: hsmmc: remove unused variable

Ohad Ben-Cohen wrote:
> On Wed, Aug 11, 2010 at 12:55 PM, Adrian Hunter <[email protected]> wrote:
>> Ohad Ben-Cohen wrote:
>>> Make this go away:
>>>
>>> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend':
>>> drivers/mmc/host/omap_hsmmc.c:2328: warning: unused variable 'state'
>> Was done a while ago.
>
> Are you sure ?

Oops sorry =0_o= It is still there.

>
> I can still see the unused state variable in Linus' tree:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mmc/host/omap_hsmmc.c;h=b032828c61263028963bd412a7455546d5e86ce7;hb=HEAD#l2275
>
>
>> See 1a13f8fa76c880be41d6b1e6a2b44404bcbfdf9e in linus' tree.
>
> This commit only seem to adapt to the API change (the state variable
> is not removed):
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index d25b19b..b032828 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2292,7 +2292,7 @@ static int omap_hsmmc_suspend(struct device *dev)
> }
> cancel_work_sync(&host->mmc_carddetect_work);
> mmc_host_enable(host->mmc);
> - ret = mmc_suspend_host(host->mmc, state);
> + ret = mmc_suspend_host(host->mmc);
> if (ret == 0) {
> omap_hsmmc_disable_irq(host);
> OMAP_HSMMC_WRITE(host->base, HCTL,
>
>>> Signed-off-by: Ohad Ben-Cohen <[email protected]>
>>> ---
>>> drivers/mmc/host/omap_hsmmc.c | 1 -
>>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>>> index b032828..d50e917 100644
>>> --- a/drivers/mmc/host/omap_hsmmc.c
>>> +++ b/drivers/mmc/host/omap_hsmmc.c
>>> @@ -2272,7 +2272,6 @@ static int omap_hsmmc_suspend(struct device *dev)
>>> int ret = 0;
>>> struct platform_device *pdev = to_platform_device(dev);
>>> struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
>>> - pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */
>>> if (host && host->suspended)
>>> return 0;
>>
>


2010-08-11 08:30:23

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

Hi Ohad,

On 08/11/2010 01:12 AM, ext Ohad Ben-Cohen wrote:
> Prepare for mmc3 regulator power control by splitting the power
> control functions of mmc2 and mmc3, and expecting mmc3 to have
> a single, dedicated, regulator support.
>
> Signed-off-by: Ohad Ben-Cohen<[email protected]>
> ---
> arch/arm/mach-omap2/hsmmc.c | 10 ++++--
> drivers/mmc/host/omap_hsmmc.c | 67 ++++++++++++++++++++++++++++++++++++----
> 2 files changed, 66 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 1ef54b0..5d3d789 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -174,7 +174,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,
> }
> }
>
> -static void hsmmc23_before_set_reg(struct device *dev, int slot,
> +static void hsmmc2_before_set_reg(struct device *dev, int slot,
> int power_on, int vdd)
> {
> struct omap_mmc_platform_data *mmc = dev->platform_data;
> @@ -325,14 +325,16 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
> c->transceiver = 1;
> if (c->transceiver&& c->wires> 4)
> c->wires = 4;
> - /* FALLTHROUGH */
> - case 3:
> if (mmc->slots[0].features& HSMMC_HAS_PBIAS) {
> /* off-chip level shifting, or none */
> - mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
> + mmc->slots[0].before_set_reg = hsmmc2_before_set_reg;
> mmc->slots[0].after_set_reg = NULL;
> }
> break;
> + case 3:
> + mmc->slots[0].before_set_reg = NULL;
> + mmc->slots[0].after_set_reg = NULL;
> + break;
> default:
> pr_err("MMC%d configuration not supported!\n", c->mmc);
> kfree(mmc);
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index d50e917..6f5cea0 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -258,7 +258,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
> return ret;
> }
>
> -static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
> +static int omap_hsmmc_2_set_power(struct device *dev, int slot, int power_on,
> int vdd)
> {
> struct omap_hsmmc_host *host =
> @@ -309,6 +309,31 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
> return ret;
> }
>
> +static int omap_hsmmc_3_set_power(struct device *dev, int slot, int power_on,
> + int vdd)
> +{
> + struct omap_hsmmc_host *host =
> + platform_get_drvdata(to_platform_device(dev));
> + int ret = 0;
> +
> + if (power_on) {
> + ret = mmc_regulator_set_ocr(host->vcc, vdd);

> + /* Enable interface voltage rail, if needed */
Why is this needed? In this case interface voltage rail seems to be the same as
card supply.

If you notice mmc_regulator_set_ocr code, it is doing the regulator enable, so
don't need to enable it again below.

> + if (ret == 0&& host->vcc) {
> + ret = regulator_enable(host->vcc);
> + if (ret< 0)
> + ret = mmc_regulator_set_ocr(host->vcc, 0);
> + }
> + } else {
> + if (host->vcc)
> + ret = regulator_disable(host->vcc);
> + if (ret == 0)
> + ret = mmc_regulator_set_ocr(host->vcc, 0);
> + }
> +
> + return ret;
> +}

All This can be replaced to the following to simply

if (power_on) {
return mmc_regulator_set_ocr(host->vcc, vdd);
else
return mmc_regulator_set_ocr(host->vcc, 0);

regards,
-roger

2010-08-10 22:13:53

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

Prepare for mmc3 regulator power control by splitting the power
control functions of mmc2 and mmc3, and expecting mmc3 to have
a single, dedicated, regulator support.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
arch/arm/mach-omap2/hsmmc.c | 10 ++++--
drivers/mmc/host/omap_hsmmc.c | 67 ++++++++++++++++++++++++++++++++++++----
2 files changed, 66 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 1ef54b0..5d3d789 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -174,7 +174,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,
}
}

-static void hsmmc23_before_set_reg(struct device *dev, int slot,
+static void hsmmc2_before_set_reg(struct device *dev, int slot,
int power_on, int vdd)
{
struct omap_mmc_platform_data *mmc = dev->platform_data;
@@ -325,14 +325,16 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
c->transceiver = 1;
if (c->transceiver && c->wires > 4)
c->wires = 4;
- /* FALLTHROUGH */
- case 3:
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
/* off-chip level shifting, or none */
- mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
+ mmc->slots[0].before_set_reg = hsmmc2_before_set_reg;
mmc->slots[0].after_set_reg = NULL;
}
break;
+ case 3:
+ mmc->slots[0].before_set_reg = NULL;
+ mmc->slots[0].after_set_reg = NULL;
+ break;
default:
pr_err("MMC%d configuration not supported!\n", c->mmc);
kfree(mmc);
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d50e917..6f5cea0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -258,7 +258,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
return ret;
}

-static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
+static int omap_hsmmc_2_set_power(struct device *dev, int slot, int power_on,
int vdd)
{
struct omap_hsmmc_host *host =
@@ -309,6 +309,31 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
return ret;
}

+static int omap_hsmmc_3_set_power(struct device *dev, int slot, int power_on,
+ int vdd)
+{
+ struct omap_hsmmc_host *host =
+ platform_get_drvdata(to_platform_device(dev));
+ int ret = 0;
+
+ if (power_on) {
+ ret = mmc_regulator_set_ocr(host->vcc, vdd);
+ /* Enable interface voltage rail, if needed */
+ if (ret == 0 && host->vcc) {
+ ret = regulator_enable(host->vcc);
+ if (ret < 0)
+ ret = mmc_regulator_set_ocr(host->vcc, 0);
+ }
+ } else {
+ if (host->vcc)
+ ret = regulator_disable(host->vcc);
+ if (ret == 0)
+ ret = mmc_regulator_set_ocr(host->vcc, 0);
+ }
+
+ return ret;
+}
+
static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
int vdd, int cardsleep)
{
@@ -319,7 +344,7 @@ static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
return regulator_set_mode(host->vcc, mode);
}

-static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
+static int omap_hsmmc_2_set_sleep(struct device *dev, int slot, int sleep,
int vdd, int cardsleep)
{
struct omap_hsmmc_host *host =
@@ -358,6 +383,31 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
return regulator_enable(host->vcc_aux);
}

+static int omap_hsmmc_3_set_sleep(struct device *dev, int slot, int sleep,
+ int vdd, int cardsleep)
+{
+ struct omap_hsmmc_host *host =
+ platform_get_drvdata(to_platform_device(dev));
+ int err = 0;
+
+ /*
+ * If we don't see a Vcc regulator, assume it's a fixed
+ * voltage always-on regulator.
+ */
+ if (!host->vcc)
+ return 0;
+
+ if (cardsleep) {
+ /* VCC can be turned off if card is asleep */
+ if (sleep)
+ err = mmc_regulator_set_ocr(host->vcc, 0);
+ else
+ err = mmc_regulator_set_ocr(host->vcc, vdd);
+ }
+
+ return err;
+}
+
static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
{
struct regulator *reg;
@@ -370,10 +420,13 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
mmc_slot(host).set_sleep = omap_hsmmc_1_set_sleep;
break;
case OMAP_MMC2_DEVID:
- case OMAP_MMC3_DEVID:
/* Off-chip level shifting, or none */
- mmc_slot(host).set_power = omap_hsmmc_23_set_power;
- mmc_slot(host).set_sleep = omap_hsmmc_23_set_sleep;
+ mmc_slot(host).set_power = omap_hsmmc_2_set_power;
+ mmc_slot(host).set_sleep = omap_hsmmc_2_set_sleep;
+ break;
+ case OMAP_MMC3_DEVID:
+ mmc_slot(host).set_power = omap_hsmmc_3_set_power;
+ mmc_slot(host).set_sleep = omap_hsmmc_3_set_sleep;
break;
default:
pr_err("MMC%d configuration not supported!\n", host->id);
@@ -386,9 +439,9 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
/*
* HACK: until fixed.c regulator is usable,
* we don't require a main regulator
- * for MMC2 or MMC3
+ * for MMC2
*/
- if (host->id == OMAP_MMC1_DEVID) {
+ if (host->id != OMAP_MMC2_DEVID) {
ret = PTR_ERR(reg);
goto err;
}
--
1.7.0.4


2010-08-11 10:08:49

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 6/9] omap: hsmmc: remove unused variable

On Wed, Aug 11, 2010 at 12:55 PM, Adrian Hunter <[email protected]> wrote:
> Ohad Ben-Cohen wrote:
>>
>> Make this go away:
>>
>> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend':
>> drivers/mmc/host/omap_hsmmc.c:2328: warning: unused variable 'state'
>
> Was done a while ago.

Are you sure ?

I can still see the unused state variable in Linus' tree:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mmc/host/omap_hsmmc.c;h=b032828c61263028963bd412a7455546d5e86ce7;hb=HEAD#l2275


> See 1a13f8fa76c880be41d6b1e6a2b44404bcbfdf9e in linus' tree.

This commit only seem to adapt to the API change (the state variable
is not removed):

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d25b19b..b032828 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2292,7 +2292,7 @@ static int omap_hsmmc_suspend(struct device *dev)
}
cancel_work_sync(&host->mmc_carddetect_work);
mmc_host_enable(host->mmc);
- ret = mmc_suspend_host(host->mmc, state);
+ ret = mmc_suspend_host(host->mmc);
if (ret == 0) {
omap_hsmmc_disable_irq(host);
OMAP_HSMMC_WRITE(host->base, HCTL,

>
>>
>> Signed-off-by: Ohad Ben-Cohen <[email protected]>
>> ---
>> ?drivers/mmc/host/omap_hsmmc.c | ? ?1 -
>> ?1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>> index b032828..d50e917 100644
>> --- a/drivers/mmc/host/omap_hsmmc.c
>> +++ b/drivers/mmc/host/omap_hsmmc.c
>> @@ -2272,7 +2272,6 @@ static int omap_hsmmc_suspend(struct device *dev)
>> ? ? ? ?int ret = 0;
>> ? ? ? ?struct platform_device *pdev = to_platform_device(dev);
>> ? ? ? ?struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
>> - ? ? ? pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */
>> ? ? ? ?if (host && host->suspended)
>> ? ? ? ? ? ? ? ?return 0;
>
>

2010-08-11 08:43:36

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

On 08/11/2010 01:12 AM, ext Ohad Ben-Cohen wrote:
> Add MMC3 support on ZOOM, which has the wl1271 device hardwired to.
>
> The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an
> external IRQ line, and power-controlled by a GPIO-based fixed regulator.
>
> Signed-off-by: Ohad Ben-Cohen<[email protected]>
> ---
> arch/arm/mach-omap2/board-zoom-peripherals.c | 34 ++++++++++++++++++++++++++
> 1 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
> index de88635..82776bc 100644
> --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
> +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
> @@ -17,6 +17,8 @@
> #include<linux/i2c/twl.h>
> #include<linux/regulator/machine.h>
> #include<linux/regulator/fixed.h>
> +#include<linux/mmc/host.h>
> +#include<linux/wl12xx.h>
>
> #include<asm/mach-types.h>
> #include<asm/mach/arch.h>
> @@ -29,6 +31,7 @@
> #include "hsmmc.h"
>
> #define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
> +#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
>
> /* Zoom2 has Qwerty keyboard*/
> static int board_keymap[] = {
> @@ -185,6 +188,28 @@ static struct platform_device omap_vwlan_device = {
> },
> };
>
> +struct wl12xx_platform_data omap_zoom_wlan_data = {
> + /* ZOOM ref clock is 26 MHz */
> + .board_ref_clock = 1,
> +};
> +
> +static struct resource omap_zoom_wl1271_resources[] = {
> + {
> + .start = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
> + .end = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
> + .flags = IORESOURCE_IRQ,
> + }
> +};
> +static struct platform_device omap_zoom_wl1271 = {
> + .name = "wl1271_plat.2",
> + .id = -1,
> + .resource = omap_zoom_wl1271_resources,
> + .num_resources = ARRAY_SIZE(omap_zoom_wl1271_resources),
> + .dev = {
> + .platform_data =&omap_zoom_wlan_data,
> + },
> +};
> +
> static struct omap2_hsmmc_info mmc[] __initdata = {
> {
> .name = "external",
> @@ -202,6 +227,14 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
> .nonremovable = true,
> .power_saving = true,
> },
> + {
> + .name = "wl1271",
> + .mmc = 3,
> + .wires = 4,
> + .gpio_wp = -EINVAL,
> + .gpio_cd = -EINVAL,
> + .ocr_mask = MMC_VDD_165_195,

Do we really need to specify ocr_mask here?
It seems to be set in omap_hsmmc_reg_get() by calling mmc_regulator_get_ocrmask().

This should automatically pick the right mask if you have defined the "vmmc"
regulator output voltage correctly.

regards,
-roger

2010-08-11 10:52:24

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] omap: hsmmc: split mmc23 power control

On 08/11/2010 01:05 PM, Hunter Adrian (Nokia-MS/Helsinki) wrote:
> Ohad Ben-Cohen wrote:
>> Prepare for mmc3 regulator power control by splitting the power
>> control functions of mmc2 and mmc3, and expecting mmc3 to have
>> a single, dedicated, regulator support.
>
> Why? Can't the controller be connected to an eMMC with 2 power
> supplies? At a glance, it is not obvious why this patch is needed.
>
I agree with Adrian. This patch is not required at all.

2010-08-11 21:03:14

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

On Thu, Aug 12, 2010 at 01:39:38AM +0530, kishore kadiyala wrote:

> If the LDO is fixed voltage source from TWL then since regulator
> framework supports only adjustable LDO's, I think you can

The regulator framework supports fixed voltage regulators just fine.

2010-08-11 09:55:39

by Adrian Hunter

[permalink] [raw]
Subject: Re: [PATCH v3 6/9] omap: hsmmc: remove unused variable

Ohad Ben-Cohen wrote:
> Make this go away:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend':
> drivers/mmc/host/omap_hsmmc.c:2328: warning: unused variable 'state'

Was done a while ago.

See 1a13f8fa76c880be41d6b1e6a2b44404bcbfdf9e in linus' tree.

>
> Signed-off-by: Ohad Ben-Cohen <[email protected]>
> ---
> drivers/mmc/host/omap_hsmmc.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index b032828..d50e917 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2272,7 +2272,6 @@ static int omap_hsmmc_suspend(struct device *dev)
> int ret = 0;
> struct platform_device *pdev = to_platform_device(dev);
> struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
> - pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */
>
> if (host && host->suspended)
> return 0;


2010-08-10 22:13:27

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 1/9] wireless: wl1271: make wl12xx.h common to both spi and sdio

Move wl12xx.h outside of the spi-specific location,
so it can be shared with both spi and sdio solutions.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1251_sdio.c | 2 +-
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +-
drivers/net/wireless/wl12xx/wl1271_spi.c | 2 +-
include/linux/spi/wl12xx.h | 34 -----------------------------
include/linux/wl12xx.h | 34 +++++++++++++++++++++++++++++
5 files changed, 37 insertions(+), 37 deletions(-)
delete mode 100644 include/linux/spi/wl12xx.h
create mode 100644 include/linux/wl12xx.h

diff --git a/drivers/net/wireless/wl12xx/wl1251_sdio.c b/drivers/net/wireless/wl12xx/wl1251_sdio.c
index b901b61..a319df1 100644
--- a/drivers/net/wireless/wl12xx/wl1251_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1251_sdio.c
@@ -24,7 +24,7 @@
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/platform_device.h>
-#include <linux/spi/wl12xx.h>
+#include <linux/wl12xx.h>
#include <linux/irq.h>

#include "wl1251.h"
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.c b/drivers/net/wireless/wl12xx/wl1251_spi.c
index 27fdfaa..a6faf3e 100644
--- a/drivers/net/wireless/wl12xx/wl1251_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1251_spi.c
@@ -26,7 +26,7 @@
#include <linux/slab.h>
#include <linux/crc7.h>
#include <linux/spi/spi.h>
-#include <linux/spi/wl12xx.h>
+#include <linux/wl12xx.h>

#include "wl1251.h"
#include "wl1251_reg.h"
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c
index 4cb99c5..c3fdab7 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -25,7 +25,7 @@
#include <linux/module.h>
#include <linux/crc7.h>
#include <linux/spi/spi.h>
-#include <linux/spi/wl12xx.h>
+#include <linux/wl12xx.h>
#include <linux/slab.h>

#include "wl1271.h"
diff --git a/include/linux/spi/wl12xx.h b/include/linux/spi/wl12xx.h
deleted file mode 100644
index a223ecb..0000000
--- a/include/linux/spi/wl12xx.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of wl12xx
- *
- * Copyright (C) 2009 Nokia Corporation
- *
- * Contact: Kalle Valo <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- */
-
-#ifndef _LINUX_SPI_WL12XX_H
-#define _LINUX_SPI_WL12XX_H
-
-struct wl12xx_platform_data {
- void (*set_power)(bool enable);
- /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
- int irq;
- bool use_eeprom;
-};
-
-#endif
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
new file mode 100644
index 0000000..137ac89
--- /dev/null
+++ b/include/linux/wl12xx.h
@@ -0,0 +1,34 @@
+/*
+ * This file is part of wl12xx
+ *
+ * Copyright (C) 2009 Nokia Corporation
+ *
+ * Contact: Kalle Valo <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _LINUX_WL12XX_H
+#define _LINUX_WL12XX_H
+
+struct wl12xx_platform_data {
+ void (*set_power)(bool enable);
+ /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
+ int irq;
+ bool use_eeprom;
+};
+
+#endif
--
1.7.0.4


2010-08-11 15:38:48

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

On Wed, Aug 11, 2010 at 12:01 PM, Roger Quadros <[email protected]> wrote:
> Also shouldn't .nonremovable be set to true? as this is a non-removable card
> slot.

This doesn't seem to have any effect on SDIO, but it can't hurt.

Thanks!


>
> regards,
> -roger
>

2010-08-11 09:01:53

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

On 08/11/2010 11:37 AM, Roger Quadros wrote:
> On 08/11/2010 01:12 AM, ext Ohad Ben-Cohen wrote:
>> Add MMC3 support on ZOOM, which has the wl1271 device hardwired to.
>>
>> The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an
>> external IRQ line, and power-controlled by a GPIO-based fixed regulator.
>>
>> Signed-off-by: Ohad Ben-Cohen<[email protected]>
>> ---
>> arch/arm/mach-omap2/board-zoom-peripherals.c | 34 ++++++++++++++++++++++++++
>> 1 files changed, 34 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
>> index de88635..82776bc 100644
>> --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
>> +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
>> @@ -17,6 +17,8 @@
>> #include<linux/i2c/twl.h>
>> #include<linux/regulator/machine.h>
>> #include<linux/regulator/fixed.h>
>> +#include<linux/mmc/host.h>
>> +#include<linux/wl12xx.h>
>>
>> #include<asm/mach-types.h>
>> #include<asm/mach/arch.h>
>> @@ -29,6 +31,7 @@
>> #include "hsmmc.h"
>>
>> #define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
>> +#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
>>
>> /* Zoom2 has Qwerty keyboard*/
>> static int board_keymap[] = {
>> @@ -185,6 +188,28 @@ static struct platform_device omap_vwlan_device = {
>> },
>> };
>>
>> +struct wl12xx_platform_data omap_zoom_wlan_data = {
>> + /* ZOOM ref clock is 26 MHz */
>> + .board_ref_clock = 1,
>> +};
>> +
>> +static struct resource omap_zoom_wl1271_resources[] = {
>> + {
>> + .start = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
>> + .end = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
>> + .flags = IORESOURCE_IRQ,
>> + }
>> +};
>> +static struct platform_device omap_zoom_wl1271 = {
>> + .name = "wl1271_plat.2",
>> + .id = -1,
>> + .resource = omap_zoom_wl1271_resources,
>> + .num_resources = ARRAY_SIZE(omap_zoom_wl1271_resources),
>> + .dev = {
>> + .platform_data =&omap_zoom_wlan_data,
>> + },
>> +};
>> +
>> static struct omap2_hsmmc_info mmc[] __initdata = {
>> {
>> .name = "external",
>> @@ -202,6 +227,14 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
>> .nonremovable = true,
>> .power_saving = true,
>> },
>> + {
>> + .name = "wl1271",
>> + .mmc = 3,
>> + .wires = 4,
>> + .gpio_wp = -EINVAL,
>> + .gpio_cd = -EINVAL,
>> + .ocr_mask = MMC_VDD_165_195,
>
> Do we really need to specify ocr_mask here?
> It seems to be set in omap_hsmmc_reg_get() by calling mmc_regulator_get_ocrmask().
>
> This should automatically pick the right mask if you have defined the "vmmc"
> regulator output voltage correctly.
>
Also shouldn't .nonremovable be set to true? as this is a non-removable card slot.

regards,
-roger

2010-08-10 22:13:39

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 4/9] wireless: wl1271: take irq info from private board data

Remove the hard coded irq information, and instead take
the irq information from the board's platform data.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271_sdio.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index 5b43626..b565e64 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -38,9 +38,6 @@
#include "wl12xx_80211.h"
#include "wl1271_io.h"

-
-#define RX71_WL1271_IRQ_GPIO 42
-
#ifndef SDIO_VENDOR_ID_TI
#define SDIO_VENDOR_ID_TI 0x0097
#endif
@@ -191,6 +188,7 @@ static int wl1271_plat_probe(struct platform_device *pdev)
struct wl12xx_platform_data *pdata;
struct platform_driver *pdriver;
struct wl12xx_plat_instance *pinstance;
+ int irq;

pdata = pdev->dev.platform_data;
if (!pdata) {
@@ -198,6 +196,13 @@ static int wl1271_plat_probe(struct platform_device *pdev)
return -ENODEV;
}

+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0) {
+ wl1271_error("no platform irq data");
+ return -ENODEV;
+ }
+ pdata->irq = irq;
+
pdriver = container_of(pdev->dev.driver, struct platform_driver,
driver);
pinstance = container_of(pdriver, struct wl12xx_plat_instance, pdriver);
@@ -290,12 +295,7 @@ static int __devinit wl1271_probe(struct sdio_func *func,
goto out_free;
}

- wl->irq = gpio_to_irq(RX71_WL1271_IRQ_GPIO);
- if (wl->irq < 0) {
- ret = wl->irq;
- wl1271_error("could not get irq!");
- goto put_data;
- }
+ wl->irq = wlan_data->irq;

ret = request_irq(wl->irq, wl1271_irq, 0, DRIVER_NAME, wl);
if (ret < 0) {
--
1.7.0.4


2010-08-10 22:13:31

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 2/9] wireless: wl1271: support return value for the set power func

Make it possible for the set power method to indicate a
success/failure return value. This is needed to support
more complex power on/off operations such as bringing up
(and down) sdio functions.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/net/wireless/wl12xx/wl1271.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_io.h | 8 +++++---
drivers/net/wireless/wl12xx/wl1271_main.c | 4 +++-
drivers/net/wireless/wl12xx/wl1271_sdio.c | 4 +++-
drivers/net/wireless/wl12xx/wl1271_spi.c | 4 +++-
5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index dd3cee6..faa5925 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -313,7 +313,7 @@ struct wl1271_if_operations {
bool fixed);
void (*reset)(struct wl1271 *wl);
void (*init)(struct wl1271 *wl);
- void (*power)(struct wl1271 *wl, bool enable);
+ int (*power)(struct wl1271 *wl, bool enable);
struct device* (*dev)(struct wl1271 *wl);
void (*enable_irq)(struct wl1271 *wl);
void (*disable_irq)(struct wl1271 *wl);
diff --git a/drivers/net/wireless/wl12xx/wl1271_io.h b/drivers/net/wireless/wl12xx/wl1271_io.h
index bc806c7..4a5b92c 100644
--- a/drivers/net/wireless/wl12xx/wl1271_io.h
+++ b/drivers/net/wireless/wl12xx/wl1271_io.h
@@ -144,10 +144,12 @@ static inline void wl1271_power_off(struct wl1271 *wl)
clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
}

-static inline void wl1271_power_on(struct wl1271 *wl)
+static inline int wl1271_power_on(struct wl1271 *wl)
{
- wl->if_ops->power(wl, true);
- set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+ int ret = wl->if_ops->power(wl, true);
+ if (ret == 0)
+ set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+ return ret;
}


diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 9d68f00..e6e0852 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -621,7 +621,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
int ret = 0;

msleep(WL1271_PRE_POWER_ON_SLEEP);
- wl1271_power_on(wl);
+ ret = wl1271_power_on(wl);
+ if (ret < 0)
+ goto out;
msleep(WL1271_POWER_ON_SLEEP);
wl1271_io_reset(wl);
wl1271_io_init(wl);
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index 7059b5c..c41293a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -152,7 +152,7 @@ static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf,

}

-static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
{
struct sdio_func *func = wl_to_func(wl);

@@ -167,6 +167,8 @@ static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
sdio_disable_func(func);
sdio_release_host(func);
}
+
+ return 0;
}

static struct wl1271_if_operations sdio_ops = {
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c
index c3fdab7..de56d8d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -312,10 +312,12 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
return IRQ_HANDLED;
}

-static void wl1271_spi_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_spi_set_power(struct wl1271 *wl, bool enable)
{
if (wl->set_power)
wl->set_power(enable);
+
+ return 0;
}

static struct wl1271_if_operations spi_ops = {
--
1.7.0.4


2010-08-11 20:09:39

by kishore kadiyala

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

Ohad,

On Wed, Aug 11, 2010 at 9:08 PM, Ohad Ben-Cohen <[email protected]> wrote:
> On Wed, Aug 11, 2010 at 11:37 AM, Roger Quadros <[email protected]> wrote:
>>> + ? ? ? ? ? ? ? .ocr_mask ? ? ? = MMC_VDD_165_195,
>>
>> Do we really need to specify ocr_mask here?

Since you specified the voltage source is fixed, and if MMC3 has any
dedicated regulator as MMC1 & MMC2 you can go with
Roger's comments.
If the LDO is fixed voltage source from TWL then since regulator
framework supports only adjustable LDO's, I think you can
have ocr_mask defined as above in board file.

Regards,
Kishore
>
> Removed, thanks!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

2010-08-11 20:13:11

by Ohad Ben Cohen

[permalink] [raw]
Subject: Re: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

Hi Kishore,

On Wed, Aug 11, 2010 at 11:09 PM, kishore kadiyala
<[email protected]> wrote:
> Since you specified the voltage source is fixed, and if MMC3 has any
> dedicated regulator as MMC1 & MMC2 you can go with
> Roger's comments.

You are reading an old batch of the patches.

Scroll down to v4 ;)

Thanks,
Ohad.

> If the LDO is fixed voltage source from TWL then since regulator
> framework supports only adjustable LDO's, I think you can
> have ocr_mask defined as above in board file.
>
> Regards,
> Kishore
>>
>> Removed, thanks!
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to [email protected]
>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>>
>

2010-08-10 22:13:50

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 7/9] omap: zoom: add fixed regulator device for wlan

Add a fixed regulator vmmc device to enable power control
of the wl1271 wlan device.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
arch/arm/mach-omap2/board-zoom-peripherals.c | 35 ++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6b39849..de88635 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -16,6 +16,7 @@
#include <linux/gpio.h>
#include <linux/i2c/twl.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -27,6 +28,8 @@
#include "mux.h"
#include "hsmmc.h"

+#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
+
/* Zoom2 has Qwerty keyboard*/
static int board_keymap[] = {
KEY(0, 0, KEY_E),
@@ -106,6 +109,11 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
.supply = "vmmc",
};

+static struct regulator_consumer_supply zoom_vmmc3_supply = {
+ .supply = "vmmc",
+ .dev_name = "mmci-omap-hs.2",
+};
+
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
static struct regulator_init_data zoom_vmmc1 = {
.constraints = {
@@ -151,6 +159,32 @@ static struct regulator_init_data zoom_vsim = {
.consumer_supplies = &zoom_vsim_supply,
};

+static struct regulator_init_data zoom_vmmc3 = {
+ .constraints = {
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = 1,
+ .consumer_supplies = &zoom_vmmc3_supply,
+};
+
+static struct fixed_voltage_config zoom_vwlan = {
+ .supply_name = "vwl1271",
+ .microvolts = 1800000, /* 1.8V */
+ .gpio = OMAP_ZOOM_WLAN_PMENA_GPIO,
+ .startup_delay = 70000, /* 70msec */
+ .enable_high = 1,
+ .enabled_at_boot = 0,
+ .init_data = &zoom_vmmc3,
+};
+
+static struct platform_device omap_vwlan_device = {
+ .name = "reg-fixed-voltage",
+ .id = 1,
+ .dev = {
+ .platform_data = &zoom_vwlan,
+ },
+};
+
static struct omap2_hsmmc_info mmc[] __initdata = {
{
.name = "external",
@@ -280,6 +314,7 @@ static void enable_board_wakeup_source(void)
void __init zoom_peripherals_init(void)
{
omap_i2c_init();
+ platform_device_register(&omap_vwlan_device);
usb_musb_init(&musb_board_data);
enable_board_wakeup_source();
}
--
1.7.0.4


2010-08-10 22:13:46

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 6/9] omap: hsmmc: remove unused variable

Make this go away:

drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend':
drivers/mmc/host/omap_hsmmc.c:2328: warning: unused variable 'state'

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
drivers/mmc/host/omap_hsmmc.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index b032828..d50e917 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2272,7 +2272,6 @@ static int omap_hsmmc_suspend(struct device *dev)
int ret = 0;
struct platform_device *pdev = to_platform_device(dev);
struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
- pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */

if (host && host->suspended)
return 0;
--
1.7.0.4


2010-08-10 22:13:57

by Ohad Ben Cohen

[permalink] [raw]
Subject: [PATCH v3 9/9] omap: zoom: add mmc3/wl1271 device support

Add MMC3 support on ZOOM, which has the wl1271 device hardwired to.

The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an
external IRQ line, and power-controlled by a GPIO-based fixed regulator.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
---
arch/arm/mach-omap2/board-zoom-peripherals.c | 34 ++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index de88635..82776bc 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -17,6 +17,8 @@
#include <linux/i2c/twl.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
+#include <linux/mmc/host.h>
+#include <linux/wl12xx.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -29,6 +31,7 @@
#include "hsmmc.h"

#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
+#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)

/* Zoom2 has Qwerty keyboard*/
static int board_keymap[] = {
@@ -185,6 +188,28 @@ static struct platform_device omap_vwlan_device = {
},
};

+struct wl12xx_platform_data omap_zoom_wlan_data = {
+ /* ZOOM ref clock is 26 MHz */
+ .board_ref_clock = 1,
+};
+
+static struct resource omap_zoom_wl1271_resources[] = {
+ {
+ .start = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
+ .end = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
+ .flags = IORESOURCE_IRQ,
+ }
+};
+static struct platform_device omap_zoom_wl1271 = {
+ .name = "wl1271_plat.2",
+ .id = -1,
+ .resource = omap_zoom_wl1271_resources,
+ .num_resources = ARRAY_SIZE(omap_zoom_wl1271_resources),
+ .dev = {
+ .platform_data = &omap_zoom_wlan_data,
+ },
+};
+
static struct omap2_hsmmc_info mmc[] __initdata = {
{
.name = "external",
@@ -202,6 +227,14 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.nonremovable = true,
.power_saving = true,
},
+ {
+ .name = "wl1271",
+ .mmc = 3,
+ .wires = 4,
+ .gpio_wp = -EINVAL,
+ .gpio_cd = -EINVAL,
+ .ocr_mask = MMC_VDD_165_195,
+ },
{} /* Terminator */
};

@@ -313,6 +346,7 @@ static void enable_board_wakeup_source(void)

void __init zoom_peripherals_init(void)
{
+ platform_device_register(&omap_zoom_wl1271);
omap_i2c_init();
platform_device_register(&omap_vwlan_device);
usb_musb_init(&musb_board_data);
--
1.7.0.4