public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot]  [PATCH 1/3] image: Add TI PMMC image type
@ 2017-07-31 15:58 Andrew F. Davis
  2017-07-31 15:58 ` [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware Andrew F. Davis
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew F. Davis @ 2017-07-31 15:58 UTC (permalink / raw)
  To: u-boot

Add a new image type representing TI Power Management
Micro-Controller (PMMC) Firmware image type.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 common/image.c  | 1 +
 include/image.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/common/image.c b/common/image.c
index 0f88984f2d..1f6885cb85 100644
--- a/common/image.c
+++ b/common/image.c
@@ -167,6 +167,7 @@ static const table_entry_t uimage_type[] = {
 	{	IH_TYPE_FPGA,       "fpga",       "FPGA Image" },
 	{       IH_TYPE_TEE,        "tee",        "Trusted Execution Environment Image",},
 	{	IH_TYPE_FIRMWARE_IVT, "firmware_ivt", "Firmware with HABv4 IVT" },
+	{       IH_TYPE_PMMC,        "pmmc",        "TI Power Management Micro-Controller Firmware",},
 	{	-1,		    "",		  "",			},
 };
 
diff --git a/include/image.h b/include/image.h
index c6f1513220..a251faf8e3 100644
--- a/include/image.h
+++ b/include/image.h
@@ -269,6 +269,7 @@ enum {
 	IH_TYPE_VYBRIDIMAGE,	/* VYBRID .vyb Image */
 	IH_TYPE_TEE,            /* Trusted Execution Environment OS Image */
 	IH_TYPE_FIRMWARE_IVT,		/* Firmware Image with HABv4 IVT */
+	IH_TYPE_PMMC,            /* TI Power Management Micro-Controller Firmware */
 
 	IH_TYPE_COUNT,			/* Number of image types */
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware
  2017-07-31 15:58 [U-Boot] [PATCH 1/3] image: Add TI PMMC image type Andrew F. Davis
@ 2017-07-31 15:58 ` Andrew F. Davis
  2017-09-13  2:28   ` [U-Boot] [U-Boot, " Tom Rini
  2017-07-31 15:58 ` [U-Boot] [PATCH 3/3] configs: k2g_evm: Remove PMMC loading environment commands Andrew F. Davis
  2017-09-13  2:28 ` [U-Boot] [U-Boot,1/3] image: Add TI PMMC image type Tom Rini
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew F. Davis @ 2017-07-31 15:58 UTC (permalink / raw)
  To: u-boot

The PMMC firmware should be bundled into a FIT image on HS
devices to allow authentication/decryption, add a handler to
process this PMMC firmware.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 board/ti/ks2_evm/board_k2g.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 21605762ef..d4d582cb85 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -13,6 +13,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <remoteproc.h>
 #include "mux-k2g.h"
 #include "../common/board_detect.h"
 
@@ -353,3 +354,23 @@ int get_num_eth_ports(void)
 	return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
 }
 #endif
+
+#ifdef CONFIG_TI_SECURE_DEVICE
+void board_pmmc_image_process(ulong pmmc_image, size_t pmmc_size)
+{
+	int id = getenv_ulong("dev_pmmc", 10, 0);
+	int ret;
+
+	if (!rproc_is_initialized())
+		rproc_init();
+
+	ret = rproc_load(id, pmmc_image, pmmc_size);
+	printf("Load Remote Processor %d with data at addr=0x%08lx %u bytes:%s\n",
+	       id, pmmc_image, pmmc_size, ret ? " Failed!" : " Success!");
+
+	if (!ret)
+		rproc_start(id);
+}
+
+U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_PMMC, board_pmmc_image_process);
+#endif
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] configs: k2g_evm: Remove PMMC loading environment commands
  2017-07-31 15:58 [U-Boot] [PATCH 1/3] image: Add TI PMMC image type Andrew F. Davis
  2017-07-31 15:58 ` [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware Andrew F. Davis
@ 2017-07-31 15:58 ` Andrew F. Davis
  2017-09-13  2:28   ` [U-Boot] [U-Boot, " Tom Rini
  2017-09-13  2:28 ` [U-Boot] [U-Boot,1/3] image: Add TI PMMC image type Tom Rini
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew F. Davis @ 2017-07-31 15:58 UTC (permalink / raw)
  To: u-boot

The PMMC firmware should be bundled with the FIT image for HS devices,
remove the steps that load and install this firmware outside of FIT.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 include/configs/k2g_evm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index 1117e5e5dd..9117cda24c 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -69,7 +69,6 @@
 	"run envboot; "							\
 	"run run_mon_hs; "						\
 	"run init_${boot}; "						\
-	"run set_name_pmmc get_pmmc_${boot} run_pmmc; "			\
 	"run get_fit_${boot}; "						\
 	"bootm ${fit_loadaddr}#${name_fdt}"
 #endif
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [U-Boot,1/3] image: Add TI PMMC image type
  2017-07-31 15:58 [U-Boot] [PATCH 1/3] image: Add TI PMMC image type Andrew F. Davis
  2017-07-31 15:58 ` [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware Andrew F. Davis
  2017-07-31 15:58 ` [U-Boot] [PATCH 3/3] configs: k2g_evm: Remove PMMC loading environment commands Andrew F. Davis
@ 2017-09-13  2:28 ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-09-13  2:28 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 31, 2017 at 10:58:20AM -0500, Andrew F. Davis wrote:

> Add a new image type representing TI Power Management
> Micro-Controller (PMMC) Firmware image type.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170912/921c691e/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [U-Boot, 2/3] ARM: k2g: Add FIT image handler for PMMC firmware
  2017-07-31 15:58 ` [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware Andrew F. Davis
@ 2017-09-13  2:28   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-09-13  2:28 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 31, 2017 at 10:58:21AM -0500, Andrew F. Davis wrote:

> The PMMC firmware should be bundled into a FIT image on HS
> devices to allow authentication/decryption, add a handler to
> process this PMMC firmware.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170912/9dc63943/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [U-Boot, 3/3] configs: k2g_evm: Remove PMMC loading environment commands
  2017-07-31 15:58 ` [U-Boot] [PATCH 3/3] configs: k2g_evm: Remove PMMC loading environment commands Andrew F. Davis
@ 2017-09-13  2:28   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-09-13  2:28 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 31, 2017 at 10:58:22AM -0500, Andrew F. Davis wrote:

> The PMMC firmware should be bundled with the FIT image for HS devices,
> remove the steps that load and install this firmware outside of FIT.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170912/b74b2e42/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-13  2:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-31 15:58 [U-Boot] [PATCH 1/3] image: Add TI PMMC image type Andrew F. Davis
2017-07-31 15:58 ` [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware Andrew F. Davis
2017-09-13  2:28   ` [U-Boot] [U-Boot, " Tom Rini
2017-07-31 15:58 ` [U-Boot] [PATCH 3/3] configs: k2g_evm: Remove PMMC loading environment commands Andrew F. Davis
2017-09-13  2:28   ` [U-Boot] [U-Boot, " Tom Rini
2017-09-13  2:28 ` [U-Boot] [U-Boot,1/3] image: Add TI PMMC image type Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox