From patchwork Sat Oct 17 21:06:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 531877 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 ABA34140DA8 for ; Sun, 18 Oct 2015 08:07:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=dEUBL/7X; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B83D04B6BA; Sat, 17 Oct 2015 23:07:48 +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 Hx76d4KbUAP6; Sat, 17 Oct 2015 23:07:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A41D4B6C3; Sat, 17 Oct 2015 23:07:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F2EF4B676 for ; Sat, 17 Oct 2015 23:07:22 +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 dDhva0dVKK3C for ; Sat, 17 Oct 2015 23:07:22 +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 mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by theia.denx.de (Postfix) with ESMTPS id 1FE644B67F for ; Sat, 17 Oct 2015 23:07:14 +0200 (CEST) Received: by ioii196 with SMTP id i196so154819517ioi.3 for ; Sat, 17 Oct 2015 14:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ezxMkJqMFT4/NfCPHdriJG+Bb0ajxf+9Z71fRBmoErA=; b=dEUBL/7XqxkUYIWJJuePdEE+3AAWH7toDvJd6JgmoCK7GvNO86FF+519BKfnu5zR4s ctMmTxm0VuIq7DtbDnlI4nW418UPoc0R1uMd+FbkUWsEC0OZTUhmaw/SO1TSOcwVSHXK 71JSGuCHqidbtArhvszmmCJliSre2IgRtmdH7CQ49t5p0h0yqBXPqZFxsJiMgO5CaYJq yi4p+p7JaRYE1+DY3+HX2iWxwY2KgRnz8Zd+z7WOxyC08F3dTNeXZVmIN4lxvg0jZG/k zy+rtn00G/A810YleTetFJShsJvNeFU6OfIaBB1C8x33s0gOIbZC6XF1LjPbCNQcuv2A gHuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ezxMkJqMFT4/NfCPHdriJG+Bb0ajxf+9Z71fRBmoErA=; b=RlOEmmmziGMT9mAlPeZ2j8gXtR6BlaBPNwTtcKABBr2Z2cPCQK3tSrjzqtHDE9NbEi 51SRqSVZazkQjRHloqSy0I8RokAHoj5UlvIE6lYxzBwf7/4mSBtCwcQfhObtuQxBGBQ+ bD8Htlghe2WG8JCW8NYmiNwgio7QeVR5Gsd/PUsGKIdpl2Kw1vEV2ZVzRz2qlHZet+2P 7IHaY+00qoIB7iYieW5bFP3GVk/w+YpBC7FRdFxmm3y4qxoUAOXXf4/yV761CbwKxI4v m24rd06ii9Tj5BISsjMopFTuHkiOWVm/VHbBV9N31CnwQu8cwFUPauQzK/OoUCJmNyRI lEyA== X-Gm-Message-State: ALoCoQlzwzEQDaZEjCwXwczfcO7mes6FwGEpSy7YYclTtkD/7ieUCj0EP/tha0p66oyLFPXAa6UL X-Received: by 10.107.154.213 with SMTP id c204mr24323810ioe.80.1445116032916; Sat, 17 Oct 2015 14:07:12 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id l2sm4881028igv.11.2015.10.17.14.07.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 14:07:11 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 9D4342216EF; Sat, 17 Oct 2015 15:07:10 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 17 Oct 2015 15:06:57 -0600 Message-Id: <1445116021-27296-5-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1445116021-27296-1-git-send-email-sjg@chromium.org> References: <1445116021-27296-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH v3 4/8] arm: Switch aarch64 to using generic global_data setup 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" There is quite a bit of assembler code that can be removed if we use the generic global_data setup. Less arch-specific code makes it easier to add new features and maintain the start-up code. Drop the unneeded code and adjust the hooks in board_f.c to cope. Tested on LS2085ARDB and LS2085AQDS (armv8 SoC). Tested-by: York Sun Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/lib/crt0_64.S | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 8b34e04..cef1c71 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -74,19 +74,10 @@ ENTRY(_main) #else ldr x0, =(CONFIG_SYS_INIT_SP_ADDR) #endif - sub x18, x0, #GD_SIZE /* allocate one GD above SP */ - bic x18, x18, #0x7 /* 8-byte alignment for GD */ -zero_gd: - sub x0, x0, #0x8 - str xzr, [x0] - cmp x0, x18 - b.gt zero_gd -#if defined(CONFIG_SYS_MALLOC_F_LEN) - ldr x0, =CONFIG_SYS_MALLOC_F_LEN - sub x0, x18, x0 - str x0, [x18, #GD_MALLOC_BASE] -#endif bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */ + bl board_init_f_mem + mov sp, x0 + mov x0, #0 bl board_init_f