Part Number: AM3352
Tool/software: Linux
IF the pc bulk out 64byte data to AM335X usb device (Peripheral+ Transparent DMA Mode)
How do i get the 64 byte Buffer data in the cppi41_dma kernel driver ?
(Because the PC software can not send ZLP, so I can not get 64byte from the GADGET layer)
The Process is as following when pc bulk out data to am335x
cppi41dma_Interrupt => cppi41_completion => usb_process_rx_queue => usb_process_rx_bd...
I can't get the Buffer data using the following method
data[i]=cppi_readl(rx_ch->queue_obj.base_addr+(i*4));
printk("data[%d]=%08x\r\n",i,data[i]);
io_base = (volatile u32 *)ioremap (curr_pd->hw_desc.buf_ptr, 64);
data[0]=*((volatile u32 *)(io_base));
printk("data[0]=%08x\r\n",data[0]);
/**
* struct cppi41_channel - DMA Channel Control Structure
*
* Using the same for Tx/Rx.
*/
struct cppi41_channel {
struct dma_channel channel;
struct cppi41_dma_ch_obj dma_ch_obj; /* DMA channel object */
struct cppi41_queue src_queue; /* Tx queue or Rx free descriptor/ */
/* buffer queue */
struct cppi41_queue_obj queue_obj; /* Tx queue object or Rx free */
/* descriptor/buffer queue object */
u32 tag_info; /* Tx PD Tag Information field */
/* Which direction of which endpoint? */
struct musb_hw_ep *end_pt;
u8 transmit;
u8 ch_num; /* Channel number of Tx/Rx 0..3 */
/* DMA mode: "transparent", RNDIS, CDC, or Generic RNDIS */
u8 dma_mode;
u8 autoreq;
/* Book keeping for the current transfer request */
dma_addr_t start_addr;
u32 length;
u32 curr_offset;
u16 pkt_size;
u8 transfer_mode;
u8 zlp_queued;
u8 inf_mode;
u8 tx_complete;
u8 rx_complete;
u8 hb_mult;
u8 txdma_intr_first;
u8 txfifo_intr_enable;
u8 count;
u8 txfifo_intr_first;
u8 xfer_state;
struct usb_pkt_desc *curr_pd;
};

