UPSTREAM: 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. Change-Id: I041cc547659b540735dcaf52444d97834ea10059 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 5ee94b4f4032502c26cd3c9ede6a910d7e2c9b46)
This commit is contained in:
parent
73991b074b
commit
b974325dd8
|
|
@ -934,6 +934,9 @@ void board_init_f_r(void)
|
|||
* UART if available.
|
||||
*/
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue