omap3-pandora-kernel: bump and enable ipfilter modules
[openpandora.oe.git] / recipes / linux / omap3-pandora-kernel / 0004-Add-back-in-80us-delay-into-the-WiFi-module-init.patch
1 From a070a7c121ae1885a6c0354598efc12b3d98beab Mon Sep 17 00:00:00 2001
2 From: David-John Willis <John.Willis@Distant-earth.com>
3 Date: Tue, 1 Sep 2009 18:24:15 +0100
4 Subject: [PATCH 4/4] Add back in 80us delay into the WiFi module init.
5
6 ---
7  arch/arm/mach-omap2/board-omap3pandora-wifi.c |   17 ++++++++++++-----
8  arch/arm/mach-omap2/board-omap3pandora.c      |    2 --
9  2 files changed, 12 insertions(+), 7 deletions(-)
10
11 diff --git a/arch/arm/mach-omap2/board-omap3pandora-wifi.c b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
12 index 2968340..591cc6c 100755
13 --- a/arch/arm/mach-omap2/board-omap3pandora-wifi.c
14 +++ b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
15 @@ -1,7 +1,7 @@
16  /*
17   * board-omap3pandora-wifi.c
18   *
19 - * WiFi setup (SDIO) for Pandora handheld console
20 + * WiFi setup (SDIO) module for Pandora handheld console
21   * Author: John Willis <John.Willis@Distant-earth.com>
22   *
23   * Based on /arch/arm/mach-msm/msm_wifi.c
24 @@ -24,25 +24,30 @@
25  
26  #include <linux/platform_device.h>
27  #include <linux/wifi_tiwlan.h>
28 +#include <linux/delay.h>
29  
30  static int wifi_probe(struct platform_device *pdev)
31  {
32         struct wifi_platform_data *wifi_ctrl =
33                 (struct wifi_platform_data *)(pdev->dev.platform_data);
34  
35 -       printk(KERN_DEBUG "Pandora WiFi: Probe started\n");
36 +       printk(KERN_DEBUG "Pandora WiFi module: Probe started\n");
37  
38         if (!wifi_ctrl)
39                 return -ENODEV;
40  
41         if (wifi_ctrl->set_power)
42                 wifi_ctrl->set_power(1);        /* Power On */
43 +
44         if (wifi_ctrl->set_reset)
45                 wifi_ctrl->set_reset(0);        /* Reset clear */
46 +
47 +       mdelay(80);
48 +
49         if (wifi_ctrl->set_carddetect)
50                 wifi_ctrl->set_carddetect(1);   /* CardDetect (0->1) */
51  
52 -       printk(KERN_DEBUG "Pandora WiFi: Probe done\n");
53 +       printk(KERN_DEBUG "Pandora WiFi module: Probe done\n");
54         return 0;
55  }
56  
57 @@ -51,18 +56,20 @@ static int wifi_remove(struct platform_device *pdev)
58         struct wifi_platform_data *wifi_ctrl =
59                 (struct wifi_platform_data *)(pdev->dev.platform_data);
60  
61 -       printk(KERN_DEBUG "Pandora WiFi: Remove started\n");
62 +       printk(KERN_DEBUG "Pandora WiFi module: Remove started\n");
63         if (!wifi_ctrl)
64                 return -ENODEV;
65  
66         if (wifi_ctrl->set_carddetect)
67                 wifi_ctrl->set_carddetect(0);   /* CardDetect (1->0) */
68 +
69         if (wifi_ctrl->set_reset)
70                 wifi_ctrl->set_reset(1);        /* Reset active */
71 +
72         if (wifi_ctrl->set_power)
73                 wifi_ctrl->set_power(0);        /* Power Off */
74  
75 -       printk(KERN_DEBUG "Pandora WiFi: Remove finished\n");
76 +       printk(KERN_DEBUG "Pandora WiFi module: Remove finished\n");
77         return 0;
78  }
79  
80 diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
81 index 1d95fae..aec5fec 100755
82 --- a/arch/arm/mach-omap2/board-omap3pandora.c
83 +++ b/arch/arm/mach-omap2/board-omap3pandora.c
84 @@ -503,10 +503,8 @@ int pandora_wifi_power(int on)
85  
86         if (on) {
87                 gpio_set_value(PANDORA_WIFI_GPIO, 1);
88 -       mdelay(50);
89         } else {
90             gpio_set_value(PANDORA_WIFI_GPIO, 0);
91 -       mdelay(50);
92         }
93         pandora_wifi_power_state = on;
94         return 0;
95 -- 
96 1.6.3.1
97