X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ppc%2Fppc4xx_dma.h;h=46a086fff81629e95d3efad1bc585ed346119702;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=5b82faff92dc2539d1ef5369f4102ae0fb30d03e;hpb=5fc42a6ed0ec81088c37caadb45898ae6cd0ad2c;p=linux-2.6.git diff --git a/include/asm-ppc/ppc4xx_dma.h b/include/asm-ppc/ppc4xx_dma.h index 5b82faff9..46a086fff 100644 --- a/include/asm-ppc/ppc4xx_dma.h +++ b/include/asm-ppc/ppc4xx_dma.h @@ -33,9 +33,6 @@ #define MAX_PPC4xx_DMA_CHANNELS 4 -/* in arch/ppc/kernel/setup.c -- Cort */ -extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ; - /* * Function return status codes * These values are used to indicate whether or not the function @@ -137,10 +134,11 @@ extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ; #define DMA_TCE_ENABLE (1<<(8-DMA_CR_OFFSET)) #define SET_DMA_TCE(x) (((x)&0x1)<<(8-DMA_CR_OFFSET)) -#define DMA_DEC (1<<(2) /* Address Decrement */ +#define DMA_DEC (1<<(2)) /* Address Decrement */ #define SET_DMA_DEC(x) (((x)&0x1)<<2) #define GET_DMA_DEC(x) (((x)&DMA_DEC)>>2) + /* * Transfer Modes * These modes are defined in a way that makes it possible to @@ -244,6 +242,14 @@ typedef uint32_t sgl_handle_t; #define DMA_SG2 (1<<5) #define DMA_SG3 (1<<4) +/* DMA Channel Count Register */ +#define DMA_CTC_BTEN (1<<23) /* Burst Enable/Disable bit */ +#define DMA_CTC_BSIZ_MSK (3<<21) /* Mask of the Burst size bits */ +#define DMA_CTC_BSIZ_2 (0) +#define DMA_CTC_BSIZ_4 (1<<21) +#define DMA_CTC_BSIZ_8 (2<<21) +#define DMA_CTC_BSIZ_16 (3<<21) + /* * DMA SG Command Register */ @@ -276,7 +282,7 @@ typedef uint32_t sgl_handle_t; #define GET_DMA_POLARITY(chan) (DMAReq_ActiveLow(chan) | DMAAck_ActiveLow(chan) | EOT_ActiveLow(chan)) -#elif defined(CONFIG_STBXXX_DMA) /* stb03xxx */ +#elif defined(CONFIG_STB03xxx) /* stb03xxx */ #define DMA_PPC4xx_SIZE 4096 @@ -482,6 +488,7 @@ typedef struct { char td; /* transfer direction */ #endif + char int_on_final_sg;/* for scatter/gather - only interrupt on last sg */ } ppc_dma_ch_t; /* @@ -545,6 +552,9 @@ extern int ppc4xx_delete_dma_sgl_element(sgl_handle_t, phys_addr_t *, phys_addr_ extern int ppc4xx_alloc_dma_handle(sgl_handle_t *, unsigned int, unsigned int); extern void ppc4xx_free_dma_handle(sgl_handle_t); extern int ppc4xx_get_dma_status(void); +extern int ppc4xx_enable_burst(unsigned int); +extern int ppc4xx_disable_burst(unsigned int); +extern int ppc4xx_set_burst_size(unsigned int, unsigned int); extern void ppc4xx_set_src_addr(int dmanr, phys_addr_t src_addr); extern void ppc4xx_set_dst_addr(int dmanr, phys_addr_t dst_addr); extern void ppc4xx_enable_dma(unsigned int dmanr);