1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _SPARC_VIDEO_H_ 3 #define _SPARC_VIDEO_H_ 4 5 #include <linux/io.h> 6 #include <linux/types.h> 7 8 #include <asm/page.h> 9 10 struct device; 11 12 #ifdef CONFIG_SPARC32 13 static inline pgprot_t pgprot_framebuffer(pgprot_t prot, 14 unsigned long vm_start, unsigned long vm_end, 15 unsigned long offset) 16 { 17 return prot; 18 } 19 #define pgprot_framebuffer pgprot_framebuffer 20 #endif 21 22 bool video_is_primary_device(struct device *dev); 23 #define video_is_primary_device video_is_primary_device 24 25 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) 26 { 27 sbus_memcpy_fromio(to, from, n); 28 } 29 #define fb_memcpy_fromio fb_memcpy_fromio 30 31 static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n) 32 { 33 sbus_memcpy_toio(to, from, n); 34 } 35 #define fb_memcpy_toio fb_memcpy_toio 36 37 static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) 38 { 39 sbus_memset_io(addr, c, n); 40 } 41 #define fb_memset fb_memset_io 42 43 #include <asm-generic/video.h> 44 45 #endif /* _SPARC_VIDEO_H_ */ 46