WIP FPC-III support
[linux/fpc-iii.git] / arch / sparc / include / asm / fb.h
blobf699962e9ddf06e947796302183b7cc67b74c235
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SPARC_FB_H_
3 #define _SPARC_FB_H_
4 #include <linux/console.h>
5 #include <linux/fb.h>
6 #include <linux/fs.h>
7 #include <asm/page.h>
8 #include <asm/prom.h>
10 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 unsigned long off)
13 #ifdef CONFIG_SPARC64
14 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
15 #endif
18 static inline int fb_is_primary_device(struct fb_info *info)
20 struct device *dev = info->device;
21 struct device_node *node;
23 if (console_set_on_cmdline)
24 return 0;
26 node = dev->of_node;
27 if (node &&
28 node == of_console_device)
29 return 1;
31 return 0;
34 #endif /* _SPARC_FB_H_ */