diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-20 19:59:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-20 19:59:26 -0400 |
commit | c73fcc846c91f53fd2c67fd9c6c04888a9e5892e (patch) | |
tree | 31faa68b4176636756926535a0f50ff780973275 /include/asm-sparc64/oplib.h | |
parent | ede13d81b4dda409a6d271b34b8e2ec9383e255d (diff) |
[SPARC]: Fix serial console device detection.
The current scheme works on static interpretation of text names, which
is wrong.
The output-device setting, for example, must be resolved via an alias
or similar to a full path name to the console device.
Paths also contain an optional set of 'options', which starts with a
colon at the end of the path. The option area is used to specify
which of two serial ports ('a' or 'b') the path refers to when a
device node drives multiple ports. 'a' is assumed if the option
specification is missing.
This was caught by the UltraSPARC-T1 simulator. The 'output-device'
property was set to 'ttya' and we didn't pick upon the fact that this
is an OBP alias set to '/virtual-devices/console'. Instead we saw it
as the first serial console device, instead of the hypervisor console.
The infrastructure is now there to take advantage of this to resolve
the console correctly even in multi-head situations in fbcon too.
Thanks to Greg Onufer for the bug report.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/oplib.h')
-rw-r--r-- | include/asm-sparc64/oplib.h | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index 992f9f7a476c..3f23c5dc5f21 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
@@ -140,32 +140,6 @@ extern void prom_putchar(char character); | |||
140 | extern void prom_printf(const char *fmt, ...); | 140 | extern void prom_printf(const char *fmt, ...); |
141 | extern void prom_write(const char *buf, unsigned int len); | 141 | extern void prom_write(const char *buf, unsigned int len); |
142 | 142 | ||
143 | /* Query for input device type */ | ||
144 | |||
145 | enum prom_input_device { | ||
146 | PROMDEV_IKBD, /* input from keyboard */ | ||
147 | PROMDEV_ITTYA, /* input from ttya */ | ||
148 | PROMDEV_ITTYB, /* input from ttyb */ | ||
149 | PROMDEV_IRSC, /* input from rsc */ | ||
150 | PROMDEV_IVCONS, /* input from virtual-console */ | ||
151 | PROMDEV_I_UNK, | ||
152 | }; | ||
153 | |||
154 | extern enum prom_input_device prom_query_input_device(void); | ||
155 | |||
156 | /* Query for output device type */ | ||
157 | |||
158 | enum prom_output_device { | ||
159 | PROMDEV_OSCREEN, /* to screen */ | ||
160 | PROMDEV_OTTYA, /* to ttya */ | ||
161 | PROMDEV_OTTYB, /* to ttyb */ | ||
162 | PROMDEV_ORSC, /* to rsc */ | ||
163 | PROMDEV_OVCONS, /* to virtual-console */ | ||
164 | PROMDEV_O_UNK, | ||
165 | }; | ||
166 | |||
167 | extern enum prom_output_device prom_query_output_device(void); | ||
168 | |||
169 | /* Multiprocessor operations... */ | 143 | /* Multiprocessor operations... */ |
170 | #ifdef CONFIG_SMP | 144 | #ifdef CONFIG_SMP |
171 | /* Start the CPU with the given device tree node at the passed program | 145 | /* Start the CPU with the given device tree node at the passed program |
@@ -319,6 +293,8 @@ extern int prom_inst2pkg(int); | |||
319 | extern int prom_service_exists(const char *service_name); | 293 | extern int prom_service_exists(const char *service_name); |
320 | extern void prom_sun4v_guest_soft_state(void); | 294 | extern void prom_sun4v_guest_soft_state(void); |
321 | 295 | ||
296 | extern int prom_ihandle2path(int handle, char *buffer, int bufsize); | ||
297 | |||
322 | /* Client interface level routines. */ | 298 | /* Client interface level routines. */ |
323 | extern void prom_set_trap_table(unsigned long tba); | 299 | extern void prom_set_trap_table(unsigned long tba); |
324 | extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa); | 300 | extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa); |