pandora changes
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 17 Mar 2010 21:17:12 +0000 (23:17 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 17 Mar 2010 21:17:12 +0000 (23:17 +0200)
sta_dk/pform/linux/inc/esta_drv.h
sta_dk/pform/linux/src/esta_drv.c

index 1474ef9..635e870 100644 (file)
@@ -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)
index 97dcc97..e414542 100644 (file)
@@ -46,6 +46,8 @@
 #include <linux/etherdevice.h>
 #include <linux/netlink.h>
 
+#include <linux/gpio.h>
+
 #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);