X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fsmc911x.c;h=5959672370efb063d9e23c80bb038fd630224b85;hb=5840537879d93814f681d45ccf26d8b171f80acf;hp=6cc236ce79d6290911d468b23f040c69a154ead6;hpb=6af1d41a46691ca67a8e79af12f07a22aa71680f;p=u-boot diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 6cc236ce79..5959672370 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -3,23 +3,7 @@ * * (c) 2007 Pengutronix, Sascha Hauer * - * 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 @@ -35,8 +19,6 @@ u32 pkt_data_pull(struct eth_device *dev, u32 addr) \ void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \ __attribute__ ((weak, alias ("smc911x_reg_write"))); -#define mdelay(n) udelay((n)*1000) - static void smc911x_handle_mac_address(struct eth_device *dev) { unsigned long addrh, addrl; @@ -163,8 +145,7 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd) return 0; } -static int smc911x_send(struct eth_device *dev, - volatile void *packet, int length) +static int smc911x_send(struct eth_device *dev, void *packet, int length) { u32 *data = (u32*)packet; u32 tmplen; @@ -206,6 +187,7 @@ static int smc911x_send(struct eth_device *dev, static void smc911x_halt(struct eth_device *dev) { smc911x_reset(dev); + smc911x_handle_mac_address(dev); } static int smc911x_rx(struct eth_device *dev) @@ -237,7 +219,7 @@ static int smc911x_rx(struct eth_device *dev) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) /* wrapper for smc911x_eth_phy_read */ -static int smc911x_miiphy_read(char *devname, u8 phy, u8 reg, u16 *val) +static int smc911x_miiphy_read(const char *devname, u8 phy, u8 reg, u16 *val) { struct eth_device *dev = eth_get_dev_by_name(devname); if (dev) @@ -245,7 +227,7 @@ static int smc911x_miiphy_read(char *devname, u8 phy, u8 reg, u16 *val) return -1; } /* wrapper for smc911x_eth_phy_write */ -static int smc911x_miiphy_write(char *devname, u8 phy, u8 reg, u16 val) +static int smc911x_miiphy_write(const char *devname, u8 phy, u8 reg, u16 val) { struct eth_device *dev = eth_get_dev_by_name(devname); if (dev)