X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fboot%2Fsimple%2Fmisc-mv64x60.c;h=28b3108083edd691c65aa24efc5b3304198c4881;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=7e88fc6d207d2b0dafdcdcba52429d4a8f3a52c4;hpb=4b659086703c3cfdabfc916b517590ad55d1ddfa;p=linux-2.6.git diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 7e88fc6d2..28b310808 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c @@ -1,6 +1,4 @@ /* - * arch/ppc/boot/simple/misc-mv64x60.c - * * Relocate bridge's register base and call board specific routine. * * Author: Mark A. Greer @@ -11,7 +9,6 @@ * or implied. */ -#include #include #include #include @@ -19,6 +16,33 @@ extern struct bi_record *decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum); + +u32 size_reg[MV64x60_CPU2MEM_WINDOWS] = { + MV64x60_CPU2MEM_0_SIZE, MV64x60_CPU2MEM_1_SIZE, + MV64x60_CPU2MEM_2_SIZE, MV64x60_CPU2MEM_3_SIZE +}; + +/* Read mem ctlr to get the amount of mem in system */ +unsigned long +mv64360_get_mem_size(void) +{ + u32 enables, i, v; + u32 mem = 0; + + enables = in_le32((void __iomem *)CONFIG_MV64X60_NEW_BASE + + MV64360_CPU_BAR_ENABLE) & 0xf; + + for (i=0; i