Commit ad8c623f authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9068a4c6
This diff is collapsed.
...@@ -54,8 +54,6 @@ struct pxa2xx_ep { ...@@ -54,8 +54,6 @@ struct pxa2xx_ep {
const struct usb_endpoint_descriptor *desc; const struct usb_endpoint_descriptor *desc;
struct list_head queue; struct list_head queue;
unsigned long pio_irqs; unsigned long pio_irqs;
unsigned long dma_irqs;
short dma;
unsigned short fifo_size; unsigned short fifo_size;
u8 bEndpointAddress; u8 bEndpointAddress;
...@@ -63,7 +61,7 @@ struct pxa2xx_ep { ...@@ -63,7 +61,7 @@ struct pxa2xx_ep {
unsigned stopped : 1; unsigned stopped : 1;
unsigned dma_fixup : 1; unsigned dma_fixup : 1;
/* UDCCS = UDC Control/Status for this EP /* UDCCS = UDC Control/Status for this EP
* UBCR = UDC Byte Count Remaining (contents of OUT fifo) * UBCR = UDC Byte Count Remaining (contents of OUT fifo)
* UDDR = UDC Endpoint Data Register (the fifo) * UDDR = UDC Endpoint Data Register (the fifo)
...@@ -72,12 +70,6 @@ struct pxa2xx_ep { ...@@ -72,12 +70,6 @@ struct pxa2xx_ep {
volatile u32 *reg_udccs; volatile u32 *reg_udccs;
volatile u32 *reg_ubcr; volatile u32 *reg_ubcr;
volatile u32 *reg_uddr; volatile u32 *reg_uddr;
#ifdef USE_DMA
volatile u32 *reg_drcmr;
#define drcmr(n) .reg_drcmr = & DRCMR ## n ,
#else
#define drcmr(n)
#endif
}; };
struct pxa2xx_request { struct pxa2xx_request {
...@@ -85,7 +77,7 @@ struct pxa2xx_request { ...@@ -85,7 +77,7 @@ struct pxa2xx_request {
struct list_head queue; struct list_head queue;
}; };
enum ep0_state { enum ep0_state {
EP0_IDLE, EP0_IDLE,
EP0_IN_DATA_PHASE, EP0_IN_DATA_PHASE,
EP0_OUT_DATA_PHASE, EP0_OUT_DATA_PHASE,
...@@ -108,7 +100,6 @@ struct udc_stats { ...@@ -108,7 +100,6 @@ struct udc_stats {
#ifdef CONFIG_USB_PXA2XX_SMALL #ifdef CONFIG_USB_PXA2XX_SMALL
/* when memory's tight, SMALL config saves code+data. */ /* when memory's tight, SMALL config saves code+data. */
#undef USE_DMA
#define PXA_UDC_NUM_ENDPOINTS 3 #define PXA_UDC_NUM_ENDPOINTS 3
#endif #endif
...@@ -144,37 +135,8 @@ struct pxa2xx_udc { ...@@ -144,37 +135,8 @@ struct pxa2xx_udc {
#ifdef CONFIG_ARCH_LUBBOCK #ifdef CONFIG_ARCH_LUBBOCK
#include <asm/arch/lubbock.h> #include <asm/arch/lubbock.h>
/* lubbock can also report usb connect/disconnect irqs */ /* lubbock can also report usb connect/disconnect irqs */
#ifdef DEBUG
#define HEX_DISPLAY(n) if (machine_is_lubbock()) { LUB_HEXLED = (n); }
#endif #endif
#endif
/*-------------------------------------------------------------------------*/
/* LEDs are only for debug */
#ifndef HEX_DISPLAY
#define HEX_DISPLAY(n) do {} while(0)
#endif
#ifdef DEBUG
#include <asm/leds.h>
#define LED_CONNECTED_ON leds_event(led_green_on)
#define LED_CONNECTED_OFF do { \
leds_event(led_green_off); \
HEX_DISPLAY(0); \
} while(0)
#endif
#ifndef LED_CONNECTED_ON
#define LED_CONNECTED_ON do {} while(0)
#define LED_CONNECTED_OFF do {} while(0)
#endif
/*-------------------------------------------------------------------------*/
static struct pxa2xx_udc *the_controller; static struct pxa2xx_udc *the_controller;
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment