xref: /linux/arch/arm/include/asm/hardware/memc.h (revision d2912cb15bdda8ba4a5dd73396ad62641af2f520)
1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
24baa9922SRussell King /*
34baa9922SRussell King  *  arch/arm/include/asm/hardware/memc.h
44baa9922SRussell King  *
54baa9922SRussell King  *  Copyright (C) Russell King.
64baa9922SRussell King  */
74baa9922SRussell King #define VDMA_ALIGNMENT	PAGE_SIZE
84baa9922SRussell King #define VDMA_XFERSIZE	16
94baa9922SRussell King #define VDMA_INIT	0
104baa9922SRussell King #define VDMA_START	1
114baa9922SRussell King #define VDMA_END	2
124baa9922SRussell King 
134baa9922SRussell King #ifndef __ASSEMBLY__
144baa9922SRussell King extern void memc_write(unsigned int reg, unsigned long val);
154baa9922SRussell King 
164baa9922SRussell King #define video_set_dma(start,end,offset)				\
174baa9922SRussell King do {								\
184baa9922SRussell King 	memc_write (VDMA_START, (start >> 2));			\
194baa9922SRussell King 	memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2);	\
204baa9922SRussell King 	memc_write (VDMA_INIT, (offset >> 2));			\
214baa9922SRussell King } while (0)
224baa9922SRussell King 
234baa9922SRussell King #endif
24