diff options
author | Nishanth Menon | 2015-11-05 10:58:32 -0600 |
---|---|---|
committer | Tero Kristo | 2015-11-06 09:21:16 -0600 |
commit | cb72cfc203d509e374299e0ef1eef4ae80536a85 (patch) | |
tree | 1f0e39acce369b84fb5362c5535bcc963841e547 /drivers/firmware/ti_sci.c | |
parent | 65f0de947f2594a510fab9b66186cf53d62dd4c6 (diff) | |
download | ti-linux-kernel-cb72cfc203d509e374299e0ef1eef4ae80536a85.tar.gz ti-linux-kernel-cb72cfc203d509e374299e0ef1eef4ae80536a85.tar.xz ti-linux-kernel-cb72cfc203d509e374299e0ef1eef4ae80536a85.zip |
HACK: firmware: ti_sci: Move mailbox ticker after the tick
For some reason, unless we move the ticker logic *after* transmit, we
are unable to send data, however, when we do that, we have to deal
with Mailbox core's queue logic which is limited in size, so we can
only send "so much" requests simultaneously(ridiculous limitation, but
that is how it is).
While at this, increase predicted timeout to an unexpected value.
NOTE: this is tagged as a hack as the rootcause is still unknown. Side
effect of this patch will be to force the system to have just one
xfer only in progress to TI SCI. This needs further investigation to
rootcause, but this should unblock further work using the ti_sci for
communication
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Dave Gerlach <d-gerlach@ti.com>
Diffstat (limited to 'drivers/firmware/ti_sci.c')
-rw-r--r-- | drivers/firmware/ti_sci.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index f874d9c8c611..b266d7c2c09f 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c | |||
@@ -429,15 +429,6 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info, | |||
429 | if (ret < 0) | 429 | if (ret < 0) |
430 | return ret; | 430 | return ret; |
431 | 431 | ||
432 | /* | ||
433 | * NOTE: we don't need the mailbox ticker to manage the transfer | ||
434 | * queueing since the protocol layer queues things by itself. So, | ||
435 | * kick it once we are done with current transmit. This forces | ||
436 | * the mailbox framework to submit next message allowing for | ||
437 | * transmission of next message to occur in parallel to processing | ||
438 | * in TISCI entity and subsequent response of the current message. | ||
439 | */ | ||
440 | mbox_client_txdone(info->chan_tx, 0); | ||
441 | ret = 0; | 432 | ret = 0; |
442 | 433 | ||
443 | /* And we wait for the response. */ | 434 | /* And we wait for the response. */ |
@@ -447,6 +438,13 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info, | |||
447 | (void *)_RET_IP_); | 438 | (void *)_RET_IP_); |
448 | ret = -ETIMEDOUT; | 439 | ret = -ETIMEDOUT; |
449 | } | 440 | } |
441 | /* | ||
442 | * NOTE: we might prefer not to need the mailbox ticker to manage the | ||
443 | * transfer queueing since the protocol layer queues things by itself. | ||
444 | * Unfortunately, we have to kick the mailbox framework after we have | ||
445 | * received our message. | ||
446 | */ | ||
447 | mbox_client_txdone(info->chan_tx, ret); | ||
450 | 448 | ||
451 | return ret; | 449 | return ret; |
452 | } | 450 | } |
@@ -629,8 +627,9 @@ EXPORT_SYMBOL_GPL(devm_ti_sci_get_handle); | |||
629 | /* Description for K2G */ | 627 | /* Description for K2G */ |
630 | static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { | 628 | static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { |
631 | .host_id = 2, | 629 | .host_id = 2, |
632 | .max_rx_timeout_ms = 200, | 630 | .max_rx_timeout_ms = 1000, |
633 | .max_msgs = 128, | 631 | /* Limited by MBOX_TX_QUEUE_LEN!!!! K2G can handle upto 128! */ |
632 | .max_msgs = 20, | ||
634 | .max_msg_size = 64, | 633 | .max_msg_size = 64, |
635 | }; | 634 | }; |
636 | 635 | ||