From: Simon Glass Date: Sun, 27 Aug 2017 09:23:46 -0600 Subject: [U-Boot] [PATCH v2 1/6] board_f: Drop the timer after relocation In-Reply-To: <20170827152351.20609-1-sjg@chromium.org> References: <20170827152351.20609-1-sjg@chromium.org> Message-ID: <20170827152351.20609-2-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None common/board_f.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/board_f.c b/common/board_f.c index 104d144f41a..2e597ddf99f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -952,6 +952,7 @@ void board_init_f_r(void) * UART if available. */ gd->flags &= ~GD_FLG_SERIAL_READY; + gd->timer = NULL; /* * U-Boot has been copied into SDRAM, the BSS has been cleared etc. -- 2.14.1.342.g6490525c54-goog