From patchwork Wed Dec 20 01:30:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 851158 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z1chG5C1Zz9sBW for ; Wed, 20 Dec 2017 12:32:14 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 4E862C22083; Wed, 20 Dec 2017 01:31:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 48AFFC21F35; Wed, 20 Dec 2017 01:30:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 017A7C21DDE; Wed, 20 Dec 2017 01:30:54 +0000 (UTC) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [104.237.132.123]) by lists.denx.de (Postfix) with ESMTPS id 32DF3C21DDB for ; Wed, 20 Dec 2017 01:30:54 +0000 (UTC) Received: from swarren-lx1.nvidia.com (thunderhill.nvidia.com [216.228.112.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPSA id 3E4531C0801; Tue, 19 Dec 2017 18:30:51 -0700 (MST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at avon.wwwdotorg.org From: Stephen Warren To: twarren@nvidia.com Date: Tue, 19 Dec 2017 18:30:37 -0700 Message-Id: <20171220013037.24485-4-swarren@wwwdotorg.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220013037.24485-1-swarren@wwwdotorg.org> References: <20171220013037.24485-1-swarren@wwwdotorg.org> X-NVConfidentiality: public Cc: Tom Rini , Stephen Warren , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/4] ARM: tegra: use CONFIG_SYS_INIT_SP_BSS_OFFSET X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Stephen Warren Enable CONFIG_SYS_INIT_SP_BSS_OFFSET for all 64-bit Tegra boards. Place the stack/... 512KiB from the end of the U-Boot binary. This should be plenty to accommodate the current DTBs (max 64 KiB), early malloc region (6KiB), stack usage, and plenty of slack, while still not placing it too far away from the U-Boot binary. Signed-off-by: Stephen Warren Reviewed-by: Simon Glass --- arch/arm/mach-tegra/tegra186/Kconfig | 3 +++ arch/arm/mach-tegra/tegra210/Kconfig | 3 +++ include/configs/tegra-common.h | 2 ++ include/configs/tegra186-common.h | 5 ----- include/configs/tegra210-common.h | 5 ----- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-tegra/tegra186/Kconfig b/arch/arm/mach-tegra/tegra186/Kconfig index b2e53b58caf8..479c0955eec6 100644 --- a/arch/arm/mach-tegra/tegra186/Kconfig +++ b/arch/arm/mach-tegra/tegra186/Kconfig @@ -21,6 +21,9 @@ endchoice config SYS_SOC default "tegra186" +config SYS_INIT_SP_BSS_OFFSET + default 524288 + source "board/nvidia/p2771-0000/Kconfig" endif diff --git a/arch/arm/mach-tegra/tegra210/Kconfig b/arch/arm/mach-tegra/tegra210/Kconfig index 3637473051b8..250738aed312 100644 --- a/arch/arm/mach-tegra/tegra210/Kconfig +++ b/arch/arm/mach-tegra/tegra210/Kconfig @@ -40,6 +40,9 @@ endchoice config SYS_SOC default "tegra210" +config SYS_INIT_SP_BSS_OFFSET + default 524288 + source "board/nvidia/e2220-1170/Kconfig" source "board/nvidia/p2371-0000/Kconfig" source "board/nvidia/p2371-2180/Kconfig" diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 75e36c0b759d..2d98a6fa64a7 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -78,11 +78,13 @@ #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */ +#ifndef CONFIG_ARM64 #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_STACKBASE #define CONFIG_SYS_INIT_RAM_SIZE CONFIG_SYS_MALLOC_LEN #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) +#endif #ifndef CONFIG_ARM64 /* Defines for SPL */ diff --git a/include/configs/tegra186-common.h b/include/configs/tegra186-common.h index 495d18555f3f..1c8772a117e4 100644 --- a/include/configs/tegra186-common.h +++ b/include/configs/tegra186-common.h @@ -14,11 +14,6 @@ */ #define V_NS16550_CLK 408000000 /* 408MHz (pllp_out0) */ -/* - * Miscellaneous configurable options - */ -#define CONFIG_STACKBASE 0x82800000 /* 40MB */ - /*----------------------------------------------------------------------- * Physical Memory Map */ diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index 93c9455e8ff3..35735f3b78e4 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -15,11 +15,6 @@ */ #define V_NS16550_CLK 408000000 /* 408MHz (pllp_out0) */ -/* - * Miscellaneous configurable options - */ -#define CONFIG_STACKBASE 0x82800000 /* 40MB */ - /*----------------------------------------------------------------------- * Physical Memory Map */