--- /dev/null
+From d0e67607c9eba9423b65875da2c732ed690a2292 Mon Sep 17 00:00:00 2001
+From: David-John Willis <John.Willis@Distant-earth.com>
+Date: Sun, 30 Aug 2009 19:31:31 +0100
+Subject: [PATCH 2/2] Add a very basic platform driver module to bring up the SDIO WiFi so that the platform stuff is no longer hacked into the WL1251 driver (TODO: Clean up and move somewhere more mainline friendly).
+
+---
+ arch/arm/mach-omap2/Kconfig | 5 ++
+ arch/arm/mach-omap2/Makefile | 1 +
+ arch/arm/mach-omap2/board-omap3pandora-wifi.c | 89 +++++++++++++++++++++++++
+ 3 files changed, 95 insertions(+), 0 deletions(-)
+ mode change 100644 => 100755 arch/arm/mach-omap2/Kconfig
+ mode change 100644 => 100755 arch/arm/mach-omap2/Makefile
+ create mode 100755 arch/arm/mach-omap2/board-omap3pandora-wifi.c
+
+diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
+old mode 100644
+new mode 100755
+index fd62c7e..9f6f7a2
+--- a/arch/arm/mach-omap2/Kconfig
++++ b/arch/arm/mach-omap2/Kconfig
+@@ -130,6 +130,11 @@ config MACH_OVERO
+ config MACH_OMAP3_PANDORA
+ bool "OMAP3 Pandora"
+ depends on ARCH_OMAP3 && ARCH_OMAP34XX
++
++config OMAP3_PANDORA_WIFI
++ depends on MACH_OMAP3_PANDORA
++ default m
++ tristate "OpenPandora Wifi GPIO driver"
+
+ config OMAP_TICK_GPTIMER
+ int "GPTIMER used for system tick timer"
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+old mode 100644
+new mode 100755
+index e6e16bb..8ba0ad9
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -83,6 +83,7 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
+ hsmmc.o \
+ usb-musb.o \
+ usb-ehci.o
++obj-$(CONFIG_OMAP3_PANDORA_WIFI) += board-omap3pandora-wifi.o
+
+ # TUSB 6010 chips
+ obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
+diff --git a/arch/arm/mach-omap2/board-omap3pandora-wifi.c b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
+new file mode 100755
+index 0000000..2968340
+--- /dev/null
++++ b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
+@@ -0,0 +1,89 @@
++/*
++ * board-omap3pandora-wifi.c
++ *
++ * WiFi setup (SDIO) for Pandora handheld console
++ * Author: John Willis <John.Willis@Distant-earth.com>
++ *
++ * Based on /arch/arm/mach-msm/msm_wifi.c
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/platform_device.h>
++#include <linux/wifi_tiwlan.h>
++
++static int wifi_probe(struct platform_device *pdev)
++{
++ struct wifi_platform_data *wifi_ctrl =
++ (struct wifi_platform_data *)(pdev->dev.platform_data);
++
++ printk(KERN_DEBUG "Pandora WiFi: Probe started\n");
++
++ if (!wifi_ctrl)
++ return -ENODEV;
++
++ if (wifi_ctrl->set_power)
++ wifi_ctrl->set_power(1); /* Power On */
++ if (wifi_ctrl->set_reset)
++ wifi_ctrl->set_reset(0); /* Reset clear */
++ if (wifi_ctrl->set_carddetect)
++ wifi_ctrl->set_carddetect(1); /* CardDetect (0->1) */
++
++ printk(KERN_DEBUG "Pandora WiFi: Probe done\n");
++ return 0;
++}
++
++static int wifi_remove(struct platform_device *pdev)
++{
++ struct wifi_platform_data *wifi_ctrl =
++ (struct wifi_platform_data *)(pdev->dev.platform_data);
++
++ printk(KERN_DEBUG "Pandora WiFi: Remove started\n");
++ if (!wifi_ctrl)
++ return -ENODEV;
++
++ if (wifi_ctrl->set_carddetect)
++ wifi_ctrl->set_carddetect(0); /* CardDetect (1->0) */
++ if (wifi_ctrl->set_reset)
++ wifi_ctrl->set_reset(1); /* Reset active */
++ if (wifi_ctrl->set_power)
++ wifi_ctrl->set_power(0); /* Power Off */
++
++ printk(KERN_DEBUG "Pandora WiFi: Remove finished\n");
++ return 0;
++}
++
++static struct platform_driver wifi_device = {
++ .probe = wifi_probe,
++ .remove = wifi_remove,
++ .driver = {
++ .name = "pandora_wifi",
++ },
++};
++
++static int __init pandora_wifi_sdio_init(void)
++{
++ return platform_driver_register(&wifi_device);
++}
++
++static void __exit pandora_wifi_sdio_exit(void)
++{
++ platform_driver_unregister(&wifi_device);
++}
++
++module_init(pandora_wifi_sdio_init);
++module_exit(pandora_wifi_sdio_exit);
++MODULE_LICENSE("GPL");
+--
+1.6.3.1
+
--- /dev/null
+From a699035527e66a280267cbfefa0498b6fd628dee Mon Sep 17 00:00:00 2001
+From: David-John Willis <John.Willis@Distant-earth.com>
+Date: Mon, 31 Aug 2009 12:06:17 +0100
+Subject: [PATCH 3/3] Remove old msm_wifi hack as the temp platform driver now abstracts this from wl1251.
+
+---
+ arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
+index 031ad2d..da35a62 100755
+--- a/arch/arm/mach-omap2/board-omap3pandora.c
++++ b/arch/arm/mach-omap2/board-omap3pandora.c
+@@ -486,7 +486,7 @@ struct wifi_platform_data pandora_wifi_control = {
+ };
+
+ static struct platform_device pandora_wifi = {
+- .name = "msm_wifi", /* Hack to work with hardcode in driver */
++ .name = "pandora_wifi",
+ .id = 1,
+ .num_resources = 0,
+ .resource = NULL,
+--
+1.6.3.1
+
--- /dev/null
+From 7d5ae8daa2289378ba9c9321f6c9659cae20bcdd Mon Sep 17 00:00:00 2001
+From: David-John Willis <John.Willis@Distant-earth.com>
+Date: Tue, 1 Sep 2009 18:24:15 +0100
+Subject: [PATCH 4/4] Add back in 80us delay into the WiFi module init.
+
+---
+ arch/arm/mach-omap2/board-omap3pandora-wifi.c | 17 ++++++++++++-----
+ arch/arm/mach-omap2/board-omap3pandora.c | 2 --
+ 2 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3pandora-wifi.c b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
+index 2968340..591cc6c 100755
+--- a/arch/arm/mach-omap2/board-omap3pandora-wifi.c
++++ b/arch/arm/mach-omap2/board-omap3pandora-wifi.c
+@@ -1,7 +1,7 @@
+ /*
+ * board-omap3pandora-wifi.c
+ *
+- * WiFi setup (SDIO) for Pandora handheld console
++ * WiFi setup (SDIO) module for Pandora handheld console
+ * Author: John Willis <John.Willis@Distant-earth.com>
+ *
+ * Based on /arch/arm/mach-msm/msm_wifi.c
+@@ -24,25 +24,30 @@
+
+ #include <linux/platform_device.h>
+ #include <linux/wifi_tiwlan.h>
++#include <linux/delay.h>
+
+ static int wifi_probe(struct platform_device *pdev)
+ {
+ struct wifi_platform_data *wifi_ctrl =
+ (struct wifi_platform_data *)(pdev->dev.platform_data);
+
+- printk(KERN_DEBUG "Pandora WiFi: Probe started\n");
++ printk(KERN_DEBUG "Pandora WiFi module: Probe started\n");
+
+ if (!wifi_ctrl)
+ return -ENODEV;
+
+ if (wifi_ctrl->set_power)
+ wifi_ctrl->set_power(1); /* Power On */
++
+ if (wifi_ctrl->set_reset)
+ wifi_ctrl->set_reset(0); /* Reset clear */
++
++ mdelay(80);
++
+ if (wifi_ctrl->set_carddetect)
+ wifi_ctrl->set_carddetect(1); /* CardDetect (0->1) */
+
+- printk(KERN_DEBUG "Pandora WiFi: Probe done\n");
++ printk(KERN_DEBUG "Pandora WiFi module: Probe done\n");
+ return 0;
+ }
+
+@@ -51,18 +56,20 @@ static int wifi_remove(struct platform_device *pdev)
+ struct wifi_platform_data *wifi_ctrl =
+ (struct wifi_platform_data *)(pdev->dev.platform_data);
+
+- printk(KERN_DEBUG "Pandora WiFi: Remove started\n");
++ printk(KERN_DEBUG "Pandora WiFi module: Remove started\n");
+ if (!wifi_ctrl)
+ return -ENODEV;
+
+ if (wifi_ctrl->set_carddetect)
+ wifi_ctrl->set_carddetect(0); /* CardDetect (1->0) */
++
+ if (wifi_ctrl->set_reset)
+ wifi_ctrl->set_reset(1); /* Reset active */
++
+ if (wifi_ctrl->set_power)
+ wifi_ctrl->set_power(0); /* Power Off */
+
+- printk(KERN_DEBUG "Pandora WiFi: Remove finished\n");
++ printk(KERN_DEBUG "Pandora WiFi module: Remove finished\n");
+ return 0;
+ }
+
+diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
+index da35a62..3fe3447 100755
+--- a/arch/arm/mach-omap2/board-omap3pandora.c
++++ b/arch/arm/mach-omap2/board-omap3pandora.c
+@@ -460,10 +460,8 @@ int pandora_wifi_power(int on)
+
+ if (on) {
+ gpio_set_value(PANDORA_WIFI_GPIO, 1);
+- mdelay(50);
+ } else {
+ gpio_set_value(PANDORA_WIFI_GPIO, 0);
+- mdelay(50);
+ }
+ pandora_wifi_power_state = on;
+ return 0;
+--
+1.6.3.1
+
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27-omap1
-# Mon Jun 22 14:49:36 2009
+# Sun Aug 30 18:56:27 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_MACH_OMAP3_BEAGLE is not set
# CONFIG_MACH_OVERO is not set
CONFIG_MACH_OMAP3_PANDORA=y
+CONFIG_OMAP3_PANDORA_WIFI=m
CONFIG_OMAP_TICK_GPTIMER=12
#
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_EVBUG=m
#
# Input Device Drivers
# CONFIG_ISP1301_OMAP is not set
# CONFIG_TPS65010 is not set
# CONFIG_SENSORS_TLV320AIC23 is not set
-CONFIG_TWL4030_MADC=m
+CONFIG_TWL4030_MADC=y
CONFIG_TWL4030_USB=y
CONFIG_TWL4030_PWRBUTTON=y
CONFIG_TWL4030_POWEROFF=y
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
+CONFIG_POWER_SUPPLY=Y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_TWL4030_BCI_BATTERY=y
# CONFIG_HWMON is not set
# CONFIG_WATCHDOG is not set
--- /dev/null
+MUSB: Workaround for simultaneous TX and RX usage
+
+MUSB RTL V1.4 has a hardware issue which results in a DMA controller
+hang when TX and RX DMA channels are simultaneously enabled. This
+affects at least OMAP2430 and OMAP34XX.
+
+Since RX transfers are in Mode 0 and anyway result in one DMA interrupt
+per packet, we can use System DMA to unload the RX fifos. MUSB DMA can
+be used for all TX channels as before.
+
+Tested with full-duplex TX and RX transfers using g_ether. Runs for 24
+hours without a hang. Without this patch, the hang occurs within minutes.
+
+This issue was first reported by Jon Hunter on [1]
+
+[1] http://marc.info/?l=linux-omap&m=119634480534453&w=2
+
+Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
+---
+Patch based on the linux-omap tree. I believe the tabs-to-spaces issue
+has been resolved now, but this is the first patch I'm sending out to the
+list after that.
+
+Suggestions welcome for removing the 2 #ifdefs below. One suggestion was to
+use a module parameter to decide whether to use system dma or mentor dma.
+
+Patch updated with a few ifdefs removed and one compilation break resolved.
+
+ drivers/usb/musb/Kconfig | 8 ++
+ drivers/usb/musb/musbhsdma.c | 163 +++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 142 insertions(+), 29 deletions(-)
+
+Index: linux-omap-2.6/drivers/usb/musb/musbhsdma.c
+===================================================================
+--- linux-omap-2.6.orig/drivers/usb/musb/musbhsdma.c 2008-07-28 10:54:37.000000000 +0530
++++ linux-omap-2.6/drivers/usb/musb/musbhsdma.c 2008-08-13 11:58:26.272902373 +0530
+@@ -34,6 +34,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/platform_device.h>
+ #include "musb_core.h"
++#include <mach/dma.h>
+
+ #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
+ #include "omap2430.h"
+@@ -64,6 +65,9 @@
+
+ #define MUSB_HSDMA_CHANNELS 8
+
++#define MUSB_FIFO_ADDRESS(epnum) \
++ ((unsigned long) (OMAP_HSOTG_BASE + MUSB_FIFO_OFFSET(epnum)))
++
+ struct musb_dma_controller;
+
+ struct musb_dma_channel {
+@@ -75,6 +79,8 @@ struct musb_dma_channel {
+ u8 bIndex;
+ u8 epnum;
+ u8 transmit;
++
++ int sysdma_channel;
+ };
+
+ struct musb_dma_controller {
+@@ -93,6 +99,42 @@ static int dma_controller_start(struct d
+ return 0;
+ }
+
++#ifdef CONFIG_MUSB_USE_SYSTEM_DMA_RX
++static void musb_sysdma_completion(int lch, u16 ch_status, void *data)
++{
++ u32 dwAddress;
++ unsigned long flags;
++
++ struct dma_channel *pChannel;
++
++ struct musb_dma_channel *pImplChannel =
++ (struct musb_dma_channel *) data;
++ struct musb_dma_controller *controller = pImplChannel->controller;
++ struct musb *musb = controller->pDmaPrivate;
++ pChannel = &pImplChannel->Channel;
++
++ DBG(2, "lch = 0x%d, ch_status = 0x%x\n", lch, ch_status);
++ spin_lock_irqsave(&musb->lock, flags);
++
++ dwAddress = (u32) omap_get_dma_dst_pos(pImplChannel->sysdma_channel);
++ pChannel->actual_len = dwAddress - pImplChannel->dwStartAddress;
++
++ DBG(2, "ch %p, 0x%x -> 0x%x (%d / %d) %s\n",
++ pChannel, pImplChannel->dwStartAddress, dwAddress,
++ pChannel->actual_len, pImplChannel->len,
++ (pChannel->actual_len < pImplChannel->len) ?
++ "=> reconfig 0": "=> complete");
++
++ pChannel->status = MUSB_DMA_STATUS_FREE;
++ musb_dma_completion(musb, pImplChannel->epnum, pImplChannel->transmit);
++
++ spin_unlock_irqrestore(&musb->lock, flags);
++ return;
++}
++#else
++#define musb_sysdma_completion NULL
++#endif
++
+ static void dma_channel_release(struct dma_channel *pChannel);
+
+ static int dma_controller_stop(struct dma_controller *c)
+@@ -144,6 +186,29 @@ static struct dma_channel *dma_channel_a
+ /* Tx => mode 1; Rx => mode 0 */
+ pChannel->desired_mode = transmit;
+ pChannel->actual_len = 0;
++ pImplChannel->sysdma_channel = -1;
++
++#ifdef CONFIG_MUSB_USE_SYSTEM_DMA_RX
++ if (!transmit) {
++ int ret;
++ ret = omap_request_dma(OMAP24XX_DMA_NO_DEVICE,
++ "MUSB SysDMA", musb_sysdma_completion,
++ (void *) pImplChannel,
++ &(pImplChannel->sysdma_channel));
++
++ if (ret) {
++ printk(KERN_ERR "request_dma failed:"
++ " %d\n", ret);
++ controller->bmUsedChannels &=
++ ~(1 << bBit);
++ pChannel->status =
++ MUSB_DMA_STATUS_UNKNOWN;
++ pImplChannel->sysdma_channel = -1;
++ pChannel = NULL;
++ }
++ }
++#endif
++
+ break;
+ }
+ }
+@@ -163,6 +228,12 @@ static void dma_channel_release(struct d
+ ~(1 << pImplChannel->bIndex);
+
+ pChannel->status = MUSB_DMA_STATUS_UNKNOWN;
++
++ if (pImplChannel->sysdma_channel != -1) {
++ omap_stop_dma(pImplChannel->sysdma_channel);
++ omap_free_dma(pImplChannel->sysdma_channel);
++ pImplChannel->sysdma_channel = -1;
++ }
+ }
+
+ static void configure_channel(struct dma_channel *pChannel,
+@@ -179,41 +250,69 @@ static void configure_channel(struct dma
+ DBG(4, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n",
+ pChannel, packet_sz, dma_addr, len, mode);
+
+- if (mode) {
+- csr |= 1 << MUSB_HSDMA_MODE1_SHIFT;
+- BUG_ON(len < packet_sz);
++ if (pImplChannel->sysdma_channel != -1) {
++ /* System DMA */
++ /* RX: set src = FIFO */
++
++ omap_set_dma_transfer_params(pImplChannel->sysdma_channel,
++ OMAP_DMA_DATA_TYPE_S8,
++ len, 1, /* One frame */
++ OMAP_DMA_SYNC_ELEMENT,
++ OMAP24XX_DMA_NO_DEVICE,
++ 0); /* Src Sync */
++
++ omap_set_dma_src_params(pImplChannel->sysdma_channel, 0,
++ OMAP_DMA_AMODE_CONSTANT,
++ MUSB_FIFO_ADDRESS(pImplChannel->epnum),
++ 0, 0);
++
++ omap_set_dma_dest_params(pImplChannel->sysdma_channel, 0,
++ OMAP_DMA_AMODE_POST_INC, dma_addr,
++ 0, 0);
++
++ omap_set_dma_dest_data_pack(pImplChannel->sysdma_channel, 1);
++ omap_set_dma_dest_burst_mode(pImplChannel->sysdma_channel,
++ OMAP_DMA_DATA_BURST_16);
++
++ omap_start_dma(pImplChannel->sysdma_channel);
++
++ } else { /* Mentor DMA */
++ if (mode) {
++ csr |= 1 << MUSB_HSDMA_MODE1_SHIFT;
++ BUG_ON(len < packet_sz);
+
+- if (packet_sz >= 64) {
+- csr |= MUSB_HSDMA_BURSTMODE_INCR16
++ if (packet_sz >= 64) {
++ csr |= MUSB_HSDMA_BURSTMODE_INCR16
+ << MUSB_HSDMA_BURSTMODE_SHIFT;
+- } else if (packet_sz >= 32) {
+- csr |= MUSB_HSDMA_BURSTMODE_INCR8
++ } else if (packet_sz >= 32) {
++ csr |= MUSB_HSDMA_BURSTMODE_INCR8
+ << MUSB_HSDMA_BURSTMODE_SHIFT;
+- } else if (packet_sz >= 16) {
+- csr |= MUSB_HSDMA_BURSTMODE_INCR4
++ } else if (packet_sz >= 16) {
++ csr |= MUSB_HSDMA_BURSTMODE_INCR4
+ << MUSB_HSDMA_BURSTMODE_SHIFT;
++ }
+ }
+- }
+
+- csr |= (pImplChannel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
+- | (1 << MUSB_HSDMA_ENABLE_SHIFT)
+- | (1 << MUSB_HSDMA_IRQENABLE_SHIFT)
+- | (pImplChannel->transmit
+- ? (1 << MUSB_HSDMA_TRANSMIT_SHIFT)
+- : 0);
+-
+- /* address/count */
+- musb_writel(mbase,
+- MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_ADDRESS),
+- dma_addr);
+- musb_writel(mbase,
+- MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_COUNT),
+- len);
+-
+- /* control (this should start things) */
+- musb_writew(mbase,
+- MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_CONTROL),
+- csr);
++ csr |= (pImplChannel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT)
++ | (1 << MUSB_HSDMA_ENABLE_SHIFT)
++ | (1 << MUSB_HSDMA_IRQENABLE_SHIFT)
++ | (pImplChannel->transmit
++ ? (1 << MUSB_HSDMA_TRANSMIT_SHIFT)
++ : 0);
++
++ /* address/count */
++ musb_writel(mbase,
++ MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_ADDRESS),
++ dma_addr);
++ musb_writel(mbase,
++ MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_COUNT),
++ len);
++
++ /* control (this should start things) */
++ musb_writew(mbase,
++ MUSB_HSDMA_CHANNEL_OFFSET(bChannel, MUSB_HSDMA_CONTROL),
++ csr);
++ } /* Mentor DMA */
+ }
+
+ static int dma_channel_program(struct dma_channel *pChannel,
+@@ -265,6 +364,12 @@ static int dma_channel_abort(struct dma_
+ MUSB_EP_OFFSET(pImplChannel->epnum, MUSB_TXCSR),
+ csr);
+ } else {
++ if (pImplChannel->sysdma_channel != -1) {
++ omap_stop_dma(pImplChannel->sysdma_channel);
++ omap_free_dma(pImplChannel->sysdma_channel);
++ pImplChannel->sysdma_channel = -1;
++ }
++
+ csr = musb_readw(mbase,
+ MUSB_EP_OFFSET(pImplChannel->epnum, MUSB_RXCSR));
+ csr &= ~(MUSB_RXCSR_AUTOCLEAR |
+Index: linux-omap-2.6/drivers/usb/musb/Kconfig
+===================================================================
+--- linux-omap-2.6.orig/drivers/usb/musb/Kconfig 2008-07-28 10:54:37.000000000 +0530
++++ linux-omap-2.6/drivers/usb/musb/Kconfig 2008-08-12 13:18:34.000000000 +0530
+@@ -150,6 +150,14 @@ config USB_INVENTRA_DMA
+ help
+ Enable DMA transfers using Mentor's engine.
+
++config MUSB_USE_SYSTEM_DMA_RX
++ bool 'Use System DMA for RX endpoints'
++ depends on USB_MUSB_HDRC && USB_INVENTRA_DMA
++ help
++ MUSB RTL version 1.4 has a hardware issue when TX and RX DMA
++ channels are simultaneously enabled. To work around this issue,
++ you can choose to use System DMA for RX channels.
++
+ config USB_TI_CPPI_DMA
+ bool
+ depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+++ /dev/null
---- kernel-2.6.27.orig/drivers/video/omap/dispc.c
-+++ kernel-2.6.27/drivers/video/omap/dispc.c
-@@ -314,6 +319,32 @@
- }
- EXPORT_SYMBOL(omap_dispc_enable_digit_out);
-
-+extern void omap_dispc_set_plane_base(int plane, u32 paddr)
-+{
-+ u32 reg;
-+ u32 val;
-+
-+ switch (plane) {
-+ case 0:
-+ reg = DISPC_GFX_BA0;
-+ break;
-+ case 1:
-+ reg = DISPC_VID1_BASE + DISPC_VID_BA0;
-+ break;
-+ case 2:
-+ reg = DISPC_VID2_BASE + DISPC_VID_BA0;
-+ break;
-+ default:
-+ BUG();
-+ return;
-+ }
-+
-+ dispc_write_reg(reg, paddr);
-+ val = dispc_read_reg(DISPC_CONTROL) | (1 << 5); /* GOLCD */
-+ dispc_write_reg(DISPC_CONTROL, val);
-+}
-+EXPORT_SYMBOL(omap_dispc_set_plane_base);
-+
- static inline int _setup_plane(int plane, int channel_out,
- u32 paddr, int screen_width,
- int pos_x, int pos_y, int width, int height,
---- /tmp/dispc.h 2008-12-09 15:13:12.000000000 +0100
-+++ git/drivers/video/omap/dispc.h 2008-12-09 15:13:36.000000000 +0100
-@@ -32,6 +32,8 @@
- #define DISPC_TFT_DATA_LINES_18 2
- #define DISPC_TFT_DATA_LINES_24 3
-
-+extern void omap_dispc_set_plane_base(int plane, u32 paddr);
-+
- extern void omap_dispc_set_lcd_size(int width, int height);
-
- extern void omap_dispc_enable_lcd_out(int enable);
COMPATIBLE_MACHINE = "omap3-pandora"
-#GIT HEAD for Rev2
-SRCREV = "7aeecd01683d0b1087122d442346b2945c480cf7"
-
-#Rev2
-SRC_URI = " \
- git://git.openpandora.org/pandora-kernel.git;protocol=git;branch=pandora-27-omap1 \
-"
+# ----- Revision 2 Boards -----
+#GIT HEAD for Rev2 - Same as Rev3 without Batt Fuel Guage and Nub/Button changes.
-#GIT HEAD for Rev3
-#SRCREV = "4162fb142cd8d5a435b69fa44d6b1eec349420c9"
+#SRCREV = "45dce3afbd5c2d2af899ae7e7a107d01a5c15558"
-#Rev3
#SRC_URI = " \
-# git://git.openpandora.org/pandora-kernel.git;protocol=git;branch=rev3 \
-#"
+# git://git.openpandora.org/pandora-kernel.git;protocol=git;branch=rev2 \
+#"
+
+# -----------------------------
+
+
+# ----- Revision 3 > Boards -----
+
+#GIT HEAD for Rev3 > (i.e. Shipping units) - Will run on Rev2 boards without Nubs and an incorrect Start button.
+
+SRCREV = "f7b5502275bd0952c2a0935cb47e8f47b55af563"
+
+SRC_URI = " \
+ git://git.openpandora.org/pandora-kernel.git;protocol=git;branch=pandora-27-omap1 \
+"
+
+# -------------------------------
PV = "2.6.27-pandora+${PR}+git${SRCREV}"
file://0001-Removed-resolution-check-that-prevents-scaling-when.patch;patch=1 \
file://0001-Implement-downsampling-with-debugs.patch;patch=1 \
file://sitecomwl168-support.diff;patch=1 \
-# file://pvr/dispc.patch;patch=1 \
file://musb-rxtx.patch;patch=1 \
-# file://0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch;patch=1 \
file://0001-SDIO-patches-to-put-some-card-into-into-platform-dev.patch;patch=1 \
+ file://0002-Add-a-very-basic-platform-driver-module-to-bring-up-.patch;patch=1 \
+ file://0003-Remove-old-msm_wifi-hack-as-the-temp-platform-driver.patch;patch=1 \
"
S = "${WORKDIR}/git"