12 #include <mach/hardware.h>
15 #define MUSB_DMA40_RX_CH { \
16 .mode = STEDMA40_MODE_LOGICAL, \
17 .dir = STEDMA40_PERIPH_TO_MEM, \
18 .dst_dev_type = STEDMA40_DEV_DST_MEMORY, \
19 .src_info.data_width = STEDMA40_WORD_WIDTH, \
20 .dst_info.data_width = STEDMA40_WORD_WIDTH, \
21 .src_info.psize = STEDMA40_PSIZE_LOG_16, \
22 .dst_info.psize = STEDMA40_PSIZE_LOG_16, \
25 #define MUSB_DMA40_TX_CH { \
26 .mode = STEDMA40_MODE_LOGICAL, \
27 .dir = STEDMA40_MEM_TO_PERIPH, \
28 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, \
29 .src_info.data_width = STEDMA40_WORD_WIDTH, \
30 .dst_info.data_width = STEDMA40_WORD_WIDTH, \
31 .src_info.psize = STEDMA40_PSIZE_LOG_16, \
32 .dst_info.psize = STEDMA40_PSIZE_LOG_16, \
82 .dma_rx_param_array = ux500_dma_rx_param_array,
83 .dma_tx_param_array = ux500_dma_tx_param_array,
100 .config = &musb_hdrc_config,
101 .board_data = &musb_board_data,
104 static struct resource usb_resources[] = {
117 .name =
"musb-ux500",
120 .platform_data = &musb_platform_data,
121 .dma_mask = &ux500_musb_dmamask,
125 .resource = usb_resources,
128 static inline void ux500_usb_dma_update_rx_ch_config(
int *src_dev_type)
133 musb_dma_rx_ch[idx].src_dev_type = src_dev_type[idx];
136 static inline void ux500_usb_dma_update_tx_ch_config(
int *dst_dev_type)
141 musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx];
145 int *dma_rx_cfg,
int *dma_tx_cfg)
147 ux500_musb_device.
resource[0].start = base;
149 ux500_musb_device.
resource[1].start = irq;
150 ux500_musb_device.
resource[1].end = irq;
152 ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
153 ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
155 ux500_musb_device.
dev.parent = parent;