summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-04-17 16:00:23 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-04-17 16:00:23 +0000
commit2bf49e010b25b8e50e735729b46063c4a9099db1 (patch)
treea2bc03273c3a6986d810d92e9c3af060b435f237 /target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c
parent65d82bc293ba1f46994771e9c1c924d167752439 (diff)
downloadmtk-20170518-2bf49e010b25b8e50e735729b46063c4a9099db1.zip
mtk-20170518-2bf49e010b25b8e50e735729b46063c4a9099db1.tar.gz
mtk-20170518-2bf49e010b25b8e50e735729b46063c4a9099db1.tar.bz2
brcm63xx cleanups; add a watchdog driver, indent serial console driver, add support for another sst flash
SVN-Revision: 6985
Diffstat (limited to 'target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c')
-rw-r--r--target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c b/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c
index af278a2..23e9720 100644
--- a/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c
+++ b/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/prom.c
@@ -1,6 +1,6 @@
/*
-<:copyright-gpl
Copyright 2004 Broadcom Corp. All Rights Reserved.
+ Copyright 2007 OpenWrt,org, Florian Fainelli <florian@openwrt.org>
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
@@ -14,7 +14,6 @@
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.
@@ -50,24 +49,26 @@ void __init prom_init(void)
{
serial_init();
- printk( "%s prom init\n", get_system_type() );
+ printk("%s prom init\n", get_system_type() );
PERF->IrqMask = 0;
-
+
+ /* Detect the bootloader */
detect_bootloader();
- if (boot_loader_type == BOOT_LOADER_CFE) {
+ /* Do further initialisations depending on the bootloader */
+ if (boot_loader_type == BOOT_LOADER_CFE || boot_loader_type == BOOT_LOADER_CFE2) {
cfe_setup(fw_arg0, fw_arg1, fw_arg2, fw_arg3);
- add_memory_region(0, (boot_mem_map.map[0].size - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
}
- else
- add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
-
+ /* Register 16MB RAM minus the ADSL SDRAM by default */
+ add_memory_region(0, (0x01000000 - ADSL_SDRAM_IMAGE_SIZE), BOOT_MEM_RAM);
+
mips_machgroup = MACH_GROUP_BRCM;
mips_machtype = MACH_BCM;
}
-void __init prom_free_prom_memory(void)
+unsigned long __init prom_free_prom_memory(void)
{
/* We do not have any memory to free */
+ return 0;
}