aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-02-05 23:25:53 -0500
committerGreg Ungerer <gerg@uclinux.org>2009-03-24 01:17:44 -0400
commit146b7cdba2c7afb14d965a5dc466a6532084042a (patch)
tree58f12234a5c563607d2bee06d9dd52d68bb078fe /arch/m68k
parent4892242a47fe21724ee6a98d71d9c512716ea89d (diff)
m68k: merge the mmu and non-mmu versions of fb.h
Trivial merge of the mmu and non-mmu versions of fb.h Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/fb.h41
-rw-r--r--arch/m68k/include/asm/fb_mm.h34
-rw-r--r--arch/m68k/include/asm/fb_no.h12
3 files changed, 37 insertions, 50 deletions
diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h
index 97bcaefd2064..be4e4c6797e8 100644
--- a/arch/m68k/include/asm/fb.h
+++ b/arch/m68k/include/asm/fb.h
@@ -1,5 +1,38 @@
1#ifdef __uClinux__ 1#ifndef _ASM_FB_H_
2#include "fb_no.h" 2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7#include <asm/setup.h>
8
9#ifdef CONFIG_MMU
10#ifdef CONFIG_SUN3
11static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
12 unsigned long off)
13{
14 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
15}
3#else 16#else
4#include "fb_mm.h" 17static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
5#endif 18 unsigned long off)
19{
20 if (CPU_IS_020_OR_030)
21 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030;
22 if (CPU_IS_040_OR_060) {
23 pgprot_val(vma->vm_page_prot) &= _CACHEMASK040;
24 /* Use no-cache mode, serialized */
25 pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S;
26 }
27}
28#endif /* CONFIG_SUN3 */
29#else
30#define fb_pgprotect(...) do {} while (0)
31#endif /* CONFIG_MMU */
32
33static inline int fb_is_primary_device(struct fb_info *info)
34{
35 return 0;
36}
37
38#endif /* _ASM_FB_H_ */
diff --git a/arch/m68k/include/asm/fb_mm.h b/arch/m68k/include/asm/fb_mm.h
deleted file mode 100644
index 380b97ae8157..000000000000
--- a/arch/m68k/include/asm/fb_mm.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7#include <asm/setup.h>
8
9#ifdef CONFIG_SUN3
10static 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
16static 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
29static inline int fb_is_primary_device(struct fb_info *info)
30{
31 return 0;
32}
33
34#endif /* _ASM_FB_H_ */
diff --git a/arch/m68k/include/asm/fb_no.h b/arch/m68k/include/asm/fb_no.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/arch/m68k/include/asm/fb_no.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */