From patchwork Fri Oct 9 07:08:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Chou X-Patchwork-Id: 528113 X-Patchwork-Delegate: thomas@wytron.com.tw Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E34EF140D57 for ; Fri, 9 Oct 2015 18:08:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BAA04B83A; Fri, 9 Oct 2015 09:08:37 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3YqaMFfJUfMU; Fri, 9 Oct 2015 09:08:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F18DA4B833; Fri, 9 Oct 2015 09:08:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0783C4B837 for ; Fri, 9 Oct 2015 09:08:34 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ARJkHwvKP-fJ for ; Fri, 9 Oct 2015 09:08:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from www.wytron.com.tw (220-134-43-68.HINET-IP.hinet.net [220.134.43.68]) by theia.denx.de (Postfix) with ESMTP id 7E5B84B833 for ; Fri, 9 Oct 2015 09:08:30 +0200 (CEST) Received: from localhost.localdomain (unknown [192.168.1.250]) by www.wytron.com.tw (Postfix) with ESMTP id 75408D00303; Fri, 9 Oct 2015 15:08:27 +0800 (CST) From: Thomas Chou To: u-boot@lists.denx.de Date: Fri, 9 Oct 2015 15:08:22 +0800 Message-Id: <1444374503-26503-2-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444374503-26503-1-git-send-email-thomas@wytron.com.tw> References: <1443446357-21393-1-git-send-email-thomas@wytron.com.tw> <1444374503-26503-1-git-send-email-thomas@wytron.com.tw> Cc: Marek Vasut , clsee@altera.com, lftan@altera.com Subject: [U-Boot] [PATCH v7 2/3] timer: start a new dm_timer after relocation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Start a new dm_timer after relocation, just in case the timer has been used in per-relocation. Signed-off-by: Thomas Chou Acked-by: Simon Glass --- v6 rename to CONFIG_TIMER as Simon suggested. v7 fix string replacement error in v6 common/board_r.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index f8c1baa..d22118b 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -290,6 +290,9 @@ static int initr_dm(void) /* Save the pre-reloc driver model and start a new one */ gd->dm_root_f = gd->dm_root; gd->dm_root = NULL; +#ifdef CONFIG_TIMER + gd->dm_timer = NULL; +#endif return dm_init_and_scan(false); } #endif