]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: at91sam9260ek/9g20ek: Enable early debug UART
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 18 Apr 2017 07:18:49 +0000 (15:18 +0800)
committerSimon Glass <sjg@chromium.org>
Tue, 9 May 2017 18:14:16 +0000 (12:14 -0600)
Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 files changed:
board/atmel/at91sam9260ek/at91sam9260ek.c
configs/at91sam9260ek_dataflash_cs0_defconfig
configs/at91sam9260ek_dataflash_cs1_defconfig
configs/at91sam9260ek_nandflash_defconfig
configs/at91sam9g20ek_2mmc_defconfig
configs/at91sam9g20ek_2mmc_nandflash_defconfig
configs/at91sam9g20ek_dataflash_cs0_defconfig
configs/at91sam9g20ek_dataflash_cs1_defconfig
configs/at91sam9g20ek_nandflash_defconfig
configs/at91sam9xeek_dataflash_cs0_defconfig
configs/at91sam9xeek_dataflash_cs1_defconfig
configs/at91sam9xeek_nandflash_defconfig

index e28242f0342c5d0dbf26bd15e28ff0ec48295947..b087fce9b8767c24ff239efc5f0fc5487b9de499 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
@@ -61,10 +62,22 @@ static void at91sam9260ek_nand_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+       at91_seriald_hw_init();
+}
+#endif
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
index 6d34e215ff5bab8e66836fc7e0d37044d541b6ac..cc3f0a8b343ca59355c3a659dcea12ca69bf1cb0 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index 85f01f34d23ae068b0567ce9ec71b63c7ba3c75a..cb621dfb9ff66faf3f8eb9ba106ef28e2220c8a6 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index d9a7a48e88afba135ec0a3cacdc283ea8eb24f26..20d356537711d59a1e754ecc85069322d2837842 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index ef7bd402c7c13c9c6aaac12aa6d160523de72212..18e88a744512bbcfbcb79fe005116f2d611f3c89 100644 (file)
@@ -33,6 +33,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
index 398be7e60ab9a05fd0435f1bf7bd88be77d0674f..fb0d87ab4b5c51195d800f64108985b88eee521f 100644 (file)
@@ -33,6 +33,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
index b8105738aa6fcc83b9fd37778b8b833fed627709..27c1c10df18d22a3a3b202bea46a9fa9c02e794c 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index 18e2a17664ce155c9401ff588dee0c4cc29acd56..1826e6ca98cd11fb45fa0fa8e680ddb69b2dc9c6 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index daa41dcba7e0a7ead1db74a17c3c66bf79704e2d..1ac88631bcec6fa6047d6cd94451c1db20317fb4 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index e38b7181295acb01dc81d65b08dddda3095cb6bb..80673d2b63c8c93eca5af2d3d3b4d4fd8f9f68cd 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index bc7eb03f873c26f61e53b42354ce06706abddb14..8922065d38e7efef85680b6bf345bef36e73f48d 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
index 7e59335756b332cfc194e86c0e1257730ffd04ed..9c28a59fe30345f61e6d9735f1c847ea45552bd7 100644 (file)
@@ -31,6 +31,12 @@ CONFIG_MACB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y