summaryrefslogtreecommitdiffstats
path: root/include/linux/mailbox_controller.h
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2015-07-31 11:48:05 +0100
committerJassi Brar <jaswinder.singh@linaro.org>2015-08-10 14:29:27 +0530
commit0cc67945ea5933d53db69606312cf52f553d1b81 (patch)
tree486e823aaccb3d7de2bd377af36b0bfdd6cdbf9f /include/linux/mailbox_controller.h
parent63d5e127de8287c4ae80f43cda8cb9c06e612929 (diff)
downloadop-kernel-dev-0cc67945ea5933d53db69606312cf52f553d1b81.zip
op-kernel-dev-0cc67945ea5933d53db69606312cf52f553d1b81.tar.gz
mailbox: switch to hrtimer for tx_complete polling
The mailbox core uses jiffy based timer to handle polling for the transmit completion. If the client/protocol have/support notification of the last packet transmit completion via ACK packet, then we tick the Tx state machine immediately in the callback. However if the client doesn't support that mechanism we might end-up waiting for atleast a jiffy even though the remote is ready to receive the next request. This patch switches the timer used for that polling from jiffy-based to hrtimer-based so that we can support polling at much higher time resolution. Reported-and-suggested-by: Juri Lelli <Juri.Lelli@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'include/linux/mailbox_controller.h')
-rw-r--r--include/linux/mailbox_controller.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index 68c4245..74deadb 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -9,7 +9,7 @@
#include <linux/of.h>
#include <linux/types.h>
-#include <linux/timer.h>
+#include <linux/hrtimer.h>
#include <linux/device.h>
#include <linux/completion.h>
@@ -67,7 +67,8 @@ struct mbox_chan_ops {
* @txpoll_period: If 'txdone_poll' is in effect, the API polls for
* last TX's status after these many millisecs
* @of_xlate: Controller driver specific mapping of channel via DT
- * @poll: API private. Used to poll for TXDONE on all channels.
+ * @poll_hrt: API private. hrtimer used to poll for TXDONE on all
+ * channels.
* @node: API private. To hook into list of controllers.
*/
struct mbox_controller {
@@ -81,7 +82,7 @@ struct mbox_controller {
struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
const struct of_phandle_args *sp);
/* Internal to API */
- struct timer_list poll;
+ struct hrtimer poll_hrt;
struct list_head node;
};
OpenPOWER on IntegriCloud