From patchwork Thu Jan 22 14:38:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 431826 X-Patchwork-Delegate: trini@ti.com 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 379971402A7 for ; Fri, 23 Jan 2015 01:38:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C8ABD4B615; Thu, 22 Jan 2015 15:38:23 +0100 (CET) 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 CVBvGFp5Q-ih; Thu, 22 Jan 2015 15:38:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0707E4B5FA; Thu, 22 Jan 2015 15:38:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D84864B5FA for ; Thu, 22 Jan 2015 15:38:18 +0100 (CET) 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 UBIYpdNKZhF7 for ; Thu, 22 Jan 2015 15:38:18 +0100 (CET) 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 mail-yk0-f172.google.com (mail-yk0-f172.google.com [209.85.160.172]) by theia.denx.de (Postfix) with ESMTPS id 83F4B4B5F5 for ; Thu, 22 Jan 2015 15:38:16 +0100 (CET) Received: by mail-yk0-f172.google.com with SMTP id 9so370501ykp.3 for ; Thu, 22 Jan 2015 06:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=4MxqjIscul9XJWPeeCvi+aLZBchPQI6Q1jfso2A30wU=; b=XlMV4y3wKYqtQ35RQwmM6L7ptIhKV3rt8fDgH+dXbSXvaWfLjlegacQO+6BItJn/nf VriN3WjUQs6w5dcFM3tqMKCWpmuinQsOAZBQIB2+gDQbQktH3XgCuSkiffrpFCYCtQRW oHeaFthg2+cG+hRewn2YClSY61Ol19XGA0W0FX71CKwNF4jE+UJuqlMd2fUd7IK1nL9A 9nlQzWLJQ+UFeQj97fHEw18hHYnPUgRhuusmeCAIJ7p5XBRwO5wzquLViF1+h4I4sL0S TsvHnwDk2VybW93pOO98W4p5aLzcDo32Gqb2djZnbMxfcSjqWXOB/2I3MqdTIVQPV0pS eoFw== X-Received: by 10.236.7.107 with SMTP id 71mr996610yho.148.1421937494664; Thu, 22 Jan 2015 06:38:14 -0800 (PST) Received: from localhost.localdomain (cpe-174-106-048-186.ec.res.rr.com. [174.106.48.186]) by mx.google.com with ESMTPSA id a61sm1925317yha.13.2015.01.22.06.38.13 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 06:38:13 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 22 Jan 2015 09:38:10 -0500 Message-Id: <1421937490-13297-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH v2] davinci: Do not duplicate setting of gd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de In f0c3a6c we stopped setting gd in board_init_f, but later had to revert to due problems on certain platforms. As davinci does not look to have these problems, we can drop the setting here and rely upon crt0.S to do it. Cc: Peter Howard Signed-off-by: Tom Rini --- Changes in v2: - Switch to default board_init_f, move the rest of that logic to spl_board_init() Pete, I set my AM18xx EVM back up and confirmed things work there but I'd still appreciate additional testing. Thanks! --- arch/arm/cpu/arm926ejs/davinci/spl.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c index 59b304e..49349da 100644 --- a/arch/arm/cpu/arm926ejs/davinci/spl.c +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c @@ -34,29 +34,14 @@ void putc(char c) } #endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */ -void board_init_f(ulong dummy) +void spl_board_init(void) { - /* First, setup our stack pointer. */ - asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK)); - - /* Second, perform our low-level init. */ #ifdef CONFIG_SOC_DM365 dm36x_lowlevel_init(0); #endif #ifdef CONFIG_SOC_DA8XX arch_cpu_init(); #endif - - /* Third, we clear the BSS. */ - memset(__bss_start, 0, __bss_end - __bss_start); - - /* Finally, setup gd and move to the next step. */ - gd = &gdata; - board_init_r(NULL, 0); -} - -void spl_board_init(void) -{ preloader_console_init(); }