diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2018-06-19 17:12:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-07 17:24:32 +0200 |
commit | d3062a21093093bc77a8ebf1b555e380993993e7 (patch) | |
tree | 0b8b49c88c015368df96ff1158b45d8a85eef458 /drivers/slimbus/slimbus.h | |
parent | db455d66b9900a8a81fe474f11c78c8c8a95eefa (diff) | |
download | linux-d3062a21093093bc77a8ebf1b555e380993993e7.tar.gz linux-d3062a21093093bc77a8ebf1b555e380993993e7.tar.bz2 linux-d3062a21093093bc77a8ebf1b555e380993993e7.zip |
slimbus: messaging: add slim_alloc/free_txn_tid()
This patch adds slim_alloc_txn_tid() and slim_free_txn_tid() api
to allow controllers like ngd to allocate tids for user specific
commands. This also cleans up the existing code to use single place
for tid allocations and free.
This patch also make the tid allocation cyclic one, its very useful
to track the transactions back during debug.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/slimbus/slimbus.h')
-rw-r--r-- | drivers/slimbus/slimbus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/slimbus/slimbus.h b/drivers/slimbus/slimbus.h index 79f8e05d92dd..2ba6545fa716 100644 --- a/drivers/slimbus/slimbus.h +++ b/drivers/slimbus/slimbus.h @@ -240,6 +240,8 @@ int slim_unregister_controller(struct slim_controller *ctrl); void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 l); int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn); int slim_ctrl_clk_pause(struct slim_controller *ctrl, bool wakeup, u8 restart); +int slim_alloc_txn_tid(struct slim_controller *ctrl, struct slim_msg_txn *txn); +void slim_free_txn_tid(struct slim_controller *ctrl, struct slim_msg_txn *txn); static inline bool slim_tid_txn(u8 mt, u8 mc) { |