diff options
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/device.h | 14 | ||||
-rw-r--r-- | include/asm-sparc/fb.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/oplib.h | 26 | ||||
-rw-r--r-- | include/asm-sparc/prom.h | 4 |
4 files changed, 26 insertions, 27 deletions
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index d8f9872b0e2..4a56d84d69c 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h @@ -3,5 +3,17 @@ * * This file is released under the GPLv2 */ -#include <asm-generic/device.h> +#ifndef _ASM_SPARC_DEVICE_H +#define _ASM_SPARC_DEVICE_H + +struct device_node; +struct of_device; + +struct dev_archdata { + struct device_node *prom_node; + struct of_device *op; +}; + +#endif /* _ASM_SPARC_DEVICE_H */ + diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h index c7df3803099..c73ca081e1f 100644 --- a/include/asm-sparc/fb.h +++ b/include/asm-sparc/fb.h @@ -1,11 +1,20 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ #include <linux/fb.h> +#include <asm/prom.h> #define fb_pgprotect(...) do {} while (0) static inline int fb_is_primary_device(struct fb_info *info) { + struct device *dev = info->device; + struct device_node *node; + + node = dev->archdata.prom_node; + if (node && + node == of_console_device) + return 1; + return 0; } diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 91691e52c05..17ba82ee220 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h @@ -158,32 +158,6 @@ extern void prom_putchar(char character); extern void prom_printf(char *fmt, ...); extern void prom_write(const char *buf, unsigned int len); -/* Query for input device type */ - -enum prom_input_device { - PROMDEV_IKBD, /* input from keyboard */ - PROMDEV_ITTYA, /* input from ttya */ - PROMDEV_ITTYB, /* input from ttyb */ - PROMDEV_IRSC, /* input from rsc */ - PROMDEV_IVCONS, /* input from virtual-console */ - PROMDEV_I_UNK, -}; - -extern enum prom_input_device prom_query_input_device(void); - -/* Query for output device type */ - -enum prom_output_device { - PROMDEV_OSCREEN, /* to screen */ - PROMDEV_OTTYA, /* to ttya */ - PROMDEV_OTTYB, /* to ttyb */ - PROMDEV_ORSC, /* to rsc */ - PROMDEV_OVCONS, /* to virtual-console */ - PROMDEV_O_UNK, -}; - -extern enum prom_output_device prom_query_output_device(void); - /* Multiprocessor operations... */ /* Start the CPU with the given device tree node, context table, and context diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index db9feb75bd8..350676c589f 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h @@ -85,5 +85,9 @@ static inline void of_node_put(struct device_node *node) */ #include <linux/of.h> +extern struct device_node *of_console_device; +extern char *of_console_path; +extern char *of_console_options; + #endif /* __KERNEL__ */ #endif /* _SPARC_PROM_H */ |