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, URIBL_BLOCKED,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 8C736C47424 for ; Fri, 4 Jun 2021 16:31:14 +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 16389613BF for ; Fri, 4 Jun 2021 16:31:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16389613BF 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 62A0E82EED; Fri, 4 Jun 2021 18:31:12 +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="XdJAxHsl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4018582EED; Fri, 4 Jun 2021 18:31:10 +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 E225082ECC for ; Fri, 4 Jun 2021 18:31:05 +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 fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 154GV4Z9089480 for ; Fri, 4 Jun 2021 11:31:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1622824264; bh=13/XieNUH7TAKi3CqpX61Yj6c5PX/svZybV4e5snUkE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XdJAxHsl8loxzNf4lSjmYdrqDxMt8hflm0S08fQfVzy55uaxSP8eFvsCU9yUTMH4w r+23Vy1rcSBMTAL+3V5F22pnyp4q1Eh3ExKQsvtPuKBjebgcElsboHHUN33O9Dq+PM HzF9xy1pg/0tmOchqQPUT9sXZNPkh5LeItzR98kU= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 154GV4gX033232 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 4 Jun 2021 11:31:04 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 4 Jun 2021 11:31:04 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Fri, 4 Jun 2021 11:31:04 -0500 Received: from gsaswath-HP-ProBook-640-G5.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 154GUjAI106257; Fri, 4 Jun 2021 11:30:58 -0500 From: Aswath Govindraju To: CC: Kishon Vijay Abraham I , Praneeth Bajjuri , Aswath Govindraju , Lokesh Vutla , Dave Gerlach , Nishanth Menon , Vignesh Raghavendra , Suman Anna , Keerthy , Subject: [PATCH v3 01/10] tools: k3_fit_atf: Add support for providing ATF load address using a Kconfig symbol Date: Fri, 4 Jun 2021 22:00:31 +0530 Message-ID: <20210604163043.12811-2-a-govindraju@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210604163043.12811-1-a-govindraju@ti.com> References: <20210604163043.12811-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 Reviewed-by: Suman Anna --- 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..21b2fc2230d4 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 0x70000000 + 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