xref: /openbmc/linux/arch/sparc/include/asm/fb.h (revision 8cfa7186)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SPARC_FB_H_
3 #define _SPARC_FB_H_
4 
5 #include <linux/io.h>
6 
7 struct fb_info;
8 struct file;
9 struct vm_area_struct;
10 
11 #ifdef CONFIG_SPARC32
12 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
13 				unsigned long off)
14 { }
15 #define fb_pgprotect fb_pgprotect
16 #endif
17 
18 int fb_is_primary_device(struct fb_info *info);
19 #define fb_is_primary_device fb_is_primary_device
20 
21 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
22 {
23 	sbus_memcpy_fromio(to, from, n);
24 }
25 #define fb_memcpy_fromio fb_memcpy_fromio
26 
27 static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
28 {
29 	sbus_memcpy_toio(to, from, n);
30 }
31 #define fb_memcpy_toio fb_memcpy_toio
32 
33 static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
34 {
35 	sbus_memset_io(addr, c, n);
36 }
37 #define fb_memset fb_memset_io
38 
39 #include <asm-generic/fb.h>
40 
41 #endif /* _SPARC_FB_H_ */
42