slimbus: messaging: add slim_alloc/free_txn_tid()
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 19 Jun 2018 16:12:59 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jul 2018 15:24:32 +0000 (17:24 +0200)
commitd3062a21093093bc77a8ebf1b555e380993993e7
tree0b8b49c88c015368df96ff1158b45d8a85eef458
parentdb455d66b9900a8a81fe474f11c78c8c8a95eefa
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>
drivers/slimbus/messaging.c
drivers/slimbus/slimbus.h