![]() |
TT-System-Firmware APIs 19.15.99
Tenstorrent Firmware
|
#include <stdbool.h>#include <stdint.h>#include <zephyr/device.h>#include <zephyr/drivers/reset.h>#include <zephyr/drivers/reset/reset_tt_bh.h>#include <zephyr/kernel.h>#include <zephyr/sys/util.h>
Data Structures | |
| struct | tt_bh_reset_emul_config |
| struct | tt_bh_reset_emul_data |
Macros | |
| #define | DT_DRV_COMPAT tenstorrent_bh_reset_emul |
| #define | TT_BH_RESET_EMUL_MASK_FROM_NRESETS(_n) |
| #define | TT_BH_RESET_EMUL_MASK(_n) |
| #define | TT_BH_RESET_EMUL_NUM_SPECIFIERS(_n) |
| #define | TT_BH_RESET_EMUL_N_BANKS(_n) |
| #define | TT_BH_RESET_EMUL_MASK_DEFINE(_n) |
| #define | TT_BH_RESET_EMUL_DEFINE(_n) |
Functions | |
| static bool | tt_bh_reset_emul_is_valid_id (const struct device *dev, uint32_t id) |
| static bool | tt_bh_reset_emul_is_valid_offset (const struct device *dev, uint32_t offset) |
| static uint32_t * | tt_bh_reset_emul_bank (struct tt_bh_reset_emul_data *data, uint32_t offset) |
| static int | tt_bh_reset_emul_status (const struct device *dev, uint32_t id, uint8_t *status) |
| static int | tt_bh_reset_emul_line_assert (const struct device *dev, uint32_t id) |
| static int | tt_bh_reset_emul_line_deassert (const struct device *dev, uint32_t id) |
| static int | tt_bh_reset_emul_line_toggle (const struct device *dev, uint32_t id) |
| int | reset_tt_bh_write (const struct device *dev, uint32_t value) |
| Absolute write to a BH reset-unit bank register. | |
| int | reset_tt_bh_lines_assert (const struct device *dev, uint32_t offset, uint32_t mask) |
Assert lines in mask at offset with a single RMW. | |
| int | reset_tt_bh_lines_deassert (const struct device *dev, uint32_t offset, uint32_t mask) |
Deassert lines in mask at offset with a single RMW. | |
| static int | tt_bh_reset_emul_init (const struct device *dev) |
| static | DEVICE_API (reset, tt_bh_reset_emul_api) |
| DT_INST_FOREACH_STATUS_OKAY (TT_BH_RESET_EMUL_DEFINE) | |
| #define DT_DRV_COMPAT tenstorrent_bh_reset_emul |
| #define TT_BH_RESET_EMUL_DEFINE | ( | _n | ) |
| #define TT_BH_RESET_EMUL_MASK | ( | _n | ) |
| #define TT_BH_RESET_EMUL_MASK_DEFINE | ( | _n | ) |
| #define TT_BH_RESET_EMUL_MASK_FROM_NRESETS | ( | _n | ) |
| #define TT_BH_RESET_EMUL_N_BANKS | ( | _n | ) |
| #define TT_BH_RESET_EMUL_NUM_SPECIFIERS | ( | _n | ) |
|
static |
| DT_INST_FOREACH_STATUS_OKAY | ( | TT_BH_RESET_EMUL_DEFINE | ) |
Assert lines in mask at offset with a single RMW.
offset is a byte offset from the controller base (typically a multiple of TT_BH_RESET_BANK_STRIDE). Active-low: clears bits in mask. Invalid if offset is out of range or mask shares no bits with the controller's reset-mask.
Deassert lines in mask at offset with a single RMW.
Active-low: sets bits in mask. Used for dual-field banks (eth/ddr) where tile and RISC halves share one MMIO word, multi-bank tensix regions, and full-bank releases.
Absolute write to a BH reset-unit bank register.
Sets the entire bank word at offset 0 (no read-modify-write). Use when init must force a known full-register state (e.g. dual-field tile half deasserted with RISC half still asserted). Prefer reset_tt_bh_lines_assert/deassert when only selected lines should change.
|
inlinestatic |
|
static |