summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index b5c0cb7..49c9448 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -11,6 +11,8 @@
*/
#include <common.h>
+#include <netdev.h>
+#include <miiphy.h>
#include <serial.h>
#ifdef CONFIG_SPL_BUILD
#include <spl.h>
@@ -86,3 +88,24 @@ void enable_caches(void)
dcache_enable();
}
#endif
+
+#ifdef CONFIG_CMD_NET
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+int cpu_eth_init(bd_t *bis)
+{
+ int rc;
+
+#ifdef CONFIG_SUNXI_GMAC
+ rc = sunxi_gmac_initialize(bis);
+ if (rc < 0) {
+ printf("sunxi: failed to initialize gmac\n");
+ return rc;
+ }
+#endif
+
+ return 0;
+}
+#endif