xref: /linux/arch/mips/include/asm/video.h (revision 30e48a75df9c6ead93866bdf1511ca6ecfe17fbe)
1 #ifndef _ASM_VIDEO_H_
2 #define _ASM_VIDEO_H_
3 
4 #include <asm/page.h>
5 
6 static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
7 					  unsigned long vm_start, unsigned long vm_end,
8 					  unsigned long offset)
9 {
10 	return pgprot_noncached(prot);
11 }
12 #define pgprot_framebuffer pgprot_framebuffer
13 
14 /*
15  * MIPS doesn't define __raw_ I/O macros, so the helpers
16  * in <asm-generic/video.h> don't generate fb_readq() and
17  * fb_writeq(). We have to provide them here.
18  *
19  * TODO: Convert MIPS to generic I/O. The helpers below can
20  *       then be removed.
21  */
22 #ifdef CONFIG_64BIT
23 static inline u64 fb_readq(const volatile void __iomem *addr)
24 {
25 	return __raw_readq(addr);
26 }
27 #define fb_readq fb_readq
28 
29 static inline void fb_writeq(u64 b, volatile void __iomem *addr)
30 {
31 	__raw_writeq(b, addr);
32 }
33 #define fb_writeq fb_writeq
34 #endif
35 
36 #include <asm-generic/video.h>
37 
38 #endif /* _ASM_VIDEO_H_ */
39