Path: blob/master/arch/mips/sgi-ip32/ip32-memory.c
10817 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (C) 2003 Keith M Wesolowski6* Copyright (C) 2005 Ilya A. Volynets (Total Knowledge)7*/8#include <linux/types.h>9#include <linux/init.h>10#include <linux/kernel.h>11#include <linux/mm.h>1213#include <asm/ip32/crime.h>14#include <asm/bootinfo.h>15#include <asm/page.h>16#include <asm/pgtable.h>17#include <asm/pgalloc.h>1819extern void crime_init(void);2021void __init prom_meminit(void)22{23u64 base, size;24int bank;2526crime_init();2728for (bank=0; bank < CRIME_MAXBANKS; bank++) {29u64 bankctl = crime->bank_ctrl[bank];30base = (bankctl & CRIME_MEM_BANK_CONTROL_ADDR) << 25;31if (bank != 0 && base == 0)32continue;33size = (bankctl & CRIME_MEM_BANK_CONTROL_SDRAM_SIZE) ? 128 : 32;34size <<= 20;35if (base + size > (256 << 20))36base += CRIME_HI_MEM_BASE;3738printk("CRIME MC: bank %u base 0x%016Lx size %LuMiB\n",39bank, base, size >> 20);40add_memory_region(base, size, BOOT_MEM_RAM);41}42}434445void __init prom_free_prom_memory(void)46{47}484950