diff options
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 18 | ||||
-rw-r--r-- | drivers/char/viocons.c | 4 |
3 files changed, 26 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index c4b76961d6de..177d8249078d 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -75,22 +75,26 @@ | |||
75 | * but your kernel will not boot on anything else if you do so | 75 | * but your kernel will not boot on anything else if you do so |
76 | */ | 76 | */ |
77 | 77 | ||
78 | /* This one is for use on LPAR machines that support an HVC console | 78 | /* For use on LPAR machines that support an HVC console on vterm 0 */ |
79 | * on vterm 0 | ||
80 | */ | ||
81 | extern void udbg_init_debug_lpar(void); | 79 | extern void udbg_init_debug_lpar(void); |
82 | /* This one is for use on Apple G5 machines | 80 | |
83 | */ | 81 | /* This one is for use on Apple G5 machines */ |
84 | extern void udbg_init_pmac_realmode(void); | 82 | extern void udbg_init_pmac_realmode(void); |
83 | |||
85 | /* That's RTAS panel debug */ | 84 | /* That's RTAS panel debug */ |
86 | extern void call_rtas_display_status_delay(unsigned char c); | 85 | extern void call_rtas_display_status_delay(unsigned char c); |
86 | |||
87 | /* Here's maple real mode debug */ | 87 | /* Here's maple real mode debug */ |
88 | extern void udbg_init_maple_realmode(void); | 88 | extern void udbg_init_maple_realmode(void); |
89 | 89 | ||
90 | /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ | ||
91 | extern void udbg_init_iseries(void); | ||
92 | |||
90 | #define EARLY_DEBUG_INIT() do {} while(0) | 93 | #define EARLY_DEBUG_INIT() do {} while(0) |
91 | 94 | ||
92 | #if 0 | 95 | #if 0 |
93 | #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() | 96 | #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() |
97 | #define EARLY_DEBUG_INIT() udbg_init_iseries() | ||
94 | #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() | 98 | #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() |
95 | #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() | 99 | #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() |
96 | #define EARLY_DEBUG_INIT() \ | 100 | #define EARLY_DEBUG_INIT() \ |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index ad5ef80500ce..25cdebdf6f2e 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/hv_lp_event.h> | 53 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 54 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | ||
55 | 56 | ||
56 | #include "naca.h" | 57 | #include "naca.h" |
57 | #include "setup.h" | 58 | #include "setup.h" |
@@ -62,10 +63,8 @@ | |||
62 | #include "call_sm.h" | 63 | #include "call_sm.h" |
63 | #include "call_hpt.h" | 64 | #include "call_hpt.h" |
64 | 65 | ||
65 | extern void hvlog(char *fmt, ...); | ||
66 | |||
67 | #ifdef DEBUG | 66 | #ifdef DEBUG |
68 | #define DBG(fmt...) hvlog(fmt) | 67 | #define DBG(fmt...) udbg_printf(fmt) |
69 | #else | 68 | #else |
70 | #define DBG(fmt...) | 69 | #define DBG(fmt...) |
71 | #endif | 70 | #endif |
@@ -984,3 +983,16 @@ static int __init early_parsemem(char *p) | |||
984 | return 0; | 983 | return 0; |
985 | } | 984 | } |
986 | early_param("mem", early_parsemem); | 985 | early_param("mem", early_parsemem); |
986 | |||
987 | static void hvputc(char c) | ||
988 | { | ||
989 | if (c == '\n') | ||
990 | hvputc('\r'); | ||
991 | |||
992 | HvCall_writeLogBuffer(&c, 1); | ||
993 | } | ||
994 | |||
995 | void __init udbg_init_iseries(void) | ||
996 | { | ||
997 | udbg_putc = hvputc; | ||
998 | } | ||
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index cb82ebf4cb07..bead38a4a68a 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c | |||
@@ -131,7 +131,7 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp); | |||
131 | 131 | ||
132 | static struct tty_driver *viotty_driver; | 132 | static struct tty_driver *viotty_driver; |
133 | 133 | ||
134 | void hvlog(char *fmt, ...) | 134 | static void hvlog(char *fmt, ...) |
135 | { | 135 | { |
136 | int i; | 136 | int i; |
137 | unsigned long flags; | 137 | unsigned long flags; |
@@ -147,7 +147,7 @@ void hvlog(char *fmt, ...) | |||
147 | spin_unlock_irqrestore(&consoleloglock, flags); | 147 | spin_unlock_irqrestore(&consoleloglock, flags); |
148 | } | 148 | } |
149 | 149 | ||
150 | void hvlogOutput(const char *buf, int count) | 150 | static void hvlogOutput(const char *buf, int count) |
151 | { | 151 | { |
152 | unsigned long flags; | 152 | unsigned long flags; |
153 | int begin; | 153 | int begin; |