diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-09-19 13:44:59 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-09-20 02:09:54 -0400 |
commit | daea1175a9f0f70eab5b33e2827d57ba8c686816 (patch) | |
tree | aac48bd8bdfb9c7ee8e3e5058aea07e04e105da3 /drivers/tty/hvc/hvsi_lib.c | |
parent | 6e35d5dac0c83ebb616ff3b9c2d6155c9a9ccb86 (diff) |
powerpc/powernv: Support for OPAL console
This adds a udbg and an hvc console backend for supporting a console
using the OPAL console interfaces.
On OPAL v1 we have hvc0 mapped to whatever console the system was
configured for (network or hvsi serial port) via the service
processor.
On OPAL v2 we have hvcN mapped to the Nth console provided by OPAL
which generally corresponds to:
hvc0 : network console (raw protocol)
hvc1 : serial port S1 (hvsi)
hvc2 : serial port S2 (hvsi)
Note: At this point, early debug console only works with OPAL v1
and shouldn't be enabled in a normal kernel.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/tty/hvc/hvsi_lib.c')
-rw-r--r-- | drivers/tty/hvc/hvsi_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c index bd9b09827b24..6f4dd83d8695 100644 --- a/drivers/tty/hvc/hvsi_lib.c +++ b/drivers/tty/hvc/hvsi_lib.c | |||
@@ -183,7 +183,7 @@ int hvsilib_get_chars(struct hvsi_priv *pv, char *buf, int count) | |||
183 | unsigned int tries, read = 0; | 183 | unsigned int tries, read = 0; |
184 | 184 | ||
185 | if (WARN_ON(!pv)) | 185 | if (WARN_ON(!pv)) |
186 | return 0; | 186 | return -ENXIO; |
187 | 187 | ||
188 | /* If we aren't open, don't do anything in order to avoid races | 188 | /* If we aren't open, don't do anything in order to avoid races |
189 | * with connection establishment. The hvc core will call this | 189 | * with connection establishment. The hvc core will call this |
@@ -234,7 +234,7 @@ int hvsilib_put_chars(struct hvsi_priv *pv, const char *buf, int count) | |||
234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); | 234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); |
235 | 235 | ||
236 | if (WARN_ON(!pv)) | 236 | if (WARN_ON(!pv)) |
237 | return 0; | 237 | return -ENODEV; |
238 | 238 | ||
239 | dp.hdr.type = VS_DATA_PACKET_HEADER; | 239 | dp.hdr.type = VS_DATA_PACKET_HEADER; |
240 | dp.hdr.len = adjcount + sizeof(struct hvsi_header); | 240 | dp.hdr.len = adjcount + sizeof(struct hvsi_header); |