.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * polling mode stateless debugging stuff, originally for NS16550 Serial Ports |
---|
3 | 4 | * |
---|
4 | 5 | * c 2001 PPC 64 Team, IBM Corp |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License |
---|
8 | | - * as published by the Free Software Foundation; either version |
---|
9 | | - * 2 of the License, or (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <stdarg.h> |
---|
.. | .. |
---|
74 | 70 | #endif |
---|
75 | 71 | |
---|
76 | 72 | #ifdef CONFIG_PPC_EARLY_DEBUG |
---|
77 | | - console_loglevel = 10; |
---|
| 73 | + console_loglevel = CONSOLE_LOGLEVEL_DEBUG; |
---|
78 | 74 | |
---|
79 | 75 | register_early_udbg_console(); |
---|
80 | 76 | #endif |
---|
.. | .. |
---|
124 | 120 | #define UDBG_BUFSIZE 256 |
---|
125 | 121 | void udbg_printf(const char *fmt, ...) |
---|
126 | 122 | { |
---|
127 | | - char buf[UDBG_BUFSIZE]; |
---|
128 | | - va_list args; |
---|
| 123 | + if (udbg_putc) { |
---|
| 124 | + char buf[UDBG_BUFSIZE]; |
---|
| 125 | + va_list args; |
---|
129 | 126 | |
---|
130 | | - va_start(args, fmt); |
---|
131 | | - vsnprintf(buf, UDBG_BUFSIZE, fmt, args); |
---|
132 | | - udbg_puts(buf); |
---|
133 | | - va_end(args); |
---|
| 127 | + va_start(args, fmt); |
---|
| 128 | + vsnprintf(buf, UDBG_BUFSIZE, fmt, args); |
---|
| 129 | + udbg_puts(buf); |
---|
| 130 | + va_end(args); |
---|
| 131 | + } |
---|
134 | 132 | } |
---|
135 | 133 | |
---|
136 | 134 | void __init udbg_progress(char *s, unsigned short hex) |
---|