blob: 3418cb42be58e40cedab81bc4dd12630308c6751 [file] [log] [blame]
Suman Annabb17aaf2019-09-04 16:01:42 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
4 *
5 * rproc environment variable definitions for various TI K3 SoCs.
6 */
7
8#ifndef __TI_RPROC_H
9#define __TI_RPROC_H
10
11/*
12 * should contain a list of <rproc_id fw_name> tuplies,
13 * override in board config files with the actual list
14 */
15#define DEFAULT_RPROCS ""
16
17#ifdef CONFIG_CMD_REMOTEPROC
18#define EXTRA_ENV_RPROC_SETTINGS \
19 "dorprocboot=0\0" \
20 "boot_rprocs=" \
21 "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\
22 "rproc init;" \
23 "run boot_rprocs_mmc;" \
24 "fi;\0" \
25 "rproc_load_and_boot_one=" \
26 "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \
27 "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\
28 "rproc start ${rproc_id};" \
29 "fi;" \
30 "fi\0" \
31 "boot_rprocs_mmc=" \
32 "env set rproc_id;" \
33 "env set rproc_fw;" \
34 "for i in ${rproc_fw_binaries} ; do " \
35 "if test -z \"${rproc_id}\" ; then " \
36 "env set rproc_id $i;" \
37 "else " \
38 "env set rproc_fw $i;" \
39 "run rproc_load_and_boot_one;" \
40 "env set rproc_id;" \
41 "env set rproc_fw;" \
42 "fi;" \
43 "done\0" \
44 "rproc_fw_binaries=" \
45 DEFAULT_RPROCS \
46 "\0"
47#else
48#define EXTRA_ENV_RPROC_SETTINGS \
49 "boot_rprocs= \0"
50#endif /* CONFIG_CMD_REMOTEPROC */
51
52#endif /* __TI_RPROC_H */