*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
+#include <dm.h>
#include <env.h>
+#include <log.h>
#include <net.h>
#include <phy.h>
+#include <asm/global_data.h>
+#include <linux/bug.h>
#include <linux/errno.h>
#include <net/pcap.h>
#include "eth_internal.h"
* CPU and board-specific Ethernet initializations. Aliased function
* signals caller to move on
*/
-static int __def_eth_init(bd_t *bis)
+static int __def_eth_init(struct bd_info *bis)
{
return -1;
}
-int cpu_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init")));
-int board_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init")));
+int cpu_eth_init(struct bd_info *bis) __attribute__((weak, alias("__def_eth_init")));
+int board_eth_init(struct bd_info *bis) __attribute__((weak, alias("__def_eth_init")));
#ifdef CONFIG_API
static struct {
return 0;
/* look for an index after "eth" */
- index = simple_strtoul(name + 3, NULL, 10);
+ index = dectoul(name + 3, NULL);
dev = eth_devices;
do {
}
if (!eth_devices) {
- puts("No ethernet found.\n");
+ log_err("No ethernet found.\n");
bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
} else {
struct eth_device *dev = eth_devices;
struct eth_device *old_current;
if (!eth_current) {
- puts("No ethernet found.\n");
+ log_err("No ethernet found.\n");
return -ENODEV;
}
ret = eth_current->send(eth_current, packet, length);
#if defined(CONFIG_CMD_PCAP)
if (ret >= 0)
- pcap_post(packet, lengeth, true);
+ pcap_post(packet, length, true);
#endif
return ret;
}