summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Markowski <bartosz.markowski@tieto.com>2012-02-29 15:15:10 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:06:45 +0200
commitca8df41a15456e13b8a77cbed969ad84bcf9e9d5 (patch)
tree0c88a6afe7999e563662ccaea4b846fb487ef0ed
parent68383a8207db856eaeb468775bed6720e4629390 (diff)
cw1200: Adds wlan on u5500 support
In u5500 platform reset pin is connected to PRCMU. * Kconfig option for wlan on u5500 * Implementation to set/unset RESOUT2_N_PIN by writing to PRCMU register (platform callback). ST-Ericsson ID: 375493 ST-Ericsson FOSS-OUT ID: NA Change-Id: I319622ab083c69c628bc52322d64339726e3e9bc Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/41168 Reviewed-by: QATOOLS Reviewed-by: Janusz DZIEDZIC <janusz.dziedzic@tieto.com>
-rw-r--r--drivers/staging/cw1200/Kconfig12
-rw-r--r--[-rwxr-xr-x]drivers/staging/cw1200/ap.c0
-rw-r--r--drivers/staging/cw1200/cw1200_plat.h2
-rw-r--r--drivers/staging/cw1200/cw1200_sdio.c20
4 files changed, 25 insertions, 9 deletions
diff --git a/drivers/staging/cw1200/Kconfig b/drivers/staging/cw1200/Kconfig
index dbb97adb829..3a4fc9813c6 100644
--- a/drivers/staging/cw1200/Kconfig
+++ b/drivers/staging/cw1200/Kconfig
@@ -42,18 +42,18 @@ config CW1200_WAPI_SUPPORT
Say Y if your compat-wireless support WAPI.
If unsure, say N.
-config CW1200_U5500_SUPPORT
- bool "Enable U5500 support"
+config CW1200_DISABLE_BEACON_HINTS
+ bool "Disable 11d beacon hints"
depends on CW1200
help
- Say Y if you want to enable wlan on u5500 platform support.
+ Say Y if you want to disable 11d beacon hints.
If unsure, say N.
-config CW1200_DISABLE_BEACON_HINTS
- bool "Disable 11d beacon hints"
+config CW1200_U5500_SUPPORT
+ bool "Enable U5500 support"
depends on CW1200
help
- Say Y if you want to disable 11d beacon hints.
+ Say Y if you want to enable wlan on u5500 platform support.
If unsure, say N.
menu "Driver debug features"
diff --git a/drivers/staging/cw1200/ap.c b/drivers/staging/cw1200/ap.c
index 1211e127c52..1211e127c52 100755..100644
--- a/drivers/staging/cw1200/ap.c
+++ b/drivers/staging/cw1200/ap.c
diff --git a/drivers/staging/cw1200/cw1200_plat.h b/drivers/staging/cw1200/cw1200_plat.h
index 4d30dbd3979..3a73183c9f8 100644
--- a/drivers/staging/cw1200/cw1200_plat.h
+++ b/drivers/staging/cw1200/cw1200_plat.h
@@ -18,6 +18,8 @@ struct cw1200_platform_data {
bool enable);
int (*clk_ctrl)(const struct cw1200_platform_data *pdata,
bool enable);
+ int (*prcmu_ctrl)(const struct cw1200_platform_data *pdata,
+ bool enable);
};
/* Declaration only. Should be implemented in arch/xxx/mach-yyy */
diff --git a/drivers/staging/cw1200/cw1200_sdio.c b/drivers/staging/cw1200/cw1200_sdio.c
index 6f3eabd3967..c5de6dbbc2a 100644
--- a/drivers/staging/cw1200/cw1200_sdio.c
+++ b/drivers/staging/cw1200/cw1200_sdio.c
@@ -235,15 +235,24 @@ static int cw1200_detect_card(const struct cw1200_platform_data *pdata)
static int cw1200_sdio_off(const struct cw1200_platform_data *pdata)
{
+ int ret = 0;
+#ifndef CONFIG_CW1200_U5500_SUPPORT
const struct resource *reset = pdata->reset;
gpio_set_value(reset->start, 0);
- cw1200_detect_card(pdata);
gpio_free(reset->start);
- return 0;
+#else
+ if (pdata->prcmu_ctrl)
+ ret = pdata->prcmu_ctrl(pdata, false);
+ msleep(50);
+#endif
+ cw1200_detect_card(pdata);
+ return ret;
}
static int cw1200_sdio_on(const struct cw1200_platform_data *pdata)
{
+ int ret = 0;
+#ifndef CONFIG_CW1200_U5500_SUPPORT
const struct resource *reset = pdata->reset;
gpio_request(reset->start, reset->name);
gpio_direction_output(reset->start, 1);
@@ -259,8 +268,13 @@ static int cw1200_sdio_on(const struct cw1200_platform_data *pdata)
/* The host should wait 32 ms after the WRESETN release
* for the on-chip LDO to stabilize */
msleep(32);
+#else
+ if (pdata->prcmu_ctrl)
+ ret = pdata->prcmu_ctrl(pdata, true);
+ msleep(50);
+#endif
cw1200_detect_card(pdata);
- return 0;
+ return ret;
}
static int cw1200_sdio_reset(struct sbus_priv *self)