drivers: mailbox: add controller debug

Sometimes a client may detect that a channel has clogged up and is not
responding to requests in time. In such case, the client may want to
initiate a debug on the controller that might help debug and analyze the
reasons for the clog.

Also, since we will be calling debug on the controller explictly convert
pr_debug to pr_warn and remove automatic calling when the TCS are busy.

Change-Id: Ib15db652e780790f0eaa4f6ada7ad9defed99a65
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index d2cb1e8..3989bc6 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -330,6 +330,16 @@
 }
 EXPORT_SYMBOL(mbox_controller_is_idle);
 
+
+void mbox_chan_debug(struct mbox_chan *chan)
+{
+	if (!chan || !chan->cl || !chan->mbox->debug)
+		return;
+
+	return chan->mbox->debug(chan);
+}
+EXPORT_SYMBOL(mbox_chan_debug);
+
 /**
  * mbox_request_channel - Request a mailbox channel.
  * @cl: Identity of the client requesting the channel.