X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fadm5120-2.6%2Ffiles%2Farch%2Fmips%2Fadm5120%2Fprom%2Fcfe.c;fp=target%2Flinux%2Fadm5120-2.6%2Ffiles%2Farch%2Fmips%2Fadm5120%2Fprom%2Fcfe.c;h=0000000000000000000000000000000000000000;hp=6c03a4e859bc5fffaf2039ddd08ad3838d929fe8;hb=5c903cc55c673e5e6eda9c78f51a81b715eb4eec;hpb=e61a44ffca9f2b102a64517eb19373d4ea61c142 diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom/cfe.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom/cfe.c deleted file mode 100644 index 6c03a4e859..0000000000 --- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom/cfe.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * $Id$ - * - * Broadcom's CFE specific prom routines - * - * Copyright (C) 2007 OpenWrt.org - * Copyright (C) 2007 Gabor Juhos - * - * 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. - * - * This program is distributed in the hope that 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., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include - -#include -#include - -#include -#include "prom_read.h" - -/* - * CFE based boards - */ -#define CFE_EPTSEAL 0x43464531 /* CFE1 is the magic number to recognize CFE -from other bootloaders */ - -static int cfe_found = 0; - -static u32 cfe_handle; -static u32 cfe_entry; -static u32 cfe_seal; - -int __init cfe_present(void) -{ - /* - * This method only works, when we are booted directly from the CFE. - */ - u32 a1 = (u32) fw_arg1; - - if (cfe_found) - return 1; - - cfe_handle = (u32) fw_arg0; - cfe_entry = (u32) fw_arg2; - cfe_seal = (u32) 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 */ - if (a1 != 0) { - return 0; - } - - /* The cfe_handle, and the cfe_entry must be kernel mode addresses */ - if ((cfe_handle < KSEG0) || (cfe_entry < KSEG0)) { - return 0; - } - - cfe_found = 1; - return 1; -} - -char *cfe_getenv(char *envname) -{ - if (cfe_found == 0) - return NULL; - - return NULL; -}