TT-System-Firmware APIs 19.15.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
reset_tt_bh.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Tenstorrent AI ULC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_RESET_RESET_TT_BH_H_
8#define ZEPHYR_INCLUDE_DRIVERS_RESET_RESET_TT_BH_H_
9
10#include <stdint.h>
11
12#include <zephyr/device.h>
13#include <zephyr/devicetree.h>
14#include <zephyr/sys/util.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
21#define TT_BH_RESET_BANK_STRIDE 4U
22
29#define TT_BH_RESET_NUM_BANKS(node_id) \
30 COND_CODE_1(DT_NODE_HAS_PROP(node_id, n_banks), (DT_PROP(node_id, n_banks)), \
31 (DT_REG_SIZE(node_id) / TT_BH_RESET_BANK_STRIDE))
32
41int reset_tt_bh_write(const struct device *dev, uint32_t value);
42
51int reset_tt_bh_lines_assert(const struct device *dev, uint32_t offset, uint32_t mask);
52
60int reset_tt_bh_lines_deassert(const struct device *dev, uint32_t offset, uint32_t mask);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* ZEPHYR_INCLUDE_DRIVERS_RESET_RESET_TT_BH_H_ */
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.
Definition reset_tt_bh.c:157
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.
Definition reset_tt_bh.c:134
int reset_tt_bh_write(const struct device *dev, uint32_t value)
Absolute write to a BH reset-unit bank register.
Definition reset_tt_bh.c:122
__UINT32_TYPE__ uint32_t