diff options
Diffstat (limited to 'arch/m32r/boot')
-rw-r--r-- | arch/m32r/boot/compressed/m32r_sio.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bad5475eff90..8f9a57271f83 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <asm/processor.h> | ||
9 | 10 | ||
10 | static void putc(char c); | 11 | static void putc(char c); |
11 | 12 | ||
@@ -38,16 +39,17 @@ static int puts(const char *s) | |||
38 | 39 | ||
39 | static void putc(char c) | 40 | static void putc(char c) |
40 | { | 41 | { |
41 | 42 | while ((*BOOT_SIO0STS & 0x3) != 0x3) | |
42 | while ((*BOOT_SIO0STS & 0x3) != 0x3) ; | 43 | cpu_relax(); |
43 | if (c == '\n') { | 44 | if (c == '\n') { |
44 | *BOOT_SIO0TXB = '\r'; | 45 | *BOOT_SIO0TXB = '\r'; |
45 | while ((*BOOT_SIO0STS & 0x3) != 0x3) ; | 46 | while ((*BOOT_SIO0STS & 0x3) != 0x3) |
47 | cpu_relax(); | ||
46 | } | 48 | } |
47 | *BOOT_SIO0TXB = c; | 49 | *BOOT_SIO0TXB = c; |
48 | } | 50 | } |
49 | #else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */ | 51 | #else /* !(CONFIG_PLAT_M32700UT_Alpha) && !(CONFIG_PLAT_M32700UT) */ |
50 | #ifdef CONFIG_MMU | 52 | #if defined(CONFIG_PLAT_MAPPI2) |
51 | #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) | 53 | #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) |
52 | #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) | 54 | #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) |
53 | #else | 55 | #else |
@@ -57,11 +59,12 @@ static void putc(char c) | |||
57 | 59 | ||
58 | static void putc(char c) | 60 | static void putc(char c) |
59 | { | 61 | { |
60 | 62 | while ((*SIO0STS & 0x1) == 0) | |
61 | while ((*SIO0STS & 0x1) == 0) ; | 63 | cpu_relax(); |
62 | if (c == '\n') { | 64 | if (c == '\n') { |
63 | *SIO0TXB = '\r'; | 65 | *SIO0TXB = '\r'; |
64 | while ((*SIO0STS & 0x1) == 0) ; | 66 | while ((*SIO0STS & 0x1) == 0) |
67 | cpu_relax(); | ||
65 | } | 68 | } |
66 | *SIO0TXB = c; | 69 | *SIO0TXB = c; |
67 | } | 70 | } |