static void sni_mem_init(void ) { int i, memsize; struct membank { u32 size; u32 base; u32 size2; u32 pad1; u32 pad2; } memconf[8]; /* MemSIZE from prom in 16MByte chunks */ memsize=*((unsigned char *) SNI_IDPROM_MEMSIZE) * 16; DBG_PRINTF("IDProm memsize: %lu MByte\n", memsize); /* get memory bank layout from prom */ __prom_get_memconf(&memconf); DBG_PRINTF("prom_get_mem_conf memory configuration:\n"); for(i=0;i<8 && memconf[i].size;i++) { prom_printf("Bank%d: %08x @ %08x\n", i, memconf[i].size, memconf[i].base); add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM); } }
static void sni_mem_init(void ) { int i, memsize; struct membank { u32 size; u32 base; u32 size2; u32 pad1; u32 pad2; } memconf[8]; /* MemSIZE from prom in 16MByte chunks */ memsize = *((unsigned char *) SNI_IDPROM_MEMSIZE) * 16; pr_debug("IDProm memsize: %lu MByte\n", memsize); /* get memory bank layout from prom */ __prom_get_memconf(&memconf); pr_debug("prom_get_mem_conf memory configuration:\n"); for (i = 0;i < 8 && memconf[i].size; i++) { if (sni_brd_type == SNI_BRD_PCI_TOWER || sni_brd_type == SNI_BRD_PCI_TOWER_CPLUS) { if (memconf[i].base >= 0x20000000 && memconf[i].base < 0x30000000) { memconf[i].base -= 0x20000000; } } pr_debug("Bank%d: %08x @ %08x\n", i, memconf[i].size, memconf[i].base); add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM); } }