From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugen Hristev Date: Thu, 19 Jul 2018 12:58:04 +0300 Subject: [U-Boot] [PATCH 16/20] board: sama5d3_xplained: add pda detect call at init time In-Reply-To: <1531994288-19423-1-git-send-email-eugen.hristev@microchip.com> References: <1531994288-19423-1-git-send-email-eugen.hristev@microchip.com> Message-ID: <1531994288-19423-17-git-send-email-eugen.hristev@microchip.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- arch/arm/mach-at91/Kconfig | 1 + board/atmel/sama5d3_xplained/sama5d3_xplained.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index ce6be38..6fe701a 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -175,6 +175,7 @@ config TARGET_SAMA5D3_XPLAINED select SAMA5D3 select SUPPORT_SPL select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT config TARGET_SAMA5D3XEK bool "SAMA5D3X-EK board" diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index c47f638..289f8d8 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -18,6 +18,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern void at91_pda_detect(void); + #ifdef CONFIG_NAND_ATMEL void sama5d3_xplained_nand_hw_init(void) { @@ -72,6 +74,14 @@ void board_debug_uart_init(void) } #endif +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + at91_pda_detect(); + return 0; +} +#endif + #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -- 2.7.4