diff options
author | Matt Porter <mporter@kernel.crashing.org> | 2005-11-07 03:58:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:26 -0500 |
commit | 3e9e7c1d0b7a36fb8affb973a054c5098e27baa8 (patch) | |
tree | b6fb8644555bd820756bf599ac84433a9eb1eda2 /arch/ppc/boot/simple/misc.c | |
parent | 90eb2665841d7b444602736e2141a01c948f75b1 (diff) |
[PATCH] ppc32: cleanup AMCC PPC40x eval boards to support U-Boot
Cleanup PPC40x eval boards (bubinga, walnut and sycamore) to support U-Boot
as bootloader. The OpenBIOS bd_info struct is not used in the kernel
anymore (only U-Boot now).
uImage (U-Boot) tested on walnut, sycamore and bubinga
zImage (OpenBIOS) tested on sycamore, bubinga and ebony
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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"); |