diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
commit | 92558d67a463bfbb351d30e28648de03b635f024 (patch) | |
tree | a5d41b991a151e72663527a96fbc6c494565d65c /target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c | |
parent | e1dbce411cd2a3a067f387cee011cd889486a07d (diff) | |
download | upstream-92558d67a463bfbb351d30e28648de03b635f024.tar.gz upstream-92558d67a463bfbb351d30e28648de03b635f024.tar.bz2 upstream-92558d67a463bfbb351d30e28648de03b635f024.zip |
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c')
-rw-r--r-- | target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c b/target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c new file mode 100644 index 0000000000..e02d31c9ed --- /dev/null +++ b/target/linux/brcm63xx/files/arch/mips/bcm963xx/prom.c @@ -0,0 +1,73 @@ +/* + 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 + 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> + +#include <asm/addrspace.h> +#include <asm/bootinfo.h> +#include <asm/cpu.h> +#include <asm/time.h> +#include <asm/mach-bcm963xx/bootloaders.h> +#include <asm/mach-bcm963xx/6348_map_part.h> + +#include "../cfe/cfe_private.h" + +extern void __init detect_bootloader(void); +extern void serial_init(void); +extern int boot_loader_type; + +#define MACH_BCM MACH_BCM96348 + +const char *get_system_type(void) +{ + return "Broadcom BCM963xx"; +} + +void __init prom_init(void) +{ + serial_init(); + + printk("%s prom init\n", get_system_type() ); + + PERF->IrqMask = 0; + + /* Detect the bootloader */ + detect_bootloader(); + + /* 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); + } + /* 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) +{ + /* We do not have any memory to free */ +} |