2007-04-03 14:26:12 +03:00
|
|
|
/*
|
|
|
|
Copyright 2004 Broadcom Corp. All Rights Reserved.
|
2007-04-17 19:00:23 +03:00
|
|
|
Copyright 2007 OpenWrt,org, Florian Fainelli <florian@openwrt.org>
|
2007-04-03 14:26:12 +03:00
|
|
|
|
|
|
|
This program is free software; you can distribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License (Version 2) as
|
|
|
|
published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* prom.c: PROM library initialization code.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/bootmem.h>
|
|
|
|
#include <linux/blkdev.h>
|
2007-04-08 20:20:01 +03:00
|
|
|
|
2007-04-03 14:26:12 +03:00
|
|
|
#include <asm/addrspace.h>
|
|
|
|
#include <asm/bootinfo.h>
|
|
|
|
#include <asm/cpu.h>
|
|
|
|
#include <asm/time.h>
|
2007-04-08 20:20:01 +03:00
|
|
|
#include <asm/mach-bcm963xx/bootloaders.h>
|
|
|
|
#include <asm/mach-bcm963xx/6348_map_part.h>
|
2007-04-03 14:26:12 +03:00
|
|
|
|
2007-04-08 20:20:01 +03:00
|
|
|
#include "../cfe/cfe_private.h"
|
2007-04-03 14:26:12 +03:00
|
|
|
|
2007-04-08 20:20:01 +03:00
|
|
|
extern void __init detect_bootloader(void);
|
2007-04-03 14:26:12 +03:00
|
|
|
extern void serial_init(void);
|
2007-04-08 20:20:01 +03:00
|
|
|
extern int boot_loader_type;
|
2007-04-03 14:26:12 +03:00
|
|
|
|
|
|
|
#define MACH_BCM MACH_BCM96348
|
|
|
|
|
|
|
|
const char *get_system_type(void)
|
|
|
|
{
|
2007-04-08 20:20:01 +03:00
|
|
|
return "Broadcom BCM963xx";
|
2007-04-03 14:26:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void __init prom_init(void)
|
|
|
|
{
|
2007-04-08 20:20:01 +03:00
|
|
|
serial_init();
|
2007-04-03 14:26:12 +03:00
|
|
|
|
2007-04-17 19:00:23 +03:00
|
|
|
printk("%s prom init\n", get_system_type() );
|
2007-04-03 14:26:12 +03:00
|
|
|
|
2007-04-08 20:20:01 +03:00
|
|
|
PERF->IrqMask = 0;
|
2007-04-17 19:00:23 +03:00
|
|
|
|
|
|
|
/* Detect the bootloader */
|
2007-04-08 20:20:01 +03:00
|
|
|
detect_bootloader();
|
2007-04-03 14:26:12 +03:00
|
|
|
|
2007-04-17 19:00:23 +03:00
|
|
|
/* Register 16MB RAM minus the ADSL SDRAM by default */
|
|
|
|
add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
|
|
|
|
|
2007-04-03 14:26:12 +03:00
|
|
|
}
|
|
|
|
|
2007-05-30 22:07:03 +03:00
|
|
|
void __init prom_free_prom_memory(void)
|
2007-04-03 14:26:12 +03:00
|
|
|
{
|
2007-04-08 20:20:01 +03:00
|
|
|
/* We do not have any memory to free */
|
2007-04-03 14:26:12 +03:00
|
|
|
}
|