X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fplb2800_eth.c;h=8aefc14144426741bebcf880d32a777099a56a42;hb=6612ab33956ae09c5ba2fde9c1540b519625ba37;hp=b8cc57aa78b3226a057e405c5eadd22d465c1af6;hpb=42fd5f87b1613d3039f57e93c16f760a768d3e84;p=u-boot diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c index b8cc57aa78..8aefc14144 100644 --- a/drivers/net/plb2800_eth.c +++ b/drivers/net/plb2800_eth.c @@ -4,32 +4,13 @@ * (C) Copyright 2003 * 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 - -#if defined(CONFIG_CMD_NET) \ - && defined(CONFIG_NET_MULTI) && defined(CONFIG_PLB2800_ETHER) - #include #include +#include #include @@ -85,8 +66,7 @@ typedef volatile struct { static int plb2800_eth_init(struct eth_device *dev, bd_t * bis); -static int plb2800_eth_send(struct eth_device *dev, volatile void *packet, - int length); +static int plb2800_eth_send(struct eth_device *dev, void *packet, int length); static int plb2800_eth_recv(struct eth_device *dev); static void plb2800_eth_halt(struct eth_device *dev); @@ -109,7 +89,7 @@ int plb2800_eth_initialize(bd_t * bis) if (!(dev = (struct eth_device *) malloc (sizeof *dev))) { printf("Failed to allocate memory\n"); - return 0; + return -1; } memset(dev, 0, sizeof(*dev)); @@ -144,7 +124,7 @@ int plb2800_eth_initialize(bd_t * bis) printf("Leaving plb2800_eth_initialize()\n"); #endif - return 1; + return 0; } static int plb2800_eth_init(struct eth_device *dev, bd_t * bis) @@ -165,8 +145,7 @@ static int plb2800_eth_init(struct eth_device *dev, bd_t * bis) } -static int plb2800_eth_send(struct eth_device *dev, volatile void *packet, - int length) +static int plb2800_eth_send(struct eth_device *dev, void *packet, int length) { int i; int res = -1; @@ -392,5 +371,3 @@ static unsigned char * plb2800_get_mac_addr(void) return addr; } - -#endif /* CONFIG_PLB2800_ETHER */