diff options
author | Martin Fuzzey <mfuzzey@gmail.com> | 2010-10-01 00:21:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 19:22:03 +0200 |
commit | d0cc3d4100e829d726d7c0fbf5b7b8d2146f60ba (patch) | |
tree | 94e3c28cc1e11448c74ed0f7be0a19af761f3c6d /drivers/usb/host/imx21-hcd.h | |
parent | USB: introduce unmap_urb_setup_for_dma() (diff) | |
download | linux-d0cc3d4100e829d726d7c0fbf5b7b8d2146f60ba.tar.xz linux-d0cc3d4100e829d726d7c0fbf5b7b8d2146f60ba.zip |
USB: imx21-hcd accept arbitary transfer buffer alignement.
The hardware can only do DMA to 4 byte aligned addresses.
When this requirement is not met use PIO or a bounce buffer.
PIO is used when the buffer is small enough to directly
use the hardware data memory (2*maxpacket).
A bounce buffer is used for larger transfers.
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/imx21-hcd.h')
-rw-r--r-- | drivers/usb/host/imx21-hcd.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/host/imx21-hcd.h b/drivers/usb/host/imx21-hcd.h index 1b0d913780a5..87b29fd971b4 100644 --- a/drivers/usb/host/imx21-hcd.h +++ b/drivers/usb/host/imx21-hcd.h @@ -250,6 +250,7 @@ #define USBCTRL_USB_BYP (1 << 2) #define USBCTRL_HOST1_TXEN_OE (1 << 1) +#define USBOTG_DMEM 0x1000 /* Values in TD blocks */ #define TD_DIR_SETUP 0 @@ -346,8 +347,8 @@ struct td { struct list_head list; struct urb *urb; struct usb_host_endpoint *ep; - dma_addr_t data; - unsigned long buf_addr; + dma_addr_t dma_handle; + void *cpu_buffer; int len; int frame; int isoc_index; @@ -360,6 +361,8 @@ struct etd_priv { struct td *td; struct list_head queue; dma_addr_t dma_handle; + void *cpu_buffer; + void *bounce_buffer; int alloc; int len; int dmem_size; @@ -412,6 +415,7 @@ struct debug_isoc_trace { struct imx21 { spinlock_t lock; struct device *dev; + struct usb_hcd *hcd; struct mx21_usbh_platform_data *pdata; struct list_head dmem_list; struct list_head queue_for_etd; /* eps queued due to etd shortage */ |