TT-System-Firmware APIs 19.10.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
tt_smc_remoteproc.c File Reference
Include dependency graph for tt_smc_remoteproc.c:

Data Structures

struct  tt_smc_remoteproc_config
struct  tt_smc_remoteproc_data

Macros

#define SMC_BOOT_TIMEOUT_MS   1000
#define DT_DRV_COMPAT   tenstorrent_smc_remoteproc
#define TT_SMC_REMOTEPROC_DEFINE(inst)

Functions

 LOG_MODULE_REGISTER (tt_smc_remoteproc, CONFIG_KERNEL_LOG_LEVEL)
 BUILD_ASSERT (CONFIG_TT_SMC_REMOTEPROC_INIT_PRIO > CONFIG_I3C_CONTROLLER_INIT_PRIORITY, "TT_SMC_REMOTEPROC_INIT_PRIO must be higher than I3C_CONTROLLER_INIT_PRIORITY")
int tt_smc_remoteproc_boot (const struct device *dev, uint64_t addr, uint8_t *img_data, size_t img_size)
 Boot SMC remote processor.
int tt_smc_remoteproc_init (const struct device *dev)

Macro Definition Documentation

◆ DT_DRV_COMPAT

#define DT_DRV_COMPAT   tenstorrent_smc_remoteproc

◆ SMC_BOOT_TIMEOUT_MS

#define SMC_BOOT_TIMEOUT_MS   1000

◆ TT_SMC_REMOTEPROC_DEFINE

#define TT_SMC_REMOTEPROC_DEFINE ( inst)
Value:
const struct tt_smc_remoteproc_config tt_smc_remoteproc_config_##inst = { \
.boot_gpio = GPIO_DT_SPEC_INST_GET(inst, boot_gpios), \
}; \
\
struct i3c_device_desc tt_smc_remoteproc_i3c_dev_##inst[] = { \
I3C_DEVICE_DESC_DT_INST(inst)}; \
\
struct tt_smc_remoteproc_data tt_smc_remoteproc_data_##inst = { \
.i3c_dev = tt_smc_remoteproc_i3c_dev_##inst, \
}; \
\
DEVICE_DT_INST_DEFINE(inst, tt_smc_remoteproc_init, NULL, &tt_smc_remoteproc_data_##inst, \
&tt_smc_remoteproc_config_##inst, POST_KERNEL, \
CONFIG_TT_SMC_REMOTEPROC_INIT_PRIO, NULL);
#define NULL
Definition avs.c:45
#define GPIO_DT_SPEC_INST_GET(inst, prop)
Definition tt_smc_remoteproc.c:23
int tt_smc_remoteproc_init(const struct device *dev)
Definition tt_smc_remoteproc.c:55

Function Documentation

◆ BUILD_ASSERT()

BUILD_ASSERT ( CONFIG_TT_SMC_REMOTEPROC_INIT_PRIO ,
CONFIG_I3C_CONTROLLER_INIT_PRIORITY ,
"TT_SMC_REMOTEPROC_INIT_PRIO must be higher than I3C_CONTROLLER_INIT_PRIORITY"  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( tt_smc_remoteproc ,
CONFIG_KERNEL_LOG_LEVEL  )

◆ tt_smc_remoteproc_boot()

int tt_smc_remoteproc_boot ( const struct device * dev,
uint64_t addr,
uint8_t * img_data,
size_t img_size )

Boot SMC remote processor.

Load an image to SMC remote processor SRAM, and boot it

Parameters
devPointer to the tt_smc_remoteproc device
addrAddress to load the image to
img_dataPointer to image data
img_sizeSize of image data

◆ tt_smc_remoteproc_init()

int tt_smc_remoteproc_init ( const struct device * dev)