summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
commit17c7b6c3fdc48301e50d22cc6138ede16bd1be24 (patch)
treea5d41b991a151e72663527a96fbc6c494565d65c /target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c
parent5389989abaa52926b22f9f030d1481df1e73d745 (diff)
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-2.6/files/arch/mips/bcm963xx/info.c')
-rw-r--r--target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c102
1 files changed, 0 insertions, 102 deletions
diff --git a/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c b/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c
deleted file mode 100644
index d50b601e2..000000000
--- a/target/linux/brcm63xx-2.6/files/arch/mips/bcm963xx/info.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2007 OpenWrt.org
- * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
- * Copyright (C) 2007 Florian Fainelli <florian@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <linux/types.h>
-#include <linux/autoconf.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-
-#include <asm/bootinfo.h>
-#include <asm/addrspace.h>
-#include <asm/string.h>
-#include <asm/mach-bcm963xx/bootloaders.h>
-
-static char *boot_loader_names[BOOT_LOADER_LAST+1] = {
- [BOOT_LOADER_UNKNOWN] = "Unknown",
- [BOOT_LOADER_CFE] = "CFE",
- [BOOT_LOADER_REDBOOT] = "RedBoot",
- [BOOT_LOADER_CFE2] = "CFEv2"
-};
-
-/* boot loaders specific definitions */
-#define CFE_EPTSEAL 0x43464531 /* CFE1 is the magic number to recognize CFE from other bootloaders */
-
-int boot_loader_type;
-/*
- * Boot loader detection routines
- */
-static int __init detect_cfe(void)
-{
- /*
- * This method only works, when we are booted directly from the CFE.
- */
- uint32_t cfe_handle = (uint32_t) fw_arg0;
- uint32_t cfe_a1_val = (uint32_t) fw_arg1;
- uint32_t cfe_entry = (uint32_t) fw_arg2;
- uint32_t cfe_seal = (uint32_t) fw_arg3;
-
- /* Check for CFE by finding the CFE magic number */
- if (cfe_seal != CFE_EPTSEAL)
- /* We are not booted from CFE */
- return 0;
-
- /* cfe_a1_val must be 0, because only one CPU present in the ADM5120 SoC */
- if (cfe_a1_val != 0)
- return 0;
-
- /* The cfe_handle, and the cfe_entry must be kernel mode addresses */
- if ((cfe_handle < KSEG0) || (cfe_entry < KSEG0))
- return 0;
-
- return 1;
-}
-
-static int __init detect_redboot(void)
-{
- /* On Inventel Livebox, the boot loader is passed as a command line argument, check for it */
- if (!strncmp(arcs_cmdline, "boot_loader=RedBoot", 19))
- return 1;
- return 0;
-}
-
-void __init detect_bootloader(void)
-{
- if (detect_cfe()) {
- boot_loader_type = BOOT_LOADER_CFE;
- }
-
- if (detect_redboot()) {
- boot_loader_type = BOOT_LOADER_REDBOOT;
- }
- else {
- /* Some devices are using CFE, but it is not detected as is */
- boot_loader_type = BOOT_LOADER_CFE2;
- }
- printk("Boot loader is : %s\n", boot_loader_names[boot_loader_type]);
-}
-
-void __init detect_board(void)
-{
- switch (boot_loader_type)
- {
- case BOOT_LOADER_CFE:
- break;
- case BOOT_LOADER_REDBOOT:
- break;
- default:
- break;
- }
-}
-
-EXPORT_SYMBOL(boot_loader_type);