From 8e71db4a1a7d65f969413927d790f9dc26754d82 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Fri, 6 Feb 2009 14:25:53 +1000 Subject: [PATCH] --- yaml --- r: 139975 b: refs/heads/master c: 146b7cdba2c7afb14d965a5dc466a6532084042a h: refs/heads/master i: 139973: 7d117053ffffa3e90c7948a98e7817fa518d5c52 139971: b28b8a93947b26069a9bd871bae8297f8b0d2544 139967: 4da5d68d09e3b4bcc97c339a604c7ea825bde090 v: v3 --- [refs] | 2 +- trunk/arch/m68k/include/asm/fb.h | 41 ++++++++++++++++++++++++++--- trunk/arch/m68k/include/asm/fb_mm.h | 34 ------------------------ trunk/arch/m68k/include/asm/fb_no.h | 12 --------- 4 files changed, 38 insertions(+), 51 deletions(-) delete mode 100644 trunk/arch/m68k/include/asm/fb_mm.h delete mode 100644 trunk/arch/m68k/include/asm/fb_no.h diff --git a/[refs] b/[refs] index c6290f23993b..3f667827a4fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4892242a47fe21724ee6a98d71d9c512716ea89d +refs/heads/master: 146b7cdba2c7afb14d965a5dc466a6532084042a diff --git a/trunk/arch/m68k/include/asm/fb.h b/trunk/arch/m68k/include/asm/fb.h index 97bcaefd2064..be4e4c6797e8 100644 --- a/trunk/arch/m68k/include/asm/fb.h +++ b/trunk/arch/m68k/include/asm/fb.h @@ -1,5 +1,38 @@ -#ifdef __uClinux__ -#include "fb_no.h" +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include +#include +#include + +#ifdef CONFIG_MMU +#ifdef CONFIG_SUN3 +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; +} #else -#include "fb_mm.h" -#endif +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + if (CPU_IS_020_OR_030) + pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; + if (CPU_IS_040_OR_060) { + pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; + /* Use no-cache mode, serialized */ + pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; + } +} +#endif /* CONFIG_SUN3 */ +#else +#define fb_pgprotect(...) do {} while (0) +#endif /* CONFIG_MMU */ + +static inline int fb_is_primary_device(struct fb_info *info) +{ + return 0; +} + +#endif /* _ASM_FB_H_ */ diff --git a/trunk/arch/m68k/include/asm/fb_mm.h b/trunk/arch/m68k/include/asm/fb_mm.h deleted file mode 100644 index 380b97ae8157..000000000000 --- a/trunk/arch/m68k/include/asm/fb_mm.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ - -#include -#include -#include -#include - -#ifdef CONFIG_SUN3 -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; -} -#else -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - if (CPU_IS_020_OR_030) - pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; - if (CPU_IS_040_OR_060) { - pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; - /* Use no-cache mode, serialized */ - pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; - } -} -#endif /* CONFIG_SUN3 */ - -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} - -#endif /* _ASM_FB_H_ */ diff --git a/trunk/arch/m68k/include/asm/fb_no.h b/trunk/arch/m68k/include/asm/fb_no.h deleted file mode 100644 index c7df38030992..000000000000 --- a/trunk/arch/m68k/include/asm/fb_no.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ -#include - -#define fb_pgprotect(...) do {} while (0) - -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} - -#endif /* _ASM_FB_H_ */