xref: /openbmc/linux/arch/m68k/include/asm/fb.h (revision 5d37a119)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_FB_H_
3 #define _ASM_FB_H_
4 
5 #include <asm/page.h>
6 #include <asm/setup.h>
7 
8 struct file;
9 
10 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 				unsigned long off)
12 {
13 #ifdef CONFIG_MMU
14 #ifdef CONFIG_SUN3
15 	pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
16 #else
17 	if (CPU_IS_020_OR_030)
18 		pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030;
19 	if (CPU_IS_040_OR_060) {
20 		pgprot_val(vma->vm_page_prot) &= _CACHEMASK040;
21 		/* Use no-cache mode, serialized */
22 		pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S;
23 	}
24 #endif /* CONFIG_SUN3 */
25 #endif /* CONFIG_MMU */
26 }
27 #define fb_pgprotect fb_pgprotect
28 
29 #include <asm-generic/fb.h>
30 
31 #endif /* _ASM_FB_H_ */
32