Skip to content

Commit

Permalink
Reduce the use of CONFIG_LENOVO_BCM4329 to the only relevant case - r…
Browse files Browse the repository at this point in the history
…emoval of card on mmc2 when going into suspend.
  • Loading branch information
gmarkall committed May 2, 2012
1 parent e8bf666 commit 5bf768a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 125 deletions.
81 changes: 0 additions & 81 deletions arch/arm/mach-omap2/board-evt-wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
#ifdef CONFIG_WLAN_POWER_EVT1
#include <linux/i2c/twl.h>

#ifndef CONFIG_LENOVO_BCM4329
#define EVT_WIFI_IRQ_GPIO 15
#define EVT_WIFI_ENPOW_GPIO 16
#define EVT_WIFI_PMENA_GPIO 22
#endif

#define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER
#define ENABLE_VAUX2_DEDICATED 0x05
#define ENABLE_VAUX2_DEV_GRP 0x20
Expand All @@ -40,28 +34,6 @@ static int evt_wifi_cd; /* WIFI virtual 'card detect' status */
static void (*wifi_status_cb)(int card_present, void *dev_id);
static void *wifi_status_cb_devid;

#ifndef CONFIG_LENOVO_BCM4329
static int wifi_v18io_power_enable_init(void)
{
int return_value = 0;

printk(">>> wifi_v18io_power_enable_init\n");

#ifdef CONFIG_WLAN_POWER_EVT1
printk("Enabling VAUX for wifi \n");
return_value = t2_out(PM_RECEIVER,ENABLE_VAUX2_DEDICATED,TWL4030_VAUX2_DEDICATED);
return_value |= t2_out(PM_RECEIVER,ENABLE_VAUX2_DEV_GRP,TWL4030_VAUX2_DEV_GRP);

if(0 != return_value)
printk("Enabling VAUX for wifi incomplete error: %d\n",return_value);
#endif

printk("<<< wifi_v18io_power_enable_init\n");
return return_value;
}
#endif


int omap_wifi_status_register(void (*callback)(int card_present, void *dev_id), void *dev_id)
{
printk(">>> omap_wifi_status_register\n");
Expand Down Expand Up @@ -108,11 +80,6 @@ int evt_wifi_power(int on)
gpio_direction_output(GPIO_WL_RST_EN, on);
mdelay(200);

#ifndef CONFIG_LENOVO_BCM4329
printk(">>> evt_wifi_powe setting gpio\n");
gpio_set_value(EVT_WIFI_PMENA_GPIO, on);
#endif

evt_wifi_power_state = on;

printk("<<< evt_wifi_power\n");
Expand Down Expand Up @@ -141,25 +108,10 @@ struct wifi_platform_data evt_wifi_control = {
};

#ifdef CONFIG_WIFI_CONTROL_FUNC
#ifndef CONFIG_LENOVO_BCM4329
static struct resource evt_wifi_resources[] = {
[0] = {
.name = "device_wifi_irq",
.start = OMAP_GPIO_IRQ(EVT_WIFI_IRQ_GPIO),
.end = OMAP_GPIO_IRQ(EVT_WIFI_IRQ_GPIO),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
},
};
#endif


static struct platform_device evt_wifi_device = {
.name = "device_wifi",
.id = 1,
#ifndef CONFIG_LENOVO_BCM4329
.num_resources = ARRAY_SIZE(evt_wifi_resources),
.resource = evt_wifi_resources,
#endif
.dev = {
.platform_data = &evt_wifi_control,
},
Expand All @@ -181,43 +133,10 @@ static int __init evt_wifi_init(void)
gpio_direction_output(GPIO_WL_RST_EN, 0);
mdelay(200);

#ifndef CONFIG_LENOVO_BCM4329
ret = gpio_request(EVT_WIFI_IRQ_GPIO, "wifi_irq");
if (ret < 0) {
pr_err("%s: can't reserve GPIO: %d\n", __func__,
EVT_WIFI_IRQ_GPIO);
goto out;
}

ret = gpio_request(EVT_WIFI_PMENA_GPIO, "wifi_pmena");
if (ret < 0) {
pr_err("%s: can't reserve GPIO: %d\n", __func__,
EVT_WIFI_PMENA_GPIO);
gpio_free(EVT_WIFI_IRQ_GPIO);
goto out;
}

ret = gpio_request(EVT_WIFI_ENPOW_GPIO, "wifi_en_pow");
if (ret < 0) {
printk(KERN_ERR "%s: can't reserve GPIO: %d\n", __func__,
EVT_WIFI_ENPOW_GPIO);
gpio_free(EVT_WIFI_ENPOW_GPIO);
goto out;
}

wifi_v18io_power_enable_init();
gpio_direction_input(EVT_WIFI_IRQ_GPIO);
gpio_direction_output(EVT_WIFI_PMENA_GPIO, 0);
gpio_direction_output(EVT_WIFI_ENPOW_GPIO, 1);
#endif

#ifdef CONFIG_WIFI_CONTROL_FUNC
ret = platform_device_register(&evt_wifi_device);
#endif

#ifndef CONFIG_LENOVO_BCM4329
out:
#endif
printk("<<< evt_wifi_init\n");
return ret;
}
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-omap2/board-evt1a.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,8 @@
#include "sdram-elpida-pop-edk4332c2pb.h"
#endif

#define CONFIG_LENOVO_BCM4329_RFKILL 1

#ifdef CONFIG_LENOVO_BCM4329
#include <linux/fxn-rfkill.h>
#endif

#ifdef CONFIG_LENOVO_BCM4329_RFKILL
static struct fxn_rfkill_platform_data fxn_plat_data = {
.wifi_bt_pwr_en_gpio = FXN_GPIO_WL_BT_POW_EN, /* WiFi/BT power enable GPIO */
.wifi_reset_gpio = FXN_GPIO_WL_RST_N, /* WiFi reset GPIO */
Expand Down Expand Up @@ -103,7 +98,6 @@ void __init conn_add_plat_device(void)
// bluetooth_init();
printk("<<< conn_add_plat_device()\n");
}
#endif

#ifdef CONFIG_PM
static struct omap_volt_vc_data vc_config = {
Expand Down Expand Up @@ -265,9 +259,7 @@ static void __init omap_evt_init(void)
//omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
usb_ehci_init(&ehci_pdata);

#ifdef CONFIG_LENOVO_BCM4329_RFKILL
conn_add_plat_device();
#endif

printk("<<< omap_evt_init\n");
}
Expand Down
34 changes: 0 additions & 34 deletions arch/arm/mach-omap2/hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,36 +242,18 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
static struct omap_mmc_platform_data *hsmmc_data[OMAP44XX_NR_MMC] __initdata;

#ifdef CONFIG_TIWLAN_SDIO
#ifndef CONFIG_LENOVO_BCM4329
static struct sdio_embedded_func wifi_func_array[] = {
{
.f_class = SDIO_CLASS_NONE,
.f_maxblksize = 512,
},
{
.f_class = SDIO_CLASS_WLAN,
.f_maxblksize = 512,
},
};
#endif

static struct embedded_sdio_data omap_wifi_emb_data = {
.cis = {
#ifdef CONFIG_LENOVO_BCM4329
.vendor = SDIO_VENDOR_ID_BCM43X9,
.device = SDIO_DEVICE_ID_BCM43X9,
#else
.vendor = SDIO_VENDOR_ID_TI,
.device = SDIO_DEVICE_ID_TI_WL12xx,
#endif
.blksize = 512,
#ifdef CONFIG_ARCH_OMAP3
.max_dtr = 24000000,
#else
.max_dtr = 48000000,
#endif
},
#ifdef CONFIG_LENOVO_BCM4329
.cccr = {
.sdio_vsn = 2,
.multi_block = 1,
Expand All @@ -280,22 +262,6 @@ static struct embedded_sdio_data omap_wifi_emb_data = {
.high_power = 0,
.high_speed = 0,
},
#else // CONFIG_LENOVO_BCM4329
.cccr = {
.multi_block = 1,
.low_speed = 0,
.wide_bus = 1,
.high_power = 0,
#ifdef CONFIG_ARCH_OMAP3
.high_speed = 0,
#else
.high_speed = 1,
#endif
.disable_cd = 1,
},
.funcs = wifi_func_array,
.quirks = MMC_QUIRK_VDD_165_195 | MMC_QUIRK_LENIENT_FUNC0,
#endif // CONFIG_LENOVO_BCM4329
};
#endif // CONFIG_TIWLAN_SDIO

Expand Down
2 changes: 0 additions & 2 deletions include/linux/mmc/sdio_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
#define SDIO_DEVICE_ID_TI_WL12xx 0x9066
#endif

#ifdef CONFIG_LENOVO_BCM4329
#define SDIO_VENDOR_ID_BCM43X9 0x02d0
#define SDIO_DEVICE_ID_BCM43X9 0x4329
#endif

#define SDIO_VENDOR_ID_SIANO 0x039a
#define SDIO_DEVICE_ID_SIANO_NOVA_B0 0x0201
Expand Down

0 comments on commit 5bf768a

Please sign in to comment.