board: atmel: Fix compiler warning 'board_usb_hw_init()' not used
[oweals/u-boot.git] / board / atmel / sama5d27_som1_ek / sama5d27_som1_ek.c
index d805068ac97c1e0ddae3c16f25d674fc505343c5..376562cd0e7d0f368313aa4b283813af2b1097b3 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/sama5d2.h>
 
+extern void at91_pda_detect(void);
+
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_CMD_USB
 static void board_usb_hw_init(void)
 {
-       atmel_pio4_set_pio_output(AT91_PIO_PORTB, 10, 1);
+       atmel_pio4_set_pio_output(AT91_PIO_PORTA, 27, 1);
 }
+#endif
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
@@ -28,6 +33,7 @@ int board_late_init(void)
 #ifdef CONFIG_DM_VIDEO
        at91_video_show_board_info();
 #endif
+       at91_pda_detect();
        return 0;
 }
 #endif
@@ -35,7 +41,7 @@ int board_late_init(void)
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
 static void board_uart1_hw_init(void)
 {
-       atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1);  /* URXD1 */
+       atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, ATMEL_PIO_PUEN_MASK);        /* URXD1 */
        atmel_pio4_set_a_periph(AT91_PIO_PORTD, 3, 0);  /* UTXD1 */
 
        at91_periph_clk_enable(ATMEL_ID_UART1);