board: atmel: sama5d2_icp: standby disable on CAN transceivers in SPL
[oweals/u-boot.git] / board / atmel / sama5d2_icp / sama5d2_icp.c
index 1c28aaba85a8402b465b8534147a0fbc3727a62e..f55ea2c6f897f86c8b5c981265584cfc7bd57405 100644 (file)
@@ -73,6 +73,12 @@ int misc_init_r(void)
 /* SPL */
 #ifdef CONFIG_SPL_BUILD
 
+/* must set PB25 low to enable the CAN transceivers */
+static void board_can_stdby_dis(void)
+{
+       atmel_pio4_set_pio_output(AT91_PIO_PORTB, 25, 0);
+}
+
 /* deassert reset lines for external periph in case of warm reboot */
 static void board_reset_additional_periph(void)
 {
@@ -111,6 +117,7 @@ void spl_board_init(void)
        spl_mmc_init();
 #endif
        board_reset_additional_periph();
+       board_can_stdby_dis();
 }
 
 void spl_display_print(void)