From d837e963f166572434004920a54790cfc16eaa86 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Wed, 17 Mar 2010 23:17:12 +0200 Subject: [PATCH] pandora changes --- sta_dk/pform/linux/inc/esta_drv.h | 3 +++ sta_dk/pform/linux/src/esta_drv.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/sta_dk/pform/linux/inc/esta_drv.h b/sta_dk/pform/linux/inc/esta_drv.h index 1474ef9..635e870 100644 --- a/sta_dk/pform/linux/inc/esta_drv.h +++ b/sta_dk/pform/linux/inc/esta_drv.h @@ -86,6 +86,9 @@ #endif /* #ifdef TIWLAN_OMAP1610_REGBASE */ +#define PANDORA_WIFI_IRQ OMAP_GPIO_IRQ(21) +#define TIWLAN_OMAP1610_IRQ PANDORA_WIFI_IRQ + #ifndef TIWLAN_OMAP1610_IRQ #if defined(TIWLAN_OMAP1610_INNOVATOR) diff --git a/sta_dk/pform/linux/src/esta_drv.c b/sta_dk/pform/linux/src/esta_drv.c index 97dcc97..e414542 100644 --- a/sta_dk/pform/linux/src/esta_drv.c +++ b/sta_dk/pform/linux/src/esta_drv.c @@ -46,6 +46,8 @@ #include #include +#include + #define mike #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) @@ -244,6 +246,7 @@ static void omap_memif_init(void) //CONTROL_PADCONF_DSS_PCLK &= ~0xFF000000; //CONTROL_PADCONF_DSS_PCLK = CONTROL_PADCONF_DSS_PCLK | 0x001c0000; //set to gpio mode +#if 0 /* already configured by bootloader */ #if 1 /* omap3530 */ CONTROL_PADCONF_DSS_DATA12B &= ~0xFF000000; @@ -260,6 +263,7 @@ static void omap_memif_init(void) GPIO3_OE |= OMAP_GPIO_BIT(68); //set gpio_68 input GPIO3_IRQENABLE1 |= OMAP_GPIO_BIT(68); //enable irq gpio_68 GPIO3_FALLINGDETECT |= OMAP_GPIO_BIT(68); +#endif #endif //printk("set gpio_83 to gpio high end\n"); @@ -1509,6 +1513,8 @@ int omap1610_drv_create(void) } #endif /* #ifdef TIWLAN_OMAP1610 */ +#define PANDORA_WIFI_GPIO 23 +extern void omap_mmc_fake_detect_mmc3(int is_in); static int __init tiwlan_module_init(void) { @@ -1518,6 +1524,11 @@ static int __init tiwlan_module_init(void) if (packed_struct_tst()) ;/*IT: return -EINVAL; */ + gpio_set_value(PANDORA_WIFI_GPIO, 1); + msleep(100); + omap_mmc_fake_detect_mmc3(1); + msleep(100); + tiwlan_deb_entry=create_proc_entry("mem", 0644, NULL); if (tiwlan_deb_entry == NULL) return -EINVAL; @@ -1561,6 +1572,8 @@ static void __exit tiwlan_module_cleanup(void) } remove_proc_entry("mem", NULL); printk(KERN_INFO "TI WLAN: driver unloaded\n"); + msleep(100); + omap_mmc_fake_detect_mmc3(0); } module_init(tiwlan_module_init); -- 2.39.5