#define DMA_SYNC_RESTART 1
struct dmasg {
- unsigned long next_desc_addr;
+ void *next_desc_addr;
unsigned long start_addr;
unsigned short cfg;
unsigned short x_count;
} __attribute__((packed));
struct dma_register {
- unsigned long next_desc_ptr; /* DMA Next Descriptor Pointer register */
+ void *next_desc_ptr; /* DMA Next Descriptor Pointer register */
unsigned long start_addr; /* DMA Start address register */
unsigned short cfg; /* DMA Configuration register */
short y_modify; /* DMA y_modify register */
unsigned short dummy5;
- unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer
+ void *curr_desc_ptr; /* DMA Current Descriptor Pointer
register */
unsigned long curr_addr_ptr; /* DMA Current Address Pointer
register */
{
dma_ch[channel].regs->start_addr = addr;
}
-static inline void set_dma_next_desc_addr(unsigned int channel, unsigned long addr)
+static inline void set_dma_next_desc_addr(unsigned int channel, void *addr)
{
dma_ch[channel].regs->next_desc_ptr = addr;
}
-static inline void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr)
+static inline void set_dma_curr_desc_addr(unsigned int channel, void *addr)
{
dma_ch[channel].regs->curr_desc_ptr = addr;
}
{
return dma_ch[channel].regs->curr_y_count;
}
-static inline unsigned long get_dma_next_desc_ptr(unsigned int channel)
+static inline void *get_dma_next_desc_ptr(unsigned int channel)
{
return dma_ch[channel].regs->next_desc_ptr;
}
-static inline unsigned long get_dma_curr_desc_ptr(unsigned int channel)
+static inline void *get_dma_curr_desc_ptr(unsigned int channel)
{
return dma_ch[channel].regs->curr_desc_ptr;
}
static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize)
{
dma_ch[channel].regs->cfg |= ((ndsize & 0x0F) << 8);
- dma_ch[channel].regs->next_desc_ptr = (unsigned long)sg;
+ dma_ch[channel].regs->next_desc_ptr = sg;
}
static inline int dma_channel_active(unsigned int channel)