xref: /linux/arch/arm/include/asm/hardware/memc.h (revision 4baa9922430662431231ac637adedddbb0cfb2d7)
1*4baa9922SRussell King /*
2*4baa9922SRussell King  *  arch/arm/include/asm/hardware/memc.h
3*4baa9922SRussell King  *
4*4baa9922SRussell King  *  Copyright (C) Russell King.
5*4baa9922SRussell King  *
6*4baa9922SRussell King  * This program is free software; you can redistribute it and/or modify
7*4baa9922SRussell King  * it under the terms of the GNU General Public License version 2 as
8*4baa9922SRussell King  * published by the Free Software Foundation.
9*4baa9922SRussell King  */
10*4baa9922SRussell King #define VDMA_ALIGNMENT	PAGE_SIZE
11*4baa9922SRussell King #define VDMA_XFERSIZE	16
12*4baa9922SRussell King #define VDMA_INIT	0
13*4baa9922SRussell King #define VDMA_START	1
14*4baa9922SRussell King #define VDMA_END	2
15*4baa9922SRussell King 
16*4baa9922SRussell King #ifndef __ASSEMBLY__
17*4baa9922SRussell King extern void memc_write(unsigned int reg, unsigned long val);
18*4baa9922SRussell King 
19*4baa9922SRussell King #define video_set_dma(start,end,offset)				\
20*4baa9922SRussell King do {								\
21*4baa9922SRussell King 	memc_write (VDMA_START, (start >> 2));			\
22*4baa9922SRussell King 	memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2);	\
23*4baa9922SRussell King 	memc_write (VDMA_INIT, (offset >> 2));			\
24*4baa9922SRussell King } while (0)
25*4baa9922SRussell King 
26*4baa9922SRussell King #endif
27