1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 4 */ 5 #ifndef _ASM_VIDEO_H_ 6 #define _ASM_VIDEO_H_ 7 8 #include <linux/compiler.h> 9 #include <linux/string.h> 10 11 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) 12 { 13 memcpy(to, (void __force *)from, n); 14 } 15 #define fb_memcpy_fromio fb_memcpy_fromio 16 17 static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n) 18 { 19 memcpy((void __force *)to, from, n); 20 } 21 #define fb_memcpy_toio fb_memcpy_toio 22 23 static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) 24 { 25 memset((void __force *)addr, c, n); 26 } 27 #define fb_memset fb_memset_io 28 29 #include <asm-generic/video.h> 30 31 #endif /* _ASM_VIDEO_H_ */ 32