board: atmel: Fix compiler warning 'board_usb_hw_init()' not used
[oweals/u-boot.git] / board / atmel / sama5d2_xplained / sama5d2_xplained.c
index 778142ac7161c2da494f101a31272daafb7e6464..01636fb73d010f882fcf500d2d72be28c80a732c 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015 Atmel Corporation
  *                   Wenyou.Yang <wenyou.yang@atmel.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #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);
 }
+#endif
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
@@ -29,6 +33,7 @@ int board_late_init(void)
 #ifdef CONFIG_DM_VIDEO
        at91_video_show_board_info();
 #endif
+       at91_pda_detect();
        return 0;
 }
 #endif
@@ -36,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);