diff options
Diffstat (limited to 'target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c')
-rw-r--r-- | target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c b/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c index aba5438e1b..9979341c44 100644 --- a/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c +++ b/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/arcaydian.c @@ -18,25 +18,28 @@ #include "arcaydian.h" -static int ifxmips_brn = 1; +static int ifxmips_brn = 0; int __init -ifxmips_find_brn_mac(unsigned char *ifxmips_ethaddr) +ifxmix_detect_brn_block(void) { unsigned char temp[8]; memcpy_fromio(temp, (void *)KSEG1ADDR(IFXMIPS_FLASH_START + 0x800000 - 0x10000), 8); if (!memcmp(temp, "BRN-BOOT", 8)) - { - memcpy_fromio(ifxmips_ethaddr, - (void *)KSEG1ADDR(IFXMIPS_FLASH_START + - 0x800000 - 0x10000 + 0x16), 6); - if (is_valid_ether_addr(ifxmips_ethaddr)) - return 1; - } else { - ifxmips_brn = 0; - } - return 0; + ifxmips_brn = 1; + return !ifxmips_brn; +} + +int __init +ifxmips_find_brn_mac(unsigned char *ifxmips_ethaddr) +{ + if(!ifxmips_brn) + return 1; + memcpy_fromio(ifxmips_ethaddr, + (void *)KSEG1ADDR(IFXMIPS_FLASH_START + + 0x800000 - 0x10000 + 0x16), 6); + return is_valid_ether_addr(ifxmips_ethaddr); } int |