diff options
author | Milton Miller <miltonm@bga.com> | 2005-07-07 20:56:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:23:39 -0400 |
commit | 030ffad23fb28fc29608a3bc21f0c3b88bf28592 (patch) | |
tree | 8fe8a2e8615e25e985c5658687d38c5c0ce7a971 /include | |
parent | acad9559f1054487292eb10d7bb81f256e9d8f2d (diff) |
[PATCH] hvc_console: Register ops when setting up hvc_console
When registering the hvc console port, register a list of ops (read and write)
to go with it, instead of calling fixed function names.
This allows different ports to encode the data differently.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ppc64/hvconsole.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-ppc64/hvconsole.h b/include/asm-ppc64/hvconsole.h index 14667a78716d..6da93ce74dc0 100644 --- a/include/asm-ppc64/hvconsole.h +++ b/include/asm-ppc64/hvconsole.h | |||
@@ -30,15 +30,20 @@ | |||
30 | #define MAX_NR_HVC_CONSOLES 16 | 30 | #define MAX_NR_HVC_CONSOLES 16 |
31 | 31 | ||
32 | /* implemented by a low level driver */ | 32 | /* implemented by a low level driver */ |
33 | struct hv_ops { | ||
34 | int (*get_chars)(uint32_t vtermno, char *buf, int count); | ||
35 | int (*put_chars)(uint32_t vtermno, const char *buf, int count); | ||
36 | }; | ||
33 | extern int hvc_get_chars(uint32_t vtermno, char *buf, int count); | 37 | extern int hvc_get_chars(uint32_t vtermno, char *buf, int count); |
34 | extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count); | 38 | extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count); |
35 | 39 | ||
36 | struct hvc_struct; | 40 | struct hvc_struct; |
37 | 41 | ||
38 | /* Register a vterm and a slot index for use as a console (console_init) */ | 42 | /* Register a vterm and a slot index for use as a console (console_init) */ |
39 | extern int hvc_instantiate(uint32_t vtermno, int index); | 43 | extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops); |
40 | /* register a vterm for hvc tty operation (module_init or hotplug add) */ | 44 | /* register a vterm for hvc tty operation (module_init or hotplug add) */ |
41 | extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq); | 45 | extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int irq, |
46 | struct hv_ops *ops); | ||
42 | /* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */ | 47 | /* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */ |
43 | extern int __devexit hvc_remove(struct hvc_struct *hp); | 48 | extern int __devexit hvc_remove(struct hvc_struct *hp); |
44 | #endif /* _PPC64_HVCONSOLE_H */ | 49 | #endif /* _PPC64_HVCONSOLE_H */ |