diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /arch/ppc/boot/simple/misc-mv64x60.c | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'arch/ppc/boot/simple/misc-mv64x60.c')
-rw-r--r-- | arch/ppc/boot/simple/misc-mv64x60.c | 27 |
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 @@ | |||
19 | extern struct bi_record *decompress_kernel(unsigned long load_addr, | 19 | extern 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 | |||
23 | u32 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 */ | ||
29 | unsigned long | ||
30 | mv64360_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 | |||
22 | void | 49 | void |
23 | mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) | 50 | mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) |
24 | { | 51 | { |