Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172601
b: refs/heads/master
c: b3d01da
h: refs/heads/master
i:
  172599: 74bbfcd
v: v3
  • Loading branch information
Igor Grinberg authored and Eric Miao committed Dec 1, 2009
1 parent a1fe816 commit 6273485
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74e74defd6c471fc7ec108e64cb953164940a122
refs/heads/master: b3d01da66d45504f8bdc6fbc9c0c1f1705ebc251
38 changes: 38 additions & 0 deletions trunk/arch/arm/mach-pxa/cm-x300.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>

#include <linux/gpio.h>
Expand Down Expand Up @@ -513,6 +514,42 @@ static void __init cm_x300_init_rtc(void)
static inline void cm_x300_init_rtc(void) {}
#endif

static void __init cm_x300_init_wi2wi(void)
{
int bt_reset, wlan_en;
int err;

if (system_rev < 130) {
wlan_en = 77;
bt_reset = 78;
} else {
wlan_en = 71;
bt_reset = 70;
}

/* Libertas and CSR reset */
err = gpio_request(wlan_en, "wlan en");
if (err) {
pr_err("CM-X300: failed to request wlan en gpio: %d\n", err);
} else {
gpio_direction_output(wlan_en, 1);
gpio_free(wlan_en);
}

err = gpio_request(bt_reset, "bt reset");
if (err) {
pr_err("CM-X300: failed to request bt reset gpio: %d\n", err);
} else {
gpio_direction_output(bt_reset, 1);
udelay(10);
gpio_set_value(bt_reset, 0);
udelay(10);
gpio_set_value(bt_reset, 1);
gpio_free(bt_reset);
}
}

/* MFP */
static void __init cm_x300_init_mfp(void)
{
/* board-processor specific GPIO initialization */
Expand Down Expand Up @@ -542,6 +579,7 @@ static void __init cm_x300_init(void)
cm_x300_init_spi();
cm_x300_init_rtc();
cm_x300_init_ac97();
cm_x300_init_wi2wi();
}

static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
Expand Down

0 comments on commit 6273485

Please sign in to comment.