af278a263ad67606d43f2223dd3a2a279680c75f
[openwrt.git] / target / linux / brcm63xx-2.6 / files / arch / mips / bcm963xx / prom.c
1 /*
2 <:copyright-gpl
3 Copyright 2004 Broadcom Corp. All Rights Reserved.
4
5 This program is free software; you can distribute it and/or modify it
6 under the terms of the GNU General Public License (Version 2) as
7 published by the Free Software Foundation.
8
9 This program is distributed in the hope it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 :>
18 */
19 /*
20 * prom.c: PROM library initialization code.
21 *
22 */
23 #include <linux/init.h>
24 #include <linux/mm.h>
25 #include <linux/sched.h>
26 #include <linux/bootmem.h>
27 #include <linux/blkdev.h>
28
29 #include <asm/addrspace.h>
30 #include <asm/bootinfo.h>
31 #include <asm/cpu.h>
32 #include <asm/time.h>
33 #include <asm/mach-bcm963xx/bootloaders.h>
34 #include <asm/mach-bcm963xx/6348_map_part.h>
35
36 #include "../cfe/cfe_private.h"
37
38 extern void __init detect_bootloader(void);
39 extern void serial_init(void);
40 extern int boot_loader_type;
41
42 #define MACH_BCM MACH_BCM96348
43
44 const char *get_system_type(void)
45 {
46 return "Broadcom BCM963xx";
47 }
48
49 void __init prom_init(void)
50 {
51 serial_init();
52
53 printk( "%s prom init\n", get_system_type() );
54
55 PERF->IrqMask = 0;
56
57 detect_bootloader();
58
59 if (boot_loader_type == BOOT_LOADER_CFE) {
60 cfe_setup(fw_arg0, fw_arg1, fw_arg2, fw_arg3);
61 add_memory_region(0, (boot_mem_map.map[0].size - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
62 }
63 else
64 add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
65
66 mips_machgroup = MACH_GROUP_BRCM;
67 mips_machtype = MACH_BCM;
68 }
69
70 void __init prom_free_prom_memory(void)
71 {
72 /* We do not have any memory to free */
73 }
This page took 0.061179 seconds and 3 git commands to generate.