arm: mvebu: turris_omnia: disable MCU watchdog in SPL when booting over UART
When booting over UART, sending U-Boot proper may take too much time and MCU watchdog will reset the board before U-Boot proper is loaded. Better disable MCU watchdog in SPL when booting over UART. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
		
							parent
							
								
									008a069b89
								
							
						
					
					
						commit
						aeb0ca64db
					
				|  | @ -419,11 +419,26 @@ int board_early_init_f(void) | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void spl_board_init(void) | ||||||
|  | { | ||||||
|  | 	/*
 | ||||||
|  | 	 * If booting from UART, disable MCU watchdog in SPL, since uploading | ||||||
|  | 	 * U-Boot proper can take too much time and trigger it. | ||||||
|  | 	 */ | ||||||
|  | 	if (get_boot_device() == BOOT_DEVICE_UART) | ||||||
|  | 		disable_mcu_watchdog(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| int board_init(void) | int board_init(void) | ||||||
| { | { | ||||||
| 	/* address of boot parameters */ | 	/* address of boot parameters */ | ||||||
| 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100; | 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100; | ||||||
| 
 | 
 | ||||||
|  | 	/*
 | ||||||
|  | 	 * If not booting from UART, MCU watchdog was not disabled in SPL, | ||||||
|  | 	 * disable it now. | ||||||
|  | 	 */ | ||||||
|  | 	if (get_boot_device() != BOOT_DEVICE_UART) | ||||||
| 		disable_mcu_watchdog(); | 		disable_mcu_watchdog(); | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
|  | @ -33,6 +33,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y | ||||||
| # CONFIG_DISPLAY_BOARDINFO is not set | # CONFIG_DISPLAY_BOARDINFO is not set | ||||||
| CONFIG_DISPLAY_BOARDINFO_LATE=y | CONFIG_DISPLAY_BOARDINFO_LATE=y | ||||||
| CONFIG_MISC_INIT_R=y | CONFIG_MISC_INIT_R=y | ||||||
|  | CONFIG_SPL_BOARD_INIT=y | ||||||
| CONFIG_SPL_I2C=y | CONFIG_SPL_I2C=y | ||||||
| CONFIG_CMD_MEMTEST=y | CONFIG_CMD_MEMTEST=y | ||||||
| CONFIG_SYS_ALT_MEMTEST=y | CONFIG_SYS_ALT_MEMTEST=y | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue