Skip to content

Commit

Permalink
MIPS: jz4740: Remove custom DMA API
Browse files Browse the repository at this point in the history
Now that all users of the custom jz4740 DMA API have been converted to use
the dmaengine API instead we can remove the custom API and move all the code
talking to the hardware to the dmaengine driver.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Acked-by: Ralf Baechle <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
larsclausen authored and Vinod Koul committed Jul 5, 2013
1 parent cdcb90a commit 25ce6c3
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 401 deletions.
56 changes: 0 additions & 56 deletions arch/mips/include/asm/mach-jz4740/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#ifndef __ASM_MACH_JZ4740_DMA_H__
#define __ASM_MACH_JZ4740_DMA_H__

struct jz4740_dma_chan;

enum jz4740_dma_request_type {
JZ4740_DMA_TYPE_AUTO_REQUEST = 8,
JZ4740_DMA_TYPE_UART_TRANSMIT = 20,
Expand All @@ -33,58 +31,4 @@ enum jz4740_dma_request_type {
JZ4740_DMA_TYPE_SLCD = 30,
};

enum jz4740_dma_width {
JZ4740_DMA_WIDTH_32BIT = 0,
JZ4740_DMA_WIDTH_8BIT = 1,
JZ4740_DMA_WIDTH_16BIT = 2,
};

enum jz4740_dma_transfer_size {
JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0,
JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1,
JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2,
JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3,
JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4,
};

enum jz4740_dma_flags {
JZ4740_DMA_SRC_AUTOINC = 0x2,
JZ4740_DMA_DST_AUTOINC = 0x1,
};

enum jz4740_dma_mode {
JZ4740_DMA_MODE_SINGLE = 0,
JZ4740_DMA_MODE_BLOCK = 1,
};

struct jz4740_dma_config {
enum jz4740_dma_width src_width;
enum jz4740_dma_width dst_width;
enum jz4740_dma_transfer_size transfer_size;
enum jz4740_dma_request_type request_type;
enum jz4740_dma_flags flags;
enum jz4740_dma_mode mode;
};

typedef void (*jz4740_dma_complete_callback_t)(struct jz4740_dma_chan *, int, void *);

struct jz4740_dma_chan *jz4740_dma_request(void *dev, const char *name);
void jz4740_dma_free(struct jz4740_dma_chan *dma);

void jz4740_dma_configure(struct jz4740_dma_chan *dma,
const struct jz4740_dma_config *config);


void jz4740_dma_enable(struct jz4740_dma_chan *dma);
void jz4740_dma_disable(struct jz4740_dma_chan *dma);

void jz4740_dma_set_src_addr(struct jz4740_dma_chan *dma, dma_addr_t src);
void jz4740_dma_set_dst_addr(struct jz4740_dma_chan *dma, dma_addr_t dst);
void jz4740_dma_set_transfer_count(struct jz4740_dma_chan *dma, uint32_t count);

uint32_t jz4740_dma_get_residue(const struct jz4740_dma_chan *dma);

void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma,
jz4740_dma_complete_callback_t cb);

#endif /* __ASM_JZ4740_DMA_H__ */
2 changes: 1 addition & 1 deletion arch/mips/jz4740/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Object file lists.

obj-y += prom.o irq.o time.o reset.o setup.o dma.o \
obj-y += prom.o irq.o time.o reset.o setup.o \
gpio.o clock.o platform.o timer.o serial.o

obj-$(CONFIG_DEBUG_FS) += clock-debugfs.o
Expand Down
307 changes: 0 additions & 307 deletions arch/mips/jz4740/dma.c

This file was deleted.

Loading

0 comments on commit 25ce6c3

Please sign in to comment.