aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/boot
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2005-09-03 18:55:56 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:00 -0400
commitd01c08c9ae91c1526d4564b400b3e0e04b49d1ba (patch)
treea1cc06a5342fdaf6185d2655a636cc181d56cb08 /arch/ppc/boot
parentbbde630b553d349307fe719486bc06f8cf9c1a2d (diff)
[PATCH] ppc32: mv64x60 updates & enhancements
Updates and enhancement to the ppc32 mv64x60 code: - move code to get mem size from mem ctlr to bootwrapper - address some errata in the mv64360 pic code - some minor cleanups - export one of the bridge's regs via sysfs so user daemon can watch for extraction events Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/boot')
-rw-r--r--arch/ppc/boot/simple/misc-mv64x60.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c
index 7e88fc6d207d..258d4599fadc 100644
--- a/arch/ppc/boot/simple/misc-mv64x60.c
+++ b/arch/ppc/boot/simple/misc-mv64x60.c
@@ -19,6 +19,33 @@
19extern struct bi_record *decompress_kernel(unsigned long load_addr, 19extern struct bi_record *decompress_kernel(unsigned long load_addr,
20 int num_words, unsigned long cksum); 20 int num_words, unsigned long cksum);
21 21
22
23u32 size_reg[MV64x60_CPU2MEM_WINDOWS] = {
24 MV64x60_CPU2MEM_0_SIZE, MV64x60_CPU2MEM_1_SIZE,
25 MV64x60_CPU2MEM_2_SIZE, MV64x60_CPU2MEM_3_SIZE
26};
27
28/* Read mem ctlr to get the amount of mem in system */
29unsigned long
30mv64360_get_mem_size(void)
31{
32 u32 enables, i, v;
33 u32 mem = 0;
34
35 enables = in_le32((void __iomem *)CONFIG_MV64X60_NEW_BASE +
36 MV64360_CPU_BAR_ENABLE) & 0xf;
37
38 for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++)
39 if (!(enables & (1<<i))) {
40 v = in_le32((void __iomem *)CONFIG_MV64X60_NEW_BASE
41 + size_reg[i]) & 0xffff;
42 v = (v + 1) << 16;
43 mem += v;
44 }
45
46 return mem;
47}
48
22void 49void
23mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) 50mv64x60_move_base(void __iomem *old_base, void __iomem *new_base)
24{ 51{