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