Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/awin Don't grab the ubootinfo structure and ...



details:   https://anonhg.NetBSD.org/src/rev/b6ecc2b9649f
branches:  trunk
changeset: 332184:b6ecc2b9649f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Sep 10 07:39:17 2014 +0000

description:
Don't grab the ubootinfo structure and try to determine the mac address
from it.  Rely on reading the mac from the chip.

diffstat:

 sys/arch/evbarm/awin/awin_machdep.c |  21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)

diffs (65 lines):

diff -r 68650d6ad09e -r b6ecc2b9649f sys/arch/evbarm/awin/awin_machdep.c
--- a/sys/arch/evbarm/awin/awin_machdep.c       Wed Sep 10 07:04:48 2014 +0000
+++ b/sys/arch/evbarm/awin/awin_machdep.c       Wed Sep 10 07:39:17 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awin_machdep.c,v 1.7 2014/09/10 06:50:13 matt Exp $ */
+/*     $NetBSD: awin_machdep.c,v 1.8 2014/09/10 07:39:17 skrll Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.7 2014/09/10 06:50:13 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.8 2014/09/10 07:39:17 skrll Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -192,7 +192,6 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;
 char *boot_file = NULL;
-static uint8_t uboot_enaddr[ETHER_ADDR_LEN];
 
 #if AWIN_board == AWIN_cubieboard
 bool cubietruck_p;
@@ -339,8 +338,6 @@
        printf("\nNetBSD/evbarm (" __STRING(BOARDTYPE) ") booting ...\n");
 #endif
 
-       const uint8_t *uboot_bootinfo = (void*)uboot_args[0];
-
 #ifdef BOOT_ARGS
        char mi_bootargs[] = BOOT_ARGS;
        parse_mi_bootargs(mi_bootargs);
@@ -419,16 +416,8 @@
                             (uboot_args[3] + KERNEL_BASE_VOFFSET);
                        strlcpy(bootargs, args, sizeof(bootargs));
                }
-               if (uboot_args[0]
-                  && uboot_args[0] - AWIN_SDRAM_PBASE < ram_size) {
-                       uboot_bootinfo =
-                           (void*)(uboot_args[0] + KERNEL_BASE_VOFFSET);
-               }
        }
 
-       /* copy u-boot bootinfo ethernet address */
-       memcpy(uboot_enaddr, uboot_bootinfo + 0x250, sizeof(uboot_enaddr));
-
        boot_args = bootargs;
        parse_mi_bootargs(boot_args);
 
@@ -635,12 +624,6 @@
                prop_dictionary_set_uint32(dict, "nc-i", 0x003fc03f);
                return;
        }
-       if (device_is_a(self, "awge") || device_is_a(self, "awe")) {
-               prop_data_t blob =
-                   prop_data_create_data(uboot_enaddr, ETHER_ADDR_LEN);
-               prop_dictionary_set(dict, "mac-address", blob);
-               prop_object_release(blob);
-       }
 
        if (device_is_a(self, "ehci")) {
                return;



Home | Main Index | Thread Index | Old Index