Commit f9f620d6 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra186: mce: use udelay() to calculate timeouts



This patch modifies the timeout loop to use udelay() instead of
mdelay(). This helps with the boot time on some platforms which
issue a lot of MCE calls and every mdelay adds up increasing the
boot time by a lot.

Change-Id: Ic50081b73e1cbc2714361235b5c396e294b8f752
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 8dc92783
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#define ARI_REQUEST_VALID_BIT (1U << 8) #define ARI_REQUEST_VALID_BIT (1U << 8)
#define ARI_EVT_MASK_STANDBYWFI_BIT (1U << 7) #define ARI_EVT_MASK_STANDBYWFI_BIT (1U << 7)
/* default timeout (ms) to wait for ARI completion */ /* default timeout (us) to wait for ARI completion */
#define ARI_MAX_RETRY_COUNT 2000 #define ARI_MAX_RETRY_COUNT U(2000000)
/******************************************************************************* /*******************************************************************************
* ARI helper functions * ARI helper functions
...@@ -80,7 +80,7 @@ static inline void ari_clobber_response(uint32_t ari_base) ...@@ -80,7 +80,7 @@ static inline void ari_clobber_response(uint32_t ari_base)
static int32_t ari_request_wait(uint32_t ari_base, uint32_t evt_mask, uint32_t req, static int32_t ari_request_wait(uint32_t ari_base, uint32_t evt_mask, uint32_t req,
uint32_t lo, uint32_t hi) uint32_t lo, uint32_t hi)
{ {
uint32_t retries = ARI_MAX_RETRY_COUNT; uint32_t retries = (uint32_t)ARI_MAX_RETRY_COUNT;
uint32_t status; uint32_t status;
int32_t ret = 0; int32_t ret = 0;
...@@ -115,8 +115,8 @@ static int32_t ari_request_wait(uint32_t ari_base, uint32_t evt_mask, uint32_t r ...@@ -115,8 +115,8 @@ static int32_t ari_request_wait(uint32_t ari_base, uint32_t evt_mask, uint32_t r
break; break;
} }
/* delay 1 ms */ /* delay 1 us */
mdelay(1); udelay(1);
/* decrement the retry count */ /* decrement the retry count */
retries--; retries--;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment