From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08F05C4708F for ; Tue, 1 Jun 2021 15:14:22 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31A8661287 for ; Tue, 1 Jun 2021 15:14:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31A8661287 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E945982EBB; Tue, 1 Jun 2021 17:14:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="zH7kyP/I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 40F8482EBA; Tue, 1 Jun 2021 17:14:15 +0200 (CEST) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A2F9982EAC for ; Tue, 1 Jun 2021 17:14:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=a-govindraju@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 151FE8gD078288 for ; Tue, 1 Jun 2021 10:14:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1622560448; bh=KAdFFgVGm9iOLpwrs5zmXa9dwS4iqDBWJsXcbxREyX4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=zH7kyP/Ig8l1HmOYaph5nEoOl0MzToDDbXAdO6MhgnqLty6vrePiRX6vhEPaOKxUC d20Y+SlK8A9TF0Axd3n7GdsAu+R06D0CsM//SZnqO8bXOFbRAr948qjO8nb/dXNnfT uAuKVYrjUhDpHx7wnOGzFmneZst4g0seSm3KE/is= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 151FE8j0007958 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 1 Jun 2021 10:14:08 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 1 Jun 2021 10:14:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 1 Jun 2021 10:14:08 -0500 Received: from gsaswath-HP-ProBook-640-G5.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 151FDudL017619; Tue, 1 Jun 2021 10:14:04 -0500 From: Aswath Govindraju To: CC: Kishon Vijay Abraham I , Aswath Govindraju , Lokesh Vutla , Dave Gerlach , Nishanth Menon , Vignesh Raghavendra , Suman Anna , Keerthy , Subject: [PATCH 01/10] tools: k3_fit_atf: Add support for providing ATF load address using a Kconfig symbol Date: Tue, 1 Jun 2021 20:43:41 +0530 Message-ID: <20210601151353.5540-2-a-govindraju@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210601151353.5540-1-a-govindraju@ti.com> References: <20210601151353.5540-1-a-govindraju@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add support for providing ATF load address with a Kconfig symbol. Signed-off-by: Aswath Govindraju --- arch/arm/mach-k3/Kconfig | 7 +++++++ arch/arm/mach-k3/config.mk | 1 + tools/k3_fit_atf.sh | 9 ++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig index bfbce44bfa59..2c46d7a3a798 100644 --- a/arch/arm/mach-k3/Kconfig +++ b/arch/arm/mach-k3/Kconfig @@ -147,6 +147,13 @@ config SYS_K3_SPL_ATF Enabling this will try to start Cortex-A (typically with ATF) after SPL from R5. +config K3_ATF_LOAD_ADDR + hex "Load address of ATF image" + default 0x7000000 + help + The load address for the ATF image. This value defaults to 0x70000000 + if not provided in the board defconfig file. + source "board/ti/am65x/Kconfig" source "board/ti/am64x/Kconfig" source "board/ti/j721e/Kconfig" diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk index 41fee2b5a172..674489068204 100644 --- a/arch/arm/mach-k3/config.mk +++ b/arch/arm/mach-k3/config.mk @@ -67,6 +67,7 @@ endif quiet_cmd_k3_mkits = MKITS $@ cmd_k3_mkits = \ $(srctree)/tools/k3_fit_atf.sh \ + $(CONFIG_K3_ATF_LOAD_ADDR) \ $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(LIST_OF_DTB))) > $@ $(SPL_ITS): FORCE diff --git a/tools/k3_fit_atf.sh b/tools/k3_fit_atf.sh index 4e9f69c08789..2c0287a63394 100755 --- a/tools/k3_fit_atf.sh +++ b/tools/k3_fit_atf.sh @@ -5,7 +5,7 @@ # ATF, OPTEE, SPL and multiple device trees (given on the command line). # Inspired from board/sunxi/mksunxi_fit_atf.sh # -# usage: $0 [ [ [ [; - entry = <0x70000000>; + load = <$1>; + entry = <$1>; }; tee { description = "OPTEE"; @@ -65,6 +65,9 @@ cat << __HEADER_EOF }; __HEADER_EOF +# shift through ATF load address in the command line arguments +shift + for dtname in $* do cat << __FDT_IMAGE_EOF -- 2.17.1