diff options
author | Vick Yu <vyu@nvidia.com> | 2010-02-12 10:15:31 +0800 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-02-25 20:27:11 -0800 |
commit | 6f90ce8439d4d8682a9c447a5e5322dae6c0ff0e (patch) | |
tree | d697391724d5222bac59cf1333cac8027ef6c306 | |
parent | 17d9361b40adc59e7f260d78013d48ff5d7c5677 (diff) |
tegra: support embedded controller clock rate besides 100 KHz.
bug 638587
Change-Id: I0957f019c1db5e22ed476dfb2c7b7caec5c20425
-rw-r--r-- | arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c b/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c index 1db117b2f5f6..4f47bc1fc566 100644 --- a/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c +++ b/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c @@ -54,7 +54,7 @@ #include "nvodm_query_discovery.h" #define ENABLE_NEW_SLAVE 1 -#define ADD_5US_DELAY 1 +#define ADD_ACK_DELAY 1 #define DELAY_COUNT 0x1E #define MAX_NACKS 1 @@ -318,9 +318,9 @@ HwI2cHandleVariableRead( if (NV_DRF_VAL(I2C, I2C_SL_STATUS, RCVD, SlaveStatus)) { - #if ADD_5US_DELAY + #if ADD_ACK_DELAY // Work around for AP20 New Slave Hw Bug. Give 1us extra. - while( (NvOsGetTimeUS() - IsrStartTime) < (5 + 1) ); + while( (NvOsGetTimeUS() - IsrStartTime) < (((1000 / t->ClockSpeedInKHz) / 2) + 1) ); #endif /* |