diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-03-22 17:09:06 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:11 -0600 |
commit | d2eaec600617346a143a07bb073466add7a68e97 (patch) | |
tree | 8dd62a6e4142cab8322cdea1a67bda9d5dc62b2c /drivers/net | |
parent | fce6900b492c18962a098eae837ea345b75f9a75 (diff) | |
download | u-boot-imx-d2eaec600617346a143a07bb073466add7a68e97.zip u-boot-imx-d2eaec600617346a143a07bb073466add7a68e97.tar.gz u-boot-imx-d2eaec600617346a143a07bb073466add7a68e97.tar.bz2 |
net: Remove the bd* parameter from net stack functions
This value is not used by the network stack and is available in the
global data, so stop passing it around. For the one legacy function
that still expects it (init op on old Ethernet drivers) pass in the
global pointer version directly to avoid changing that interface.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/4xx_enet.c | 7 | ||||
-rw-r--r-- | drivers/net/netconsole.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c index 381ec42..878f1b2 100644 --- a/drivers/net/4xx_enet.c +++ b/drivers/net/4xx_enet.c @@ -1719,8 +1719,6 @@ static void mal_err (struct eth_device *dev, unsigned long isr, unsigned long uic, unsigned long maldef, unsigned long mal_errr) { - EMAC_4XX_HW_PST hw_p = dev->priv; - mtdcr (MAL0_ESR, isr); /* clear interrupt */ /* clear DE interrupt */ @@ -1728,10 +1726,11 @@ static void mal_err (struct eth_device *dev, unsigned long isr, mtdcr (MAL0_RXDEIR, 0x80000000); #ifdef INFO_4XX_ENET - printf ("\nMAL error occured.... ISR = %lx UIC = = %lx MAL_DEF = %lx MAL_ERR= %lx \n", isr, uic, maldef, mal_errr); + printf("\nMAL error occured.... ISR = %lx UIC = = %lx MAL_DEF = %lx MAL_ERR= %lx\n", + isr, uic, maldef, mal_errr); #endif - eth_init (hw_p->bis); /* start again... */ + eth_init(); /* start again... */ } /*-----------------------------------------------------------------------------+ diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 677c89f..87cea7a 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -193,11 +193,11 @@ static void nc_send_packet(const char *buf, int len) if (eth->state != ETH_STATE_ACTIVE) { if (eth_is_on_demand_init()) { - if (eth_init(gd->bd) < 0) + if (eth_init() < 0) return; eth_set_last_protocol(NETCONS); } else - eth_init_state_only(gd->bd); + eth_init_state_only(); inited = 1; } |