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