diff options
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.h')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.h | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h index 773e549aff3f..0e5d0e6fb0e2 100644 --- a/drivers/usb/gadget/pxa2xx_udc.h +++ b/drivers/usb/gadget/pxa2xx_udc.h | |||
@@ -54,8 +54,6 @@ struct pxa2xx_ep { | |||
54 | const struct usb_endpoint_descriptor *desc; | 54 | const struct usb_endpoint_descriptor *desc; |
55 | struct list_head queue; | 55 | struct list_head queue; |
56 | unsigned long pio_irqs; | 56 | unsigned long pio_irqs; |
57 | unsigned long dma_irqs; | ||
58 | short dma; | ||
59 | 57 | ||
60 | unsigned short fifo_size; | 58 | unsigned short fifo_size; |
61 | u8 bEndpointAddress; | 59 | u8 bEndpointAddress; |
@@ -63,7 +61,7 @@ struct pxa2xx_ep { | |||
63 | 61 | ||
64 | unsigned stopped : 1; | 62 | unsigned stopped : 1; |
65 | unsigned dma_fixup : 1; | 63 | unsigned dma_fixup : 1; |
66 | 64 | ||
67 | /* UDCCS = UDC Control/Status for this EP | 65 | /* UDCCS = UDC Control/Status for this EP |
68 | * UBCR = UDC Byte Count Remaining (contents of OUT fifo) | 66 | * UBCR = UDC Byte Count Remaining (contents of OUT fifo) |
69 | * UDDR = UDC Endpoint Data Register (the fifo) | 67 | * UDDR = UDC Endpoint Data Register (the fifo) |
@@ -72,12 +70,6 @@ struct pxa2xx_ep { | |||
72 | volatile u32 *reg_udccs; | 70 | volatile u32 *reg_udccs; |
73 | volatile u32 *reg_ubcr; | 71 | volatile u32 *reg_ubcr; |
74 | volatile u32 *reg_uddr; | 72 | volatile u32 *reg_uddr; |
75 | #ifdef USE_DMA | ||
76 | volatile u32 *reg_drcmr; | ||
77 | #define drcmr(n) .reg_drcmr = & DRCMR ## n , | ||
78 | #else | ||
79 | #define drcmr(n) | ||
80 | #endif | ||
81 | }; | 73 | }; |
82 | 74 | ||
83 | struct pxa2xx_request { | 75 | struct pxa2xx_request { |
@@ -85,7 +77,7 @@ struct pxa2xx_request { | |||
85 | struct list_head queue; | 77 | struct list_head queue; |
86 | }; | 78 | }; |
87 | 79 | ||
88 | enum ep0_state { | 80 | enum ep0_state { |
89 | EP0_IDLE, | 81 | EP0_IDLE, |
90 | EP0_IN_DATA_PHASE, | 82 | EP0_IN_DATA_PHASE, |
91 | EP0_OUT_DATA_PHASE, | 83 | EP0_OUT_DATA_PHASE, |
@@ -108,7 +100,6 @@ struct udc_stats { | |||
108 | 100 | ||
109 | #ifdef CONFIG_USB_PXA2XX_SMALL | 101 | #ifdef CONFIG_USB_PXA2XX_SMALL |
110 | /* when memory's tight, SMALL config saves code+data. */ | 102 | /* when memory's tight, SMALL config saves code+data. */ |
111 | #undef USE_DMA | ||
112 | #define PXA_UDC_NUM_ENDPOINTS 3 | 103 | #define PXA_UDC_NUM_ENDPOINTS 3 |
113 | #endif | 104 | #endif |
114 | 105 | ||
@@ -144,37 +135,8 @@ struct pxa2xx_udc { | |||
144 | #ifdef CONFIG_ARCH_LUBBOCK | 135 | #ifdef CONFIG_ARCH_LUBBOCK |
145 | #include <asm/arch/lubbock.h> | 136 | #include <asm/arch/lubbock.h> |
146 | /* lubbock can also report usb connect/disconnect irqs */ | 137 | /* lubbock can also report usb connect/disconnect irqs */ |
147 | |||
148 | #ifdef DEBUG | ||
149 | #define HEX_DISPLAY(n) if (machine_is_lubbock()) { LUB_HEXLED = (n); } | ||
150 | #endif | 138 | #endif |
151 | 139 | ||
152 | #endif | ||
153 | |||
154 | /*-------------------------------------------------------------------------*/ | ||
155 | |||
156 | /* LEDs are only for debug */ | ||
157 | #ifndef HEX_DISPLAY | ||
158 | #define HEX_DISPLAY(n) do {} while(0) | ||
159 | #endif | ||
160 | |||
161 | #ifdef DEBUG | ||
162 | #include <asm/leds.h> | ||
163 | |||
164 | #define LED_CONNECTED_ON leds_event(led_green_on) | ||
165 | #define LED_CONNECTED_OFF do { \ | ||
166 | leds_event(led_green_off); \ | ||
167 | HEX_DISPLAY(0); \ | ||
168 | } while(0) | ||
169 | #endif | ||
170 | |||
171 | #ifndef LED_CONNECTED_ON | ||
172 | #define LED_CONNECTED_ON do {} while(0) | ||
173 | #define LED_CONNECTED_OFF do {} while(0) | ||
174 | #endif | ||
175 | |||
176 | /*-------------------------------------------------------------------------*/ | ||
177 | |||
178 | static struct pxa2xx_udc *the_controller; | 140 | static struct pxa2xx_udc *the_controller; |
179 | 141 | ||
180 | /*-------------------------------------------------------------------------*/ | 142 | /*-------------------------------------------------------------------------*/ |
@@ -204,7 +166,7 @@ static const char *state_name[] = { | |||
204 | # define UDC_DEBUG DBG_NORMAL | 166 | # define UDC_DEBUG DBG_NORMAL |
205 | #endif | 167 | #endif |
206 | 168 | ||
207 | static void __attribute__ ((__unused__)) | 169 | static void __maybe_unused |
208 | dump_udccr(const char *label) | 170 | dump_udccr(const char *label) |
209 | { | 171 | { |
210 | u32 udccr = UDCCR; | 172 | u32 udccr = UDCCR; |
@@ -220,7 +182,7 @@ dump_udccr(const char *label) | |||
220 | (udccr & UDCCR_UDE) ? " ude" : ""); | 182 | (udccr & UDCCR_UDE) ? " ude" : ""); |
221 | } | 183 | } |
222 | 184 | ||
223 | static void __attribute__ ((__unused__)) | 185 | static void __maybe_unused |
224 | dump_udccs0(const char *label) | 186 | dump_udccs0(const char *label) |
225 | { | 187 | { |
226 | u32 udccs0 = UDCCS0; | 188 | u32 udccs0 = UDCCS0; |
@@ -237,7 +199,7 @@ dump_udccs0(const char *label) | |||
237 | (udccs0 & UDCCS0_OPR) ? " opr" : ""); | 199 | (udccs0 & UDCCS0_OPR) ? " opr" : ""); |
238 | } | 200 | } |
239 | 201 | ||
240 | static void __attribute__ ((__unused__)) | 202 | static void __maybe_unused |
241 | dump_state(struct pxa2xx_udc *dev) | 203 | dump_state(struct pxa2xx_udc *dev) |
242 | { | 204 | { |
243 | u32 tmp; | 205 | u32 tmp; |