Tegra: bpmp: Increase timeout to 2ms
To deal with upcoming EMC periodic compensation, increase the BPMP timeout to 2ms. Change-Id: I8572c031168defd15504d905c4d625f44dd7fa3d Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
This commit is contained in:
parent
a9cbc0cbcb
commit
c09c63eed6
|
@ -16,7 +16,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tegra_def.h>
|
#include <tegra_def.h>
|
||||||
|
|
||||||
#define BPMP_TIMEOUT_10US 10
|
#define BPMP_TIMEOUT 2
|
||||||
|
|
||||||
static uint32_t channel_base[NR_CHANNELS];
|
static uint32_t channel_base[NR_CHANNELS];
|
||||||
static uint32_t bpmp_init_state = BPMP_INIT_PENDING;
|
static uint32_t bpmp_init_state = BPMP_INIT_PENDING;
|
||||||
|
@ -58,15 +58,15 @@ int32_t tegra_bpmp_send_receive_atomic(int mrq, const void *ob_data, int ob_sz,
|
||||||
if (bpmp_init_state == BPMP_INIT_COMPLETE) {
|
if (bpmp_init_state == BPMP_INIT_COMPLETE) {
|
||||||
|
|
||||||
/* loop until BPMP is free */
|
/* loop until BPMP is free */
|
||||||
for (timeout = 0; timeout < BPMP_TIMEOUT_10US; timeout++) {
|
for (timeout = 0; timeout < BPMP_TIMEOUT; timeout++) {
|
||||||
if (master_free(ch) == true) {
|
if (master_free(ch) == true) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
udelay(1);
|
mdelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout != BPMP_TIMEOUT_10US) {
|
if (timeout != BPMP_TIMEOUT) {
|
||||||
|
|
||||||
/* generate the command struct */
|
/* generate the command struct */
|
||||||
p->code = mrq;
|
p->code = mrq;
|
||||||
|
@ -79,15 +79,15 @@ int32_t tegra_bpmp_send_receive_atomic(int mrq, const void *ob_data, int ob_sz,
|
||||||
(1U << INT_SHR_SEM_OUTBOX_FULL));
|
(1U << INT_SHR_SEM_OUTBOX_FULL));
|
||||||
|
|
||||||
/* loop until the command is executed */
|
/* loop until the command is executed */
|
||||||
for (timeout = 0; timeout < BPMP_TIMEOUT_10US; timeout++) {
|
for (timeout = 0; timeout < BPMP_TIMEOUT; timeout++) {
|
||||||
if (master_acked(ch) == true) {
|
if (master_acked(ch) == true) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
udelay(1);
|
mdelay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout != BPMP_TIMEOUT_10US) {
|
if (timeout != BPMP_TIMEOUT) {
|
||||||
|
|
||||||
/* get the command response */
|
/* get the command response */
|
||||||
(void)memcpy(ib_data, (const void *)p->data,
|
(void)memcpy(ib_data, (const void *)p->data,
|
||||||
|
@ -106,8 +106,8 @@ int32_t tegra_bpmp_send_receive_atomic(int mrq, const void *ob_data, int ob_sz,
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout == BPMP_TIMEOUT_10US) {
|
if (timeout == BPMP_TIMEOUT) {
|
||||||
ERROR("Timed out waiting for bpmp's response");
|
ERROR("Timed out waiting for bpmp's response\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue