TT-System-Firmware APIs 19.8.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
bh_power.c File Reference

Functions

 LOG_MODULE_REGISTER (power, CONFIG_TT_APP_LOG_LEVEL)
int32_t bh_set_l2cpu_enable (bool enable)
int bh_power_state_get (enum bh_power_domain domain, bool *state)
 Returns the power state of the specified domain.
static int32_t apply_power_settings (const struct power_setting_rqst *power_setting)
static uint8_t power_setting_msg_handler (const union request *request, struct response *response)
 Handles the request to set the power settings.
 REGISTER_MESSAGE (TT_SMC_MSG_POWER_SETTING, power_setting_msg_handler)

Variables

static const struct devicepll4 = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(pll4))
static bool power_state [BH_POWER_DOMAIN_COUNT]

Function Documentation

◆ apply_power_settings()

int32_t apply_power_settings ( const struct power_setting_rqst * power_setting)
static

◆ bh_power_state_get()

int bh_power_state_get ( enum bh_power_domain domain,
bool * state )

Returns the power state of the specified domain.

Parameters
[out]stateTrue if power state is high (busy for AICLK), false if power state is low (idle for AICLK)
Return values
0On success
-EINVALIf domain is invalid

◆ bh_set_l2cpu_enable()

int32_t bh_set_l2cpu_enable ( bool enable)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( power ,
CONFIG_TT_APP_LOG_LEVEL  )

◆ power_setting_msg_handler()

uint8_t power_setting_msg_handler ( const union request * request,
struct response * response )
static

Handles the request to set the power settings.

Parameters
[in]requestThe request, of type power_setting_rqst, with command code TT_SMC_MSG_POWER_SETTING
[out]responseThe response to the host
Returns
0 for success. 1 for Failure.

◆ REGISTER_MESSAGE()

Variable Documentation

◆ pll4

const struct device* pll4 = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(pll4))
static

◆ power_state

bool power_state[BH_POWER_DOMAIN_COUNT]
static
Initial value:
= {
}
@ BH_POWER_DOMAIN_MRISC
Definition bh_power.h:14
@ BH_POWER_DOMAIN_AICLK
Definition bh_power.h:13
@ BH_POWER_DOMAIN_TENSIX
Definition bh_power.h:15
@ BH_POWER_DOMAIN_L2CPU
Definition bh_power.h:16