Merge branch 'master' of git://git.denx.de/u-boot-blackfin
[oweals/u-boot.git] / board / atmel / sama5d4_xplained / sama5d4_xplained.c
index de0baada287689529f70469182b6c37603974c92..1c5b92c8b580b7d5a433e95505e98fe1ed4117cc 100644 (file)
 #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>
 #include <asm/arch/sama5d4.h>
-#include <atmel_lcdc.h>
+#include <atmel_hlcdc.h>
 #include <atmel_mci.h>
 #include <lcd.h>
 #include <mmc.h>
@@ -109,10 +110,8 @@ static void sama5d4_xplained_usb_hw_init(void)
 vidinfo_t panel_info = {
        .vl_col = 480,
        .vl_row = 272,
-       .vl_clk = 9000,
-       .vl_sync = ATMEL_LCDC_INVLINE_NORMAL | ATMEL_LCDC_INVFRAME_NORMAL,
+       .vl_clk = 9000000,
        .vl_bpix = LCD_BPP,
-       .vl_bpox = LCD_OUTPUT_BPP,
        .vl_tft = 1,
        .vl_hsync_len = 41,
        .vl_left_margin = 2,
@@ -296,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;
 }
@@ -315,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;
 }