Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef _SPARC_FB_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define _SPARC_FB_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) #include <linux/console.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #include <linux/fb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <linux/fs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <asm/page.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <asm/prom.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 				unsigned long off)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #ifdef CONFIG_SPARC64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) static inline int fb_is_primary_device(struct fb_info *info)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	struct device *dev = info->device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	struct device_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	if (console_set_on_cmdline)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	node = dev->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	if (node &&
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	    node == of_console_device)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 		return 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #endif /* _SPARC_FB_H_ */