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/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index 30a4ed2..7827c68 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -49,6 +49,8 @@
  *		  Used only if txdone_poll:=true && txdone_irq:=false
  * @peek_data: Atomic check for any received data. Return true if controller
  *		  has some data to push to the client. False otherwise.
+ * @debug:	Allow chan to be debugged when the client detects a channel is
+ * 		locked up.
  */
 struct mbox_chan_ops {
 	int (*send_data)(struct mbox_chan *chan, void *data);
@@ -90,6 +92,7 @@
 	struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
 				      const struct of_phandle_args *sp);
 	bool (*is_idle)(struct mbox_controller *mbox);
+	void (*debug)(struct mbox_chan *chan);
 	/* Internal to API */
 	struct hrtimer poll_hrt;
 	struct list_head node;