All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aswath Govindraju <a-govindraju@ti.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	Praneeth Bajjuri <praneeth@ti.com>,
	Aswath Govindraju <a-govindraju@ti.com>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Dave Gerlach <d-gerlach@ti.com>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>, Suman Anna <s-anna@ti.com>,
	Keerthy <j-keerthy@ti.com>, <u-boot@lists.denx.de>
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	[thread overview]
Message-ID: <20210604163043.12811-2-a-govindraju@ti.com> (raw)
In-Reply-To: <20210604163043.12811-1-a-govindraju@ti.com>

Add support for providing ATF load address with a Kconfig symbol.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
---
 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 <dt_name> [<dt_name> [<dt_name] ...]
+# usage: $0 <atf_load_addr> <dt_name> [<dt_name> [<dt_name] ...]
 
 [ -z "$ATF" ] && ATF="bl31.bin"
 
@@ -40,8 +40,8 @@ cat << __HEADER_EOF
 			arch = "arm64";
 			compression = "none";
 			os = "arm-trusted-firmware";
-			load = <0x70000000>;
-			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


  reply	other threads:[~2021-06-04 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 16:30 [PATCH v3 00/10] AM642-EVM: Add USB support Aswath Govindraju
2021-06-04 16:30 ` Aswath Govindraju [this message]
2021-06-04 16:30 ` [PATCH v3 02/10] arm: mach-k3: am642_init: Add support for USB boot mode Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 03/10] arm: mach-k3: am642_init: Do USB fixups to facilitate host and device boot modes Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 04/10] board: ti: am64x: Set the core voltage of USB PHY to 0.85V Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 05/10] arm: dts: k3-am64-main: Add USB DT nodes Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 06/10] arm: dts: k3-am642-*-evm: Add USB support Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 07/10] arm: dts: k3-am642-evm-u-boot: Add U-Boot tags and fix the dr_mode to peripheral for USB subsystem Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 08/10] configs: am64x_evm_*_defconfig: Rearrange the components in SRAM to satisfy the limitations for USB DFU boot mode Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 09/10] arm: dts: k3-am64-main: Update the location of ATF in SRAM and increase its max size Aswath Govindraju
2021-06-04 16:30 ` [PATCH v3 10/10] configs: am64: Enable configs to support USB host and device modes Aswath Govindraju
2021-06-04 16:48 ` [PATCH v3 00/10] AM642-EVM: Add USB support Praneeth Bajjuri
2021-06-04 16:49   ` Aswath Govindraju
2021-06-04 16:53     ` Praneeth Bajjuri
2021-06-07  4:16       ` Praneeth Bajjuri
2021-06-09 12:30 ` Aswath Govindraju
2021-06-09 16:55 ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210604163043.12811-2-a-govindraju@ti.com \
    --to=a-govindraju@ti.com \
    --cc=d-gerlach@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=kishon@ti.com \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=s-anna@ti.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.