Skip to content
Snippets Groups Projects
Commit 5ee94b4f authored by Simon Glass's avatar Simon Glass Committed by Bin Meng
Browse files

board_f: Drop the timer after relocation


Once U-Boot relocates itself the existing driver-model timer (if any) is
no-longer valid until the device is reinitialised. Any use of the device
may cause a crash. To handle this, set the timer to NULL after relocation.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent eb45787b
No related branches found
No related tags found
No related merge requests found
...@@ -952,6 +952,9 @@ void board_init_f_r(void) ...@@ -952,6 +952,9 @@ void board_init_f_r(void)
* UART if available. * UART if available.
*/ */
gd->flags &= ~GD_FLG_SERIAL_READY; gd->flags &= ~GD_FLG_SERIAL_READY;
#ifdef CONFIG_TIMER
gd->timer = NULL;
#endif
/* /*
* U-Boot has been copied into SDRAM, the BSS has been cleared etc. * U-Boot has been copied into SDRAM, the BSS has been cleared etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment