X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2FRPXClassic%2FRPXClassic.c;h=f47e8fa44da1711a5ee7aef5b4d6dd7048fb82a2;hb=1a4596601fd395f3afb8f82f3f840c5e00bdd57a;hp=9fdf700ff5e45308057e8fa774079fdd75b41af9;hpb=6d0f6bcf337c5261c08fabe12982178c2c489d76;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/RPXClassic/RPXClassic.c b/board/RPXClassic/RPXClassic.c index 9fdf700..f47e8fa 100644 --- a/board/RPXClassic/RPXClassic.c +++ b/board/RPXClassic/RPXClassic.c @@ -1,35 +1,20 @@ /* * (C) Copyright 2001 - * Stäubli Faverges - + * Stäubli Faverges - * Pierre AUBERT p.aubert@staubli.com * U-Boot port on RPXClassic LF (CLLF_BW31) board * * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include #include +#include /* ------------------------------------------------------------------------- */ @@ -105,7 +90,7 @@ int checkboard (void) * board_get_enetaddr -- Read the MAC Address in the I2C EEPROM *----------------------------------------------------------------------------- */ -void board_get_enetaddr (uchar * enet) +static void board_get_enetaddr(uchar *enet) { int i; char buff[256], *cp; @@ -142,9 +127,19 @@ void board_get_enetaddr (uchar * enet) enet[3] |= 0x80; #endif - printf ("MAC address = %02x:%02x:%02x:%02x:%02x:%02x\n", - enet[0], enet[1], enet[2], enet[3], enet[4], enet[5]); + printf("MAC address = %pM\n", enet); +} + +int misc_init_r(void) +{ + uchar enetaddr[6]; + + if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { + board_get_enetaddr(enetaddr); + eth_setenv_enetaddr("ethaddr", enetaddr); + } + return 0; } void rpxclassic_init (void)