]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: atmel: sama5d4_xplained: add option for usb ethernet gadget
authorBo Shen <voice.shen@atmel.com>
Wed, 3 Dec 2014 10:02:22 +0000 (18:02 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Mon, 19 Jan 2015 14:02:47 +0000 (15:02 +0100)
Add the option for USB Ethernet gadget based on atmel usb
device.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
board/atmel/sama5d4_xplained/sama5d4_xplained.c

index 2758c5cbcd6ff777d6ca923a8cf092fbf689894b..1c5b92c8b580b7d5a433e95505e98fe1ed4117cc 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
+#include <asm/arch/atmel_usba_udc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/sama5d3_smc.h>
@@ -294,6 +295,9 @@ int board_init(void)
 #ifdef CONFIG_CMD_USB
        sama5d4_xplained_usb_hw_init();
 #endif
+#ifdef CONFIG_USB_GADGET_ATMEL_USBA
+       at91_udp_hw_init();
+#endif
 
        return 0;
 }
@@ -313,5 +317,12 @@ int board_eth_init(bd_t *bis)
        rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC0, 0x00);
 #endif
 
+#ifdef CONFIG_USB_GADGET_ATMEL_USBA
+       usba_udc_probe(&pdata);
+#ifdef CONFIG_USB_ETH_RNDIS
+       usb_eth_initialize(bis);
+#endif
+#endif
+
        return rc;
 }