fb.h 792 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _ASM_FB_H_
  2. #define _ASM_FB_H_
  3. #include <linux/fb.h>
  4. #include <linux/fs.h>
  5. #include <asm/page.h>
  6. #include <asm/setup.h>
  7. #ifdef CONFIG_SUN3
  8. static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
  9. unsigned long off)
  10. {
  11. pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
  12. }
  13. #else
  14. static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
  15. unsigned long off)
  16. {
  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. }
  25. #endif /* CONFIG_SUN3 */
  26. static inline int fb_is_primary_device(struct fb_info *info)
  27. {
  28. return 0;
  29. }
  30. #endif /* _ASM_FB_H_ */