All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 17/26] env: ti: k3_rproc: Add common rproc environment variables
Date: Wed, 4 Sep 2019 16:01:42 +0530	[thread overview]
Message-ID: <20190904103151.20121-18-lokeshvutla@ti.com> (raw)
In-Reply-To: <20190904103151.20121-1-lokeshvutla@ti.com>

From: Suman Anna <s-anna@ti.com>

Add a new file include/environment/ti/k3_rproc.h that defines
common environment variables useful for booting various remote
processors from U-Boot. This file is expected to be included in
the board config files with the EXTRA_ENV_RPROC_SETTINGS added
to CONFIG_EXTRA_ENV_SETTINGS and DEFAULT_RPROCS macro overwritten
to include the actual list of processors to be booted.

The 'boot_rprocs' variable just needs to be added to the board's
bootcmd to automatically boot the processors, and runtime control
can be achieved through the 'dorprocboot' variable.

The variables are currently defined to use MMC as the boot media,
and can be expanded in the future to include other boot media.
The immediate usage is intended for K3 J721E SoCs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 include/environment/ti/k3_rproc.h | 52 +++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 include/environment/ti/k3_rproc.h

diff --git a/include/environment/ti/k3_rproc.h b/include/environment/ti/k3_rproc.h
new file mode 100644
index 0000000000..3418cb42be
--- /dev/null
+++ b/include/environment/ti/k3_rproc.h
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * rproc environment variable definitions for various TI K3 SoCs.
+ */
+
+#ifndef __TI_RPROC_H
+#define __TI_RPROC_H
+
+/*
+ * should contain a list of <rproc_id fw_name> tuplies,
+ * override in board config files with the actual list
+ */
+#define DEFAULT_RPROCS ""
+
+#ifdef CONFIG_CMD_REMOTEPROC
+#define EXTRA_ENV_RPROC_SETTINGS					\
+	"dorprocboot=0\0"						\
+	"boot_rprocs="							\
+		"if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\
+			"rproc init;"					\
+			"run boot_rprocs_mmc;"				\
+		"fi;\0"							\
+	"rproc_load_and_boot_one="					\
+		"if load mmc ${bootpart} $loadaddr ${rproc_fw}; then "	\
+			"if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\
+				"rproc start ${rproc_id};"		\
+			"fi;"						\
+		"fi\0"							\
+	"boot_rprocs_mmc="						\
+		"env set rproc_id;"					\
+		"env set rproc_fw;"					\
+		"for i in ${rproc_fw_binaries} ; do "			\
+			"if test -z \"${rproc_id}\" ; then "		\
+				"env set rproc_id $i;"			\
+			"else "						\
+				"env set rproc_fw $i;"			\
+				"run rproc_load_and_boot_one;"		\
+				"env set rproc_id;"			\
+				"env set rproc_fw;"			\
+			"fi;"						\
+		"done\0"						\
+	"rproc_fw_binaries="						\
+		DEFAULT_RPROCS						\
+		"\0"
+#else
+#define EXTRA_ENV_RPROC_SETTINGS					\
+	"boot_rprocs= \0"
+#endif /* CONFIG_CMD_REMOTEPROC */
+
+#endif /* __TI_RPROC_H */
-- 
2.22.0

  parent reply	other threads:[~2019-09-04 10:31 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 10:31 [U-Boot] [PATCH v2 00/26] remoteproc: Add support for R5F and DSP processors Lokesh Vutla
2019-09-04 10:31 ` [U-Boot] [PATCH v2 01/26] dm: core: Add a function to count the children of a device Lokesh Vutla
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 02/26] remoteproc: ops: Add elf section size as input parameter to device_to_virt api Lokesh Vutla
2019-09-04 15:04   ` Fabien DESSENNE
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 03/26] remoteproc: elf_loader: Always check the validity of the image before loading Lokesh Vutla
2019-09-04 15:05   ` Fabien DESSENNE
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 04/26] remoteproc: elf-loader: Add 64 bit elf loading support Lokesh Vutla
2019-09-04 15:06   ` Fabien DESSENNE
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 05/26] remoteproc: elf_loader: Introduce a common elf loader and checker functions Lokesh Vutla
2019-09-04 15:05   ` Fabien DESSENNE
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 06/26] remoteproc: elf_loader: Introduce rproc_elf_get_boot_addr() api Lokesh Vutla
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 07/26] remoteproc: tisci_proc: Add helper api for controlling core power domain Lokesh Vutla
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 08/26] dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs Lokesh Vutla
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 09/26] remoteproc: Introduce K3 remoteproc driver for R5F subsystem Lokesh Vutla
2019-10-12 20:24   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 10/26] dt-bindings: remoteproc: Add bindings for DSP C66x clusters on TI K3 SoCs Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 11/26] remoteproc: Introduce K3 C66 and C71 remoteproc driver Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 12/26] arm: dts: k3-j721e-mcu: Add MCU domain R5F cluster node Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 13/26] arm: dts: k3-j721e-main: Add MAIN domain R5F cluster nodes Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 14/26] arm: dts: k3-j721e-main: Add C66x DSP nodes Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 15/26] arm: dts: k3-j721e-main: Add C71x DSP node Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 16/26] arm: dts: k3-am65-mcu: Add MCU domain R5F DT nodes Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` Lokesh Vutla [this message]
2019-10-12 20:25   ` [U-Boot] [PATCH v2 17/26] env: ti: k3_rproc: Add common rproc environment variables Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 18/26] env: ti: j721e-evm: Add support to boot rprocs including R5Fs and DSPs Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 19/26] env: ti: am65x_evm: Add env support to boot the MCU R5F rprocs Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 20/26] configs: j721e_evm_a72: Enable R5F and DSP remoteproc driver Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 21/26] configs: j721e_evm_a72: Enhance bootcmd to start remoteprocs Lokesh Vutla
2019-10-12 20:25   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 22/26] configs: am65x_evm_a53: Enable R5F remoteproc driver Lokesh Vutla
2019-10-12 20:26   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 23/26] configs: am65x_evm_a53: Enhance bootcmd to start remoteprocs Lokesh Vutla
2019-10-12 20:26   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 24/26] armv8: K3: am65x: Update DDR address regions in MMU table Lokesh Vutla
2019-10-12 20:26   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 25/26] armv8: K3: j721e: Updated ddr " Lokesh Vutla
2019-10-12 20:26   ` Tom Rini
2019-09-04 10:31 ` [U-Boot] [PATCH v2 26/26] board: j721e: Add README Lokesh Vutla
2019-10-12 20:26   ` Tom Rini

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=20190904103151.20121-18-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /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.