From patchwork Mon Oct 19 12:49:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 532291 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 565F01401AF for ; Mon, 19 Oct 2015 23:50:44 +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=e+7KrLnJ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C3614B839; Mon, 19 Oct 2015 14:50:33 +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 wzS3eNAbqSfI; Mon, 19 Oct 2015 14:50:33 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A18E4B841; Mon, 19 Oct 2015 14:50:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7EEFE4B7DA for ; Mon, 19 Oct 2015 14:50:13 +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 BAOcdD7A9vp1 for ; Mon, 19 Oct 2015 14:50:13 +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-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id 29B624B7DD for ; Mon, 19 Oct 2015 14:50:11 +0200 (CEST) Received: by igbdj2 with SMTP id dj2so55874999igb.1 for ; Mon, 19 Oct 2015 05:50:10 -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=ph4s//sIEkBgnXUZ9W6v27rL14l0x5NeXgzFIqwyICQ=; b=e+7KrLnJBbxemCNgrdfVsANmyv8R3BXZghNNhHR5Y08UW893GNo7TzSQOpw0yYd4Wv kZGp2rvX2qcIwpf2x0x+0ke3w4A7gjoVOUD4hMIfHUhBJReYV3DFO4IekHi31LXa4CeX ElFsrpR9fIpHAIJdz75w6f1PjWqiZQ1rrlTgyMCLezWHFc8jptckDwzsEiDM/EqTAtG6 O4r5/2IGM2ImNXjgkPodUkO3jwa47qaXg2eWaPS3OL4qIFn6H3qnS5H7CzYbM9kz7KxE 90FyqR5HB1xZJirStFaHaeMwcW0YnvakkVFq+WPkqhWXz1w1nuq97WnPY8OIBtSTQrXG ORRA== 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=ph4s//sIEkBgnXUZ9W6v27rL14l0x5NeXgzFIqwyICQ=; b=lsR23LTRxTnfoyjg/mJVmIdyaq54Dv1+E36B0mV/dtu8XGGErzgG8gPD7vfE1rZ6M5 xoDRr7DnZP3Q4cLY2upQZSUsov4831ntCDq7m/xp1FNga426Qe+3XBjVYJpxWrEtTnRx NDXrSrGqYMEzQw7YCR0ML7F3n4SnOLs27hJeNL+N9hDBttCPPDkiEhy3Ct+K8wmI+NG9 ApLslZmrtmg75ASTnqh34jYtos0ktpngQhOwa42IxcbR4IfmE0rP/GyOM/baWhXhF9gk bNS9V4SadqI9qt5Wqvbs7UNpt//TJsha0suW8Nzc/QVl/ZTFWYlL/m85yccIKNl+sSpa M5cg== X-Gm-Message-State: ALoCoQmOFcvKt8dP/RDWjw89h4AGqm+RVGzwIP23Z4GNKezGA+sy0R1i5Uttx/xfqjt7s/N6eTn6 X-Received: by 10.50.62.14 with SMTP id u14mr3713335igr.75.1445259010207; Mon, 19 Oct 2015 05:50:10 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id y15sm5257742ioi.44.2015.10.19.05.50.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 05:50:08 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 2C43222184A; Mon, 19 Oct 2015 06:50:06 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 19 Oct 2015 06:49:59 -0600 Message-Id: <1445259003-15896-5-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1445259003-15896-1-git-send-email-sjg@chromium.org> References: <1445259003-15896-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH v4 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 v4: None 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