--- zzzz-none-000/linux-2.4.17/arch/mips/mips-boards/generic/memory.c 2001-09-09 17:43:02.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/arch/mips/mips-boards/generic/memory.c 2004-11-24 13:22:35.000000000 +0000 @@ -33,7 +33,12 @@ #include -/*#define DEBUG*/ +#if defined(CONFIG_MIPS_AVALANCHE_SOC) +#include +#endif + + +#undef DEBUG enum yamon_memtypes { yamon_dontuse, @@ -74,6 +79,21 @@ memset(mdesc, 0, sizeof(mdesc)); +#if defined(CONFIG_MIPS_AVALANCHE_SOC) + mdesc[0].type = yamon_dontuse; /* Avalanche Registers */ + mdesc[0].base = 0x00000000; + mdesc[0].size = AVALANCHE_SDRAM_BASE; + + mdesc[1].type = yamon_prom; /* Adam2 memory */ + mdesc[1].base = AVALANCHE_SDRAM_BASE; + mdesc[1].size = 0x00020000; + + mdesc[2].type = yamon_free; /* Available memory */ + mdesc[2].base = AVALANCHE_SDRAM_BASE + 0x00020000; + mdesc[2].size = (memsize + AVALANCHE_SDRAM_BASE) - mdesc[2].base; + +#else /* !CONFIG_MIPS_AVALANCHE_SOC */ + mdesc[0].type = yamon_dontuse; mdesc[0].base = 0x00000000; mdesc[0].size = 0x00001000; @@ -106,7 +126,7 @@ mdesc[4].type = yamon_free; mdesc[4].base = PHYSADDR(PFN_ALIGN(&_end)); mdesc[4].size = memsize - mdesc[4].base; - +#endif /* CONFIG_MIPS_AVALANCHE_SOC */ return &mdesc[0]; }