Commit 4881e47ec19d3075d1f40143d91b6c4eedfeef3e
Committed by
Lokesh Vutla
1 parent
f43ba3da87
Exists in
v2017.01-smarct4x
and in
2 other branches
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>
Showing 1 changed file with 21 additions and 0 deletions Side-by-side Diff
board/ti/ks2_evm/board_k2g.c
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | #include <asm/arch/mmc_host_def.h> |
14 | 14 | #include <fdtdec.h> |
15 | 15 | #include <i2c.h> |
16 | +#include <remoteproc.h> | |
16 | 17 | #include "mux-k2g.h" |
17 | 18 | #include "../common/board_detect.h" |
18 | 19 | |
... | ... | @@ -370,5 +371,25 @@ |
370 | 371 | { |
371 | 372 | return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t); |
372 | 373 | } |
374 | +#endif | |
375 | + | |
376 | +#ifdef CONFIG_TI_SECURE_DEVICE | |
377 | +void board_pmmc_image_process(ulong pmmc_image, size_t pmmc_size) | |
378 | +{ | |
379 | + int id = getenv_ulong("dev_pmmc", 10, 0); | |
380 | + int ret; | |
381 | + | |
382 | + if (!rproc_is_initialized()) | |
383 | + rproc_init(); | |
384 | + | |
385 | + ret = rproc_load(id, pmmc_image, pmmc_size); | |
386 | + printf("Load Remote Processor %d with data@addr=0x%08lx %u bytes:%s\n", | |
387 | + id, pmmc_image, pmmc_size, ret ? " Failed!" : " Success!"); | |
388 | + | |
389 | + if (!ret) | |
390 | + rproc_start(id); | |
391 | +} | |
392 | + | |
393 | +U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_PMMC, board_pmmc_image_process); | |
373 | 394 | #endif |