From patchwork Thu Apr 4 11:59:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1077211 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WwmQCSjl"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44ZhcR1sbyz9sRt for ; Thu, 4 Apr 2019 23:11:03 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D0E4BC21DED; Thu, 4 Apr 2019 12:05:59 +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=FREEMAIL_FROM, T_DKIM_INVALID 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 8DE51C21DB3; Thu, 4 Apr 2019 12:00:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0910AC21E60; Thu, 4 Apr 2019 12:00:20 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by lists.denx.de (Postfix) with ESMTPS id DEF05C21E6A for ; Thu, 4 Apr 2019 12:00:05 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id y13so3457799wrd.3 for ; Thu, 04 Apr 2019 05:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fa5q6Zf6GT2vfDGJpcDbqXOb0thWzZgcsDpiZOmc3D0=; b=WwmQCSjl344VaAH3vXhCrcc+jQAFCHBZksuOKhlPjLc1hk0bOUnaEqdAY4X6pKphxn RoThhyJdBCNiTJSAyH7xj2clbC/7qqw5Hccfxd3ARMusrPCxSQmRRJSW0c6IanGHyK04 Cbzf4ZV08t769Qw0vHqSV79pBQSbj/qoNUXhpnHSCy57rrlQQAOcmfcpVzhIKfQRRAAE H7gxEoaZH/uDBbKpgDUIig3RsjwHvLKnIV/RgJKpP6OchteMMRyJE0OqoTrFeNGra85O lP1DxUmKqNeT7kw8SnxyVOid/WbRLB57aN1oGRtAy8PgulXOo4V/NdHbpo6OgCoAQ6Ff UNlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fa5q6Zf6GT2vfDGJpcDbqXOb0thWzZgcsDpiZOmc3D0=; b=l72jU0uaflSRzGPtnZ4tLBt3xDD3TiM0nresP2wNXQpDBoCmbr7K3cuAd8sTG96OXD XUS2upj8N8eTnOs3JZrp815YDm+KplxJahZx+uh+kPY3MFtoTH5HGC9inZ/Dl/y5oMp8 ImOhEpn0VXhbZkq3dCg+Ydoxybt3XscqSsJTHevKYj6aAEW31X9WJ1Zsn0VcCIElngwY 4BZs/zeXQ/1ORnBBzUnSSgpQ495VEzfxnS7X6OIU1462fF6BQzHanm6KuieVdvNPT/Gq ygSmN+noVCuhUd4cs4mefcoYl8g81Pg0iH0N0b2dC98uG5l0WuoxYEBk25i2XNU1Mig2 l74A== X-Gm-Message-State: APjAAAWVhTW8X1LcS9kEIpdj0C2Z8jS7rvaKXMzKG4oO6GPVwWyxvwo7 jh0Ydb/UY8yEnvXnrmmsNXg= X-Google-Smtp-Source: APXvYqwR6u/5ESCunWtm40xq25L8MEVIrxHgedHina6d/zDG9KnDhX7aS/v+xB8mKqbdKEj4IxhztA== X-Received: by 2002:adf:f7cc:: with SMTP id a12mr3860119wrq.87.1554379205454; Thu, 04 Apr 2019 05:00:05 -0700 (PDT) Received: from localhost (pD9E51B25.dip0.t-ipconnect.de. [217.229.27.37]) by smtp.gmail.com with ESMTPSA id a9sm14672598wrt.29.2019.04.04.05.00.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 05:00:04 -0700 (PDT) From: Thierry Reding To: Tom Warren Date: Thu, 4 Apr 2019 13:59:36 +0200 Message-Id: <20190404115942.17947-14-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404115942.17947-1-thierry.reding@gmail.com> References: <20190404115942.17947-1-thierry.reding@gmail.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de, Stephen Warren , Jonathan Hunter Subject: [U-Boot] [PATCH v4 13/19] ARM: tegra: Implement cboot_save_boot_params() in C 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Thierry Reding This is easier to deal with and works just as well for this simple function. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/cboot.c | 12 ++++++++++++ arch/arm/mach-tegra/cboot_ll.S | 20 -------------------- 3 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/mach-tegra/cboot_ll.S diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 41ba674edff4..7165d70a60da 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile @@ -20,7 +20,7 @@ obj-$(CONFIG_TEGRA_PINCTRL) += pinmux-common.o obj-$(CONFIG_TEGRA_PMC) += powergate.o obj-y += xusb-padctl-dummy.o -obj-$(CONFIG_ARM64) += arm64-mmu.o cboot_ll.o cboot.o +obj-$(CONFIG_ARM64) += arm64-mmu.o cboot.o obj-y += dt-setup.o obj-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o obj-$(CONFIG_TEGRA_GPU) += gpu.o diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index 3ebf7b055553..a302ca45f39b 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -52,6 +52,18 @@ static u64 ram_top __attribute__((section(".data"))); /* The base address of the region of RAM that ends at ram_top */ static u64 region_base __attribute__((section(".data"))); +/* + * Explicitly put this in the .data section because it is written before the + * .bss section is zeroed out but it needs to persist. + */ +unsigned long cboot_boot_x0 __attribute__((section(".data"))); + +void cboot_save_boot_params(unsigned long x0, unsigned long x1, + unsigned long x2, unsigned long x3) +{ + cboot_boot_x0 = x0; +} + int cboot_dram_init(void) { unsigned int na, ns; diff --git a/arch/arm/mach-tegra/cboot_ll.S b/arch/arm/mach-tegra/cboot_ll.S deleted file mode 100644 index 4c9ddacc2b39..000000000000 --- a/arch/arm/mach-tegra/cboot_ll.S +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Save cboot-related boot-time CPU state - * - * (C) Copyright 2015-2016 NVIDIA Corporation - */ - -#include -#include - -.align 8 -.globl cboot_boot_x0 -cboot_boot_x0: - .dword 0 - -ENTRY(cboot_save_boot_params) - adr x8, cboot_boot_x0 - str x0, [x8] - b save_boot_params_ret -ENDPROC(cboot_save_boot_params)