| Antonino A. Daplas | 10eb265 | 2007-07-17 04:05:27 -0700 | [diff] [blame] | 1 | #ifndef _ASM_FB_H_ | 
 | 2 | #define _ASM_FB_H_ | 
 | 3 |  | 
| Antonino A. Daplas | 317b3c2 | 2007-07-17 04:05:28 -0700 | [diff] [blame] | 4 | #include <linux/fb.h> | 
| Antonino A. Daplas | 10eb265 | 2007-07-17 04:05:27 -0700 | [diff] [blame] | 5 | #include <linux/fs.h> | 
 | 6 | #include <asm/page.h> | 
 | 7 | #include <asm/setup.h> | 
 | 8 |  | 
 | 9 | #ifdef CONFIG_SUN3 | 
 | 10 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | 
 | 11 | 				unsigned long off) | 
 | 12 | { | 
 | 13 | 	pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; | 
 | 14 | } | 
 | 15 | #else | 
 | 16 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | 
 | 17 | 				unsigned long off) | 
 | 18 | { | 
 | 19 | 	if (CPU_IS_020_OR_030) | 
 | 20 | 		pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; | 
 | 21 | 	if (CPU_IS_040_OR_060) { | 
 | 22 | 		pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; | 
 | 23 | 		/* Use no-cache mode, serialized */ | 
 | 24 | 		pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; | 
 | 25 | 	} | 
 | 26 | } | 
 | 27 | #endif /* CONFIG_SUN3 */ | 
 | 28 |  | 
| Antonino A. Daplas | 317b3c2 | 2007-07-17 04:05:28 -0700 | [diff] [blame] | 29 | static inline int fb_is_primary_device(struct fb_info *info) | 
 | 30 | { | 
 | 31 | 	return 0; | 
 | 32 | } | 
 | 33 |  | 
| Antonino A. Daplas | 10eb265 | 2007-07-17 04:05:27 -0700 | [diff] [blame] | 34 | #endif /* _ASM_FB_H_ */ |