diff options
author | Ryan S. Arnold <rsa@us.ibm.com> | 2006-03-27 14:25:16 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 00:45:26 -0500 |
commit | 45d607ed92695d7543f5e1fc5b133cd69834e3e4 (patch) | |
tree | c82b6ae1f9b9827894021797a85cbcbe6efca08e /drivers/char/hvc_vio.c | |
parent | 11089f08d9dd8b89cd07d6f126ccb4849e3c61a3 (diff) |
[PATCH] powerpc: hvc_console updates
These are some updates from both Ryan and Arnd for the hvc_console
driver:
The main point is to enable the inclusion of a console driver
for rtas, which is currrently needed for the cell platform.
Also shuffle around some data-type declarations and moves some
functions out of include/asm-ppc64/hvconsole.h and into a new
drivers/char/hvc_console.h file.
Signed-off-by: "Ryan S. Arnold" <rsa@us.ibm.com>
Signed-off-by: Arnd Bergmann <abergman@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/char/hvc_vio.c')
-rw-r--r-- | drivers/char/hvc_vio.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index f5212eb2b41d..9add81ceb440 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -31,10 +31,13 @@ | |||
31 | 31 | ||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | |||
34 | #include <asm/hvconsole.h> | 35 | #include <asm/hvconsole.h> |
35 | #include <asm/vio.h> | 36 | #include <asm/vio.h> |
36 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
37 | 38 | ||
39 | #include "hvc_console.h" | ||
40 | |||
38 | char hvc_driver_name[] = "hvc_console"; | 41 | char hvc_driver_name[] = "hvc_console"; |
39 | 42 | ||
40 | static struct vio_device_id hvc_driver_table[] __devinitdata = { | 43 | static struct vio_device_id hvc_driver_table[] __devinitdata = { |
@@ -48,6 +51,14 @@ static int filtered_get_chars(uint32_t vtermno, char *buf, int count) | |||
48 | unsigned long got; | 51 | unsigned long got; |
49 | int i; | 52 | int i; |
50 | 53 | ||
54 | /* | ||
55 | * Vio firmware will read up to SIZE_VIO_GET_CHARS at its own discretion | ||
56 | * so we play safe and avoid the situation where got > count which could | ||
57 | * overload the flip buffer. | ||
58 | */ | ||
59 | if (count < SIZE_VIO_GET_CHARS) | ||
60 | return -EAGAIN; | ||
61 | |||
51 | got = hvc_get_chars(vtermno, buf, count); | 62 | got = hvc_get_chars(vtermno, buf, count); |
52 | 63 | ||
53 | /* | 64 | /* |