X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fstandalone%2Fsmc91111_eeprom.c;h=5ffefc8f36bf0b47231dc8572718f6e37b8fb448;hb=5e604e2ce7e836996103fa1e5bed4e92ce8d0bb2;hp=89afc871fa70283cf5963448f5e4fa57188863f0;hpb=7194ab809532eeca3e2ee5dc12017cb901cc5842;p=u-boot diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c index 89afc871fa..5ffefc8f36 100644 --- a/examples/standalone/smc91111_eeprom.c +++ b/examples/standalone/smc91111_eeprom.c @@ -1,40 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2004 * Robin Getz rgetz@blacfin.uclinux.org * - * 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 - * * Heavily borrowed from the following peoples GPL'ed software: * - Wolfgang Denk, DENX Software Engineering, wd@denx.de - * Das U-boot + * Das U-Boot * - Ladislav Michl ladis@linux-mips.org * A rejected patch on the U-Boot mailing list */ #include #include -/* the smc91111.h gets base addr through eth_device' iobase */ -struct eth_device { unsigned long iobase; }; #include "../drivers/net/smc91111.h" -#ifdef CONFIG_SMC91111 - #ifndef SMC91111_EEPROM_INIT # define SMC91111_EEPROM_INIT() #endif @@ -52,14 +31,13 @@ void print_MAC (struct eth_device *dev); int read_eeprom_reg (struct eth_device *dev, int reg); void print_macaddr (struct eth_device *dev); -int smc91111_eeprom (int argc, char *argv[]) +int smc91111_eeprom (int argc, char * const argv[]) { int c, i, j, done, line, reg, value, start, what; char input[50]; - struct eth_device dev = { - .iobase = CONFIG_SMC91111_BASE - }; + struct eth_device dev; + dev.iobase = CONFIG_SMC91111_BASE; /* Print the ABI version */ app_startup (argv); @@ -391,13 +369,3 @@ void dump_reg (struct eth_device *dev) printf ("\n"); } } - -#else - -int smc91111_eeprom (int argc, char *argv[]) -{ - printf("Not supported for this board\n"); - return 1; -} - -#endif