diff options
author | Andrew F. Davis <afd@ti.com> | 2017-07-31 10:58:21 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-12 17:58:02 -0400 |
commit | 58fac52d2ffbac22dedcde5baa915d2c764a56d1 (patch) | |
tree | 24671b6f71cbab8b007efef278e986ddd0c2785a /board/ti/ks2_evm/board_k2g.c | |
parent | 6442c9643e82966ae8fff391bab3fcc763662564 (diff) |
ARM: k2g: Add FIT image handler for PMMC firmware
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>
Diffstat (limited to 'board/ti/ks2_evm/board_k2g.c')
-rw-r--r-- | board/ti/ks2_evm/board_k2g.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 15f0f54af6..f1c4ddcd30 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@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 |