xref: /openbmc/linux/arch/sparc/include/asm/fb.h (revision 20d54e48)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2a439fe51SSam Ravnborg #ifndef _SPARC_FB_H_
3a439fe51SSam Ravnborg #define _SPARC_FB_H_
44eec0b30SThomas Zimmermann 
58f8eaa1bSThomas Zimmermann #include <linux/io.h>
68f8eaa1bSThomas Zimmermann 
74eec0b30SThomas Zimmermann struct fb_info;
8db76f19aSThomas Zimmermann struct file;
9db76f19aSThomas Zimmermann struct vm_area_struct;
10a439fe51SSam Ravnborg 
11db76f19aSThomas Zimmermann #ifdef CONFIG_SPARC32
fb_pgprotect(struct file * file,struct vm_area_struct * vma,unsigned long off)12a439fe51SSam Ravnborg static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
13a439fe51SSam Ravnborg 				unsigned long off)
14db76f19aSThomas Zimmermann { }
15db76f19aSThomas Zimmermann #define fb_pgprotect fb_pgprotect
16a439fe51SSam Ravnborg #endif
17a439fe51SSam Ravnborg 
184eec0b30SThomas Zimmermann int fb_is_primary_device(struct fb_info *info);
19db76f19aSThomas Zimmermann #define fb_is_primary_device fb_is_primary_device
20db76f19aSThomas Zimmermann 
fb_memcpy_fromio(void * to,const volatile void __iomem * from,size_t n)21*20d54e48SThomas Zimmermann static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
228f8eaa1bSThomas Zimmermann {
238f8eaa1bSThomas Zimmermann 	sbus_memcpy_fromio(to, from, n);
248f8eaa1bSThomas Zimmermann }
25*20d54e48SThomas Zimmermann #define fb_memcpy_fromio fb_memcpy_fromio
268f8eaa1bSThomas Zimmermann 
fb_memcpy_toio(volatile void __iomem * to,const void * from,size_t n)27*20d54e48SThomas Zimmermann static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
288f8eaa1bSThomas Zimmermann {
298f8eaa1bSThomas Zimmermann 	sbus_memcpy_toio(to, from, n);
308f8eaa1bSThomas Zimmermann }
31*20d54e48SThomas Zimmermann #define fb_memcpy_toio fb_memcpy_toio
328f8eaa1bSThomas Zimmermann 
fb_memset_io(volatile void __iomem * addr,int c,size_t n)33*20d54e48SThomas Zimmermann static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
348f8eaa1bSThomas Zimmermann {
358f8eaa1bSThomas Zimmermann 	sbus_memset_io(addr, c, n);
368f8eaa1bSThomas Zimmermann }
37*20d54e48SThomas Zimmermann #define fb_memset fb_memset_io
388f8eaa1bSThomas Zimmermann 
39db76f19aSThomas Zimmermann #include <asm-generic/fb.h>
40a439fe51SSam Ravnborg 
41a439fe51SSam Ravnborg #endif /* _SPARC_FB_H_ */
42