diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /include/asm-arm/arch-ep93xx/uncompress.h | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include/asm-arm/arch-ep93xx/uncompress.h')
-rw-r--r-- | include/asm-arm/arch-ep93xx/uncompress.h | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/include/asm-arm/arch-ep93xx/uncompress.h b/include/asm-arm/arch-ep93xx/uncompress.h index 4410d217077e..c15274c85d5d 100644 --- a/include/asm-arm/arch-ep93xx/uncompress.h +++ b/include/asm-arm/arch-ep93xx/uncompress.h | |||
@@ -16,17 +16,27 @@ static unsigned char __raw_readb(unsigned int ptr) | |||
16 | return *((volatile unsigned char *)ptr); | 16 | return *((volatile unsigned char *)ptr); |
17 | } | 17 | } |
18 | 18 | ||
19 | static unsigned int __raw_readl(unsigned int ptr) | ||
20 | { | ||
21 | return *((volatile unsigned int *)ptr); | ||
22 | } | ||
23 | |||
19 | static void __raw_writeb(unsigned char value, unsigned int ptr) | 24 | static void __raw_writeb(unsigned char value, unsigned int ptr) |
20 | { | 25 | { |
21 | *((volatile unsigned char *)ptr) = value; | 26 | *((volatile unsigned char *)ptr) = value; |
22 | } | 27 | } |
23 | 28 | ||
29 | static void __raw_writel(unsigned int value, unsigned int ptr) | ||
30 | { | ||
31 | *((volatile unsigned int *)ptr) = value; | ||
32 | } | ||
33 | |||
24 | 34 | ||
25 | #define PHYS_UART1_DATA 0x808c0000 | 35 | #define PHYS_UART1_DATA 0x808c0000 |
26 | #define PHYS_UART1_FLAG 0x808c0018 | 36 | #define PHYS_UART1_FLAG 0x808c0018 |
27 | #define UART1_FLAG_TXFF 0x20 | 37 | #define UART1_FLAG_TXFF 0x20 |
28 | 38 | ||
29 | static __inline__ void putc(char c) | 39 | static inline void putc(int c) |
30 | { | 40 | { |
31 | int i; | 41 | int i; |
32 | 42 | ||
@@ -39,15 +49,37 @@ static __inline__ void putc(char c) | |||
39 | __raw_writeb(c, PHYS_UART1_DATA); | 49 | __raw_writeb(c, PHYS_UART1_DATA); |
40 | } | 50 | } |
41 | 51 | ||
42 | static void putstr(const char *s) | 52 | static inline void flush(void) |
43 | { | 53 | { |
44 | while (*s) { | ||
45 | putc(*s); | ||
46 | if (*s == '\n') | ||
47 | putc('\r'); | ||
48 | s++; | ||
49 | } | ||
50 | } | 54 | } |
51 | 55 | ||
52 | #define arch_decomp_setup() | 56 | |
57 | /* | ||
58 | * Some bootloaders don't turn off DMA from the ethernet MAC before | ||
59 | * jumping to linux, which means that we might end up with bits of RX | ||
60 | * status and packet data scribbled over the uncompressed kernel image. | ||
61 | * Work around this by resetting the ethernet MAC before we uncompress. | ||
62 | */ | ||
63 | #define PHYS_ETH_SELF_CTL 0x80010020 | ||
64 | #define ETH_SELF_CTL_RESET 0x00000001 | ||
65 | |||
66 | static void ethernet_reset(void) | ||
67 | { | ||
68 | unsigned int v; | ||
69 | |||
70 | /* Reset the ethernet MAC. */ | ||
71 | v = __raw_readl(PHYS_ETH_SELF_CTL); | ||
72 | __raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL); | ||
73 | |||
74 | /* Wait for reset to finish. */ | ||
75 | while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET) | ||
76 | ; | ||
77 | } | ||
78 | |||
79 | |||
80 | static void arch_decomp_setup(void) | ||
81 | { | ||
82 | ethernet_reset(); | ||
83 | } | ||
84 | |||
53 | #define arch_decomp_wdog() | 85 | #define arch_decomp_wdog() |