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

Data Structures

struct  tt_grendel_i3c_target_config
struct  tt_grendel_i3c_target_data

Macros

#define DT_DRV_COMPAT   tenstorrent_grendel_i3c_target
#define TT_GRENDEL_I3C_D2D_FW_ADDR   TT_D2D_OCCP_STAGE_ADDR
#define TT_GRENDEL_I3C_TARGET_GET(node_id, prop, idx)
#define TT_GRENDEL_I3C_TARGET_DEFINE(inst)

Functions

 LOG_MODULE_REGISTER (tt_grendel_i3c_target, CONFIG_TT_GRENDEL_I3C_TARGET_LOG_LEVEL)
 BUILD_ASSERT (CONFIG_TT_GRENDEL_I3C_TARGET_INIT_PRIO > CONFIG_TT_D2D_INIT_PRIO, "TT_GRENDEL_I3C_TARGET_INIT_PRIO must be higher than TT_D2D_INIT_PRIO")
static int tt_grendel_i3c_handle_d2d_init (const struct tt_grendel_i3c_target_config *cfg, const struct tt_grendel_i3c_d2d_req *req)
static int tt_grendel_i3c_handle_d2d_start (const struct tt_grendel_i3c_target_config *cfg, const struct tt_grendel_i3c_d2d_req *req)
static int tt_grendel_i3c_dispatch (const struct tt_grendel_i3c_target_config *cfg, uint8_t opcode, const uint8_t *payload)
static void tt_grendel_i3c_target_work (struct k_work *work)
static int tt_grendel_i3c_write_received (struct i3c_target_config *target_cfg, uint8_t val)
static int tt_grendel_i3c_stop (struct i3c_target_config *target_cfg)
static int tt_grendel_i3c_target_init (const struct device *dev)

Variables

static const struct i3c_target_callbacks tt_grendel_i3c_target_callbacks

Macro Definition Documentation

◆ DT_DRV_COMPAT

#define DT_DRV_COMPAT   tenstorrent_grendel_i3c_target

◆ TT_GRENDEL_I3C_D2D_FW_ADDR

#define TT_GRENDEL_I3C_D2D_FW_ADDR   TT_D2D_OCCP_STAGE_ADDR

◆ TT_GRENDEL_I3C_TARGET_DEFINE

#define TT_GRENDEL_I3C_TARGET_DEFINE ( inst)
Value:
static const struct device *const tt_grendel_i3c_target_d2ds_##inst[] = { \
DT_INST_FOREACH_PROP_ELEM(inst, d2d, TT_GRENDEL_I3C_TARGET_GET)}; \
static const struct tt_grendel_i3c_target_config tt_grendel_i3c_target_config_##inst = { \
.i3c = DEVICE_DT_GET(DT_INST_PHANDLE(inst, i3c)), \
.d2ds = tt_grendel_i3c_target_d2ds_##inst, \
.num_d2ds = ARRAY_SIZE(tt_grendel_i3c_target_d2ds_##inst), \
}; \
static struct tt_grendel_i3c_target_data tt_grendel_i3c_target_data_##inst; \
DEVICE_DT_INST_DEFINE(inst, tt_grendel_i3c_target_init, NULL, \
&tt_grendel_i3c_target_data_##inst, \
&tt_grendel_i3c_target_config_##inst, POST_KERNEL, \
CONFIG_TT_GRENDEL_I3C_TARGET_INIT_PRIO, NULL);
#define NULL
Definition avs.c:45
#define DEVICE_DT_GET(node_id)
#define DT_INST_PHANDLE(inst, prop)
#define ARRAY_SIZE(array)
Definition tt_grendel_i3c_target.c:35
size_t num_d2ds
Definition tt_grendel_i3c_target.c:38
static int tt_grendel_i3c_target_init(const struct device *dev)
Definition tt_grendel_i3c_target.c:187
#define TT_GRENDEL_I3C_TARGET_GET(node_id, prop, idx)
Definition tt_grendel_i3c_target.c:213

◆ TT_GRENDEL_I3C_TARGET_GET

#define TT_GRENDEL_I3C_TARGET_GET ( node_id,
prop,
idx )
Value:
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(node_id, prop, idx)),
#define DT_PHANDLE_BY_IDX(node_id, prop, idx)

Function Documentation

◆ BUILD_ASSERT()

BUILD_ASSERT ( CONFIG_TT_GRENDEL_I3C_TARGET_INIT_PRIO ,
CONFIG_TT_D2D_INIT_PRIO ,
"TT_GRENDEL_I3C_TARGET_INIT_PRIO must be higher than TT_D2D_INIT_PRIO"  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( tt_grendel_i3c_target ,
CONFIG_TT_GRENDEL_I3C_TARGET_LOG_LEVEL  )

◆ tt_grendel_i3c_dispatch()

int tt_grendel_i3c_dispatch ( const struct tt_grendel_i3c_target_config * cfg,
uint8_t opcode,
const uint8_t * payload )
static

◆ tt_grendel_i3c_handle_d2d_init()

int tt_grendel_i3c_handle_d2d_init ( const struct tt_grendel_i3c_target_config * cfg,
const struct tt_grendel_i3c_d2d_req * req )
static

◆ tt_grendel_i3c_handle_d2d_start()

int tt_grendel_i3c_handle_d2d_start ( const struct tt_grendel_i3c_target_config * cfg,
const struct tt_grendel_i3c_d2d_req * req )
static

◆ tt_grendel_i3c_stop()

int tt_grendel_i3c_stop ( struct i3c_target_config * target_cfg)
static

◆ tt_grendel_i3c_target_init()

int tt_grendel_i3c_target_init ( const struct device * dev)
static

◆ tt_grendel_i3c_target_work()

void tt_grendel_i3c_target_work ( struct k_work * work)
static

◆ tt_grendel_i3c_write_received()

int tt_grendel_i3c_write_received ( struct i3c_target_config * target_cfg,
uint8_t val )
static

Variable Documentation

◆ tt_grendel_i3c_target_callbacks

const struct i3c_target_callbacks tt_grendel_i3c_target_callbacks
static
Initial value:
= {
.write_received_cb = tt_grendel_i3c_write_received,
.stop_cb = tt_grendel_i3c_stop,
}
static int tt_grendel_i3c_stop(struct i3c_target_config *target_cfg)
Definition tt_grendel_i3c_target.c:172
static int tt_grendel_i3c_write_received(struct i3c_target_config *target_cfg, uint8_t val)
Definition tt_grendel_i3c_target.c:149