From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew F. Davis Date: Mon, 31 Jul 2017 10:58:21 -0500 Subject: [U-Boot] [PATCH 2/3] ARM: k2g: Add FIT image handler for PMMC firmware In-Reply-To: <20170731155822.6794-1-afd@ti.com> References: <20170731155822.6794-1-afd@ti.com> Message-ID: <20170731155822.6794-2-afd@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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 #include #include +#include #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