diff options
Diffstat (limited to 'arch/ppc/boot/simple/misc.c')
-rw-r--r-- | arch/ppc/boot/simple/misc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c index e02de5b467a4..f415d6c62362 100644 --- a/arch/ppc/boot/simple/misc.c +++ b/arch/ppc/boot/simple/misc.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/mmu.h> | 24 | #include <asm/mmu.h> |
25 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
26 | #ifdef CONFIG_44x | 26 | #ifdef CONFIG_4xx |
27 | #include <asm/ibm4xx.h> | 27 | #include <asm/ibm4xx.h> |
28 | #endif | 28 | #endif |
29 | #include <asm/reg.h> | 29 | #include <asm/reg.h> |
@@ -88,6 +88,14 @@ get_mem_size(void) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | #if defined(CONFIG_40x) | ||
92 | #define PPC4xx_EMAC0_MR0 EMAC0_BASE | ||
93 | #endif | ||
94 | |||
95 | #if defined(CONFIG_44x) && defined(PPC44x_EMAC0_MR0) | ||
96 | #define PPC4xx_EMAC0_MR0 PPC44x_EMAC0_MR0 | ||
97 | #endif | ||
98 | |||
91 | struct bi_record * | 99 | struct bi_record * |
92 | decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) | 100 | decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) |
93 | { | 101 | { |
@@ -103,13 +111,13 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) | |||
103 | com_port = serial_init(0, NULL); | 111 | com_port = serial_init(0, NULL); |
104 | #endif | 112 | #endif |
105 | 113 | ||
106 | #if defined(CONFIG_44x) && defined(PPC44x_EMAC0_MR0) | 114 | #if defined(PPC4xx_EMAC0_MR0) |
107 | /* Reset MAL */ | 115 | /* Reset MAL */ |
108 | mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); | 116 | mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); |
109 | /* Wait for reset */ | 117 | /* Wait for reset */ |
110 | while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; | 118 | while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; |
111 | /* Reset EMAC */ | 119 | /* Reset EMAC */ |
112 | *(volatile unsigned long *)PPC44x_EMAC0_MR0 = 0x20000000; | 120 | *(volatile unsigned long *)PPC4xx_EMAC0_MR0 = 0x20000000; |
113 | __asm__ __volatile__("eieio"); | 121 | __asm__ __volatile__("eieio"); |
114 | #endif | 122 | #endif |
115 | 123 | ||
@@ -164,7 +172,9 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) | |||
164 | puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n"); | 172 | puts(" "); puthex((unsigned long)(&__ramdisk_end));puts("\n"); |
165 | } | 173 | } |
166 | 174 | ||
175 | #ifndef CONFIG_40x /* don't overwrite the 40x image located at 0x00400000! */ | ||
167 | avail_ram = (char *)0x00400000; | 176 | avail_ram = (char *)0x00400000; |
177 | #endif | ||
168 | end_avail = (char *)0x00800000; | 178 | end_avail = (char *)0x00800000; |
169 | puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" "); | 179 | puts("avail ram: "); puthex((unsigned long)avail_ram); puts(" "); |
170 | puthex((unsigned long)end_avail); puts("\n"); | 180 | puthex((unsigned long)end_avail); puts("\n"); |