brcm-2.4: rip out all /dev/nvram and nvram setting/committing code from the kernel
[openwrt.git] / target / linux / brcm-2.4 / files / arch / mips / bcm947xx / prom.c
1 /*
2 * Early initialization code for BCM94710 boards
3 *
4 * Copyright 2004, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 *
12 */
13
14 #include <linux/config.h>
15 #include <linux/init.h>
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <asm/bootinfo.h>
19
20 void __init
21 prom_init(int argc, const char **argv)
22 {
23 unsigned long mem;
24
25 mips_machgroup = MACH_GROUP_BRCM;
26 mips_machtype = MACH_BCM947XX;
27
28 /* Figure out memory size by finding aliases */
29 for (mem = (1 << 20); mem < (128 << 20); mem += (1 << 20)) {
30 if (*(unsigned long *)((unsigned long)(prom_init) + mem) ==
31 *(unsigned long *)(prom_init))
32 break;
33 }
34 add_memory_region(0, mem, BOOT_MEM_RAM);
35 }
36
37 void __init
38 prom_free_prom_memory(void)
39 {
40 }
This page took 0.04595 seconds and 5 git commands to generate.