#include <linux/errno.h>
#include <linux/dmapool.h>
-#include "dma.h"
-#include "musbdefs.h"
+#include "musb_dma.h"
+#include "musb_core.h"
#include "davinci.h"
/* CPPI data structure definitions */
-#define CPPI_DESCRIPTOR_ALIGN 16 // bytes; 5-dec docs say 4-byte align
+#define CPPI_DESCRIPTOR_ALIGN 16 /* bytes; 5-dec docs say 4-byte align */
struct cppi_descriptor {
/* Hardware Overlay */
- u32 hNext; /**< Next(hardware) Buffer Descriptor Pointer */
- u32 buffPtr; /**<Buffer Pointer (dma_addr_t) */
- u32 bOffBLen; /**<Buffer_offset16,buffer_length16 */
- u32 hOptions; /**<Option fields for SOP,EOP etc*/
+ u32 hNext; /* Next(hardware) Buffer Descriptor Pointer */
+ u32 buffPtr; /* Buffer Pointer (dma_addr_t) */
+ u32 bOffBLen; /* Buffer_offset16,buffer_length16 */
+ u32 hOptions; /* Option fields for SOP,EOP etc*/
struct cppi_descriptor *next;
dma_addr_t dma; /* address of this descriptor */
} __attribute__ ((aligned(CPPI_DESCRIPTOR_ALIGN)));
-/* forward declaration for CppiDmaController structure */
struct cppi;
/**
struct dma_channel Channel;
/* back pointer to the Dma Controller structure */
- struct cppi *pController;
+ struct cppi *controller;
/* which direction of which endpoint? */
- struct musb_hw_ep *pEndPt;
- u8 bTransmit;
+ struct musb_hw_ep *hw_ep;
+ bool transmit;
u8 chNo;
/* DMA modes: RNDIS or "transparent" */