aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/pxa2xx_udc.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-06-30 09:30:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:34:42 -0400
commitad8c623f4f48085edd51c7f4cdfd10295547bf45 (patch)
treedc28542ddc3173dab56fa6d4cd8694686f028968 /drivers/usb/gadget/pxa2xx_udc.h
parent9068a4c6467986e8fda5bdb29bd5f10c6788e2ff (diff)
USB: pxa2xx_udc -- cleanups, mostly removing dma hooks
Cleanups to the pxa2xx_udc code: - Primarily removing unused DMA hooks. - One "sparse" warning removed - Remove some Lubbock-only LED hooks (for debugging) That DMA code was never really completed. It worked, mostly, for IN transfers (to the host) if they were fortuitously aligned, but that code was never fully tested. And it was never coded for OUT transfers (which is where DMA would really help) ... because of chip errata on essentially every chip other than the pxa255, and because of design botches (nothing automated data toggle). So it's effectively been dead code for several years now ... no point in keeping it around. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.h')
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.h42
1 files changed, 2 insertions, 40 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
index 6b012e06af3a..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
83struct pxa2xx_request { 75struct pxa2xx_request {
@@ -85,7 +77,7 @@ struct pxa2xx_request {
85 struct list_head queue; 77 struct list_head queue;
86}; 78};
87 79
88enum ep0_state { 80enum 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
178static struct pxa2xx_udc *the_controller; 140static struct pxa2xx_udc *the_controller;
179 141
180/*-------------------------------------------------------------------------*/ 142/*-------------------------------------------------------------------------*/