ramips: rt305x: enable M25P80 driver
[openwrt.git] / target / linux / lantiq / patches-3.0 / 990-fix-early_printk.patch
1 --- a/arch/mips/lantiq/early_printk.c
2 +++ b/arch/mips/lantiq/early_printk.c
3 @@ -20,7 +20,12 @@
4 #endif
5 #define ASC_BUF 1024
6 #define LTQ_ASC_FSTAT ((u32 *)(LTQ_ASC_BASE + 0x0048))
7 -#define LTQ_ASC_TBUF ((u32 *)(LTQ_ASC_BASE + 0x0020))
8 +#ifdef __BIG_ENDIAN
9 +#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0023))
10 +#else
11 +#define LTQ_ASC_TBUF ((u8 *)(LTQ_ASC_BASE + 0x0020))
12 +#endif
13 +
14 #define TXMASK 0x3F00
15 #define TXOFFSET 8
16
17 @@ -30,8 +35,6 @@ void prom_putchar(char c)
18
19 local_irq_save(flags);
20 do { } while ((ltq_r32(LTQ_ASC_FSTAT) & TXMASK) >> TXOFFSET);
21 - if (c == '\n')
22 - ltq_w32('\r', LTQ_ASC_TBUF);
23 - ltq_w32(c, LTQ_ASC_TBUF);
24 + ltq_w8(c, LTQ_ASC_TBUF);
25 local_irq_restore(flags);
26 }
This page took 0.045069 seconds and 5 git commands to generate.