From: Simon Glass Date: Wed, 6 Sep 2017 01:49:45 +0000 (-0600) Subject: board_f: Drop the timer after relocation X-Git-Tag: v2017.11-rc1~89^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ee94b4f4032502c26cd3c9ede6a910d7e2c9b46;p=platform%2Fkernel%2Fu-boot.git 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: Simon Glass Reviewed-by: Bin Meng --- diff --git a/common/board_f.c b/common/board_f.c index 104d144..9220815 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -952,6 +952,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.