u-boot-mkimage-gta01-native: re-add till uboot-utils actually works
[openembedded.git] / packages / linux / linux-ezx-2.6.21 / mux-ifdef-ezx-features.patch
1 Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c
2 ===================================================================
3 --- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c   2007-04-24 16:31:51.000000000 +0200
4 +++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c        2007-04-24 16:34:57.000000000 +0200
5 @@ -35,10 +35,14 @@
6  #include <linux/list.h>
7  #include <linux/errno.h>
8  #include <asm/uaccess.h>
9 +
10 +#ifdef CONFIG_PXA_EZX
11  #include <asm/hardware.h>
12  #include <asm/arch/hardware.h>
13  #include <asm/arch-pxa/pxa-regs.h>
14  #include <asm/arch-pxa/ezx.h>
15 +#endif
16 +
17  #include <linux/slab.h>
18  #include <linux/miscdevice.h>
19  #include <linux/init.h>
20 @@ -341,8 +345,10 @@
21  
22  static void wakeup_timeout(unsigned long data)
23  {
24 +#ifdef CONFIG_PXA_EZX
25         GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW);
26         bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!");
27 +#endif
28  }
29  
30  static void suspend_timeout(unsigned long data)
31 @@ -353,10 +359,12 @@
32                 bvd_dbg("suspend_timeout: add the suspend timer again");
33         } else {
34                 unlink_urbs(&bvd_ipc->readurb_mux);
35 +#ifdef CONFIG_PXA_EZX
36                 UHCRHPS3 = 0x4;
37                 mdelay(40);
38                 bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x",
39                         UHCRHPS3);
40 +#endif
41         }
42  }
43  
44 @@ -404,6 +412,7 @@
45                 bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num;
46                 bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! ");
47  
48 +#ifdef CONFIG_PXA_EZX
49                 if ((UHCRHPS3 & 0x4) == 0x4) {
50                         static int ret;
51                         int time = 0;
52 @@ -442,6 +451,7 @@
53                                         "failed! status=%d\n", ret);
54                         bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!");
55                 }
56 +#endif
57  
58                 sumbit_times++;
59                 bvd_ipc->write_finished_flag = 0;
60 @@ -464,12 +474,16 @@
61  
62  static void usbipc_bh_bp_func(unsigned long param)
63  {
64 +#ifdef CONFIG_PXA_EZX
65         if ((UHCRHPS3 & 0x4) == 0x4) {
66                 UHCRHPS3 = 0x8;
67 +#endif
68                 mdelay(40);
69 +#ifdef CONFIG_PXA_EZX
70                 bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! "
71                         "UHCRHPS3=0x%x", UHCRHPS3);
72         }
73 +#endif
74         if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) {
75                 //get_halted_bit();
76  
77 @@ -734,7 +748,9 @@
78         printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect);
79  
80         //FIXME: Memory leak?
81 +#ifdef CONFIG_PXA_EZX
82         if ((UHCRHPS3 & 0x4) == 0)
83 +#endif
84         //      usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux);
85  
86         //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux);