aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boot/compressed/misc.c')
-rw-r--r--arch/arm/boot/compressed/misc.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 5ab94584baee..28626ec2d289 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -20,24 +20,32 @@ unsigned int __machine_arch_type;
20 20
21#include <linux/string.h> 21#include <linux/string.h>
22 22
23#include <asm/arch/uncompress.h>
24
25#ifdef STANDALONE_DEBUG 23#ifdef STANDALONE_DEBUG
26#define putstr printf 24#define putstr printf
27#endif 25#else
28 26
29#ifdef CONFIG_DEBUG_ICEDCC 27static void putstr(const char *ptr);
30#define putstr icedcc_putstr
31#define putc icedcc_putc
32 28
29#include <linux/compiler.h>
30#include <asm/arch/uncompress.h>
31
32#ifdef CONFIG_DEBUG_ICEDCC
33extern void icedcc_putc(int ch); 33extern void icedcc_putc(int ch);
34#define putc(ch) icedcc_putc(ch)
35#define flush() do { } while (0)
36#endif
34 37
35static void 38static void putstr(const char *ptr)
36icedcc_putstr(const char *ptr)
37{ 39{
38 for (; *ptr != '\0'; ptr++) { 40 char c;
39 icedcc_putc(*ptr); 41
42 while ((c = *ptr++) != '\0') {
43 if (c == '\n')
44 putc('\r');
45 putc(c);
40 } 46 }
47
48 flush();
41} 49}
42 50
43#endif 51#endif