6 Commits

Author SHA1 Message Date
Lina Iyer
8a09f746aa 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.

Change-Id: Ib15db652e780790f0eaa4f6ada7ad9defed99a65
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2017-08-31 11:19:48 -06:00
Lina Iyer
21d0569889 drivers: mailbox: Write data to the controller without sending
In addition to the requests that have to be sent to the remote processor
through the mailbox controller, there may be data, that may need to be
sent to the controller, but not the remote processor, atleast right
away. Such data need not be buffered by the mailbox framework. Since
data is also not sent to the remote processor immediately,
acknowlegement will not be expected by the mailbox framework.

Change-Id: I6b6e81f593af0ed1cadde269624ebfa2a1591f5b
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2017-08-31 11:19:47 -06:00
Lina Iyer
adafdfa959 drivers: mailbox: query controller idle status
Power drivers that are interested in knowing the current state of the
controller so they can turn down idle states may do so using the
->is_idle() callback on the controller. The call will default to false,
if the controller does not support the ->is_idle callback.

Change-Id: Idf4290d3a651604c8637425abfa25cedc9a02d10
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2017-08-31 11:19:47 -06:00
Sudeep Holla
0cc67945ea 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>
2015-08-10 14:29:27 +05:30
Andrew Bresticker
05ae797566 mailbox: Make mbox_chan_ops const
The mailbox controller's channel ops ought to be read-only.  Update
all the mailbox drivers to make their mbox_chan_ops const as well.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Ley Foon Tan <lftan@altera.com>
Acked-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2015-05-12 09:18:16 +05:30
Jassi Brar
2b6d83e2b8 mailbox: Introduce framework for mailbox
Introduce common framework for client/protocol drivers and
controller drivers of Inter-Processor-Communication (IPC).

Client driver developers should have a look at
 include/linux/mailbox_client.h to understand the part of
the API exposed to client drivers.
Similarly controller driver developers should have a look
at include/linux/mailbox_controller.h

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2014-10-08 10:39:41 +05:30