diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2010-04-15 18:33:28 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-04-15 20:21:49 -0700 |
commit | ba65300ac207e5af406c97bdf78f8eb54ee7ba7b (patch) | |
tree | 1bb2749d3a7af41b1aa6bc83e8a595a424ccc375 /arch | |
parent | 73fd6c71c76eda1ffe635a48e03cc56faacbf762 (diff) |
tegra nvec: de-assert EC_REQUEST# properly
Set the GPIO in a reasonable state before calling NvRmGpioConfigPins(Output) to
avoid 5us~1ms low-pulse, since the low-pulse causes some EC firmwares to crash.
reviewed by Artiste-Hsu
tested on Harmony
Change-Id: Ia30dfd10dfd16eec979f2a8e6ffc8286121a2eeb
Reviewed-on: http://git-master/r/1126
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Phillip Smith <psmith@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c | 8 |
1 files changed, 5 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 ebe6d744f422..55321d098f04 100644 --- a/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c +++ b/arch/arm/mach-tegra/nvec/smbus/nvec_i2c_transport.c @@ -788,11 +788,13 @@ NvEcTransportOpen(NvEcTransportHandle *phEcTrans, I2cGetSocCapabilities(t->hRmDevice, t->Instance, &t->I2cSocCaps); NV_ASSERT_SUCCESS(NvRmGpioOpen(t->hRmDevice, &t->hGpio)); NvRmGpioAcquirePinHandle(t->hGpio, GpioPort, GpioPin, &t->hEcRequestPin); - NV_CHECK_ERROR_CLEANUP(NvRmGpioConfigPins(t->hGpio, - &t->hEcRequestPin, 1, NvRmGpioPinMode_Output)); // De-assert the Gpio Line here. - if (t->hEcRequestPin) + if (t->hEcRequestPin) { NvRmGpioWritePins(t->hGpio, &t->hEcRequestPin, &PinState, 1); + NV_CHECK_ERROR_CLEANUP(NvRmGpioConfigPins(t->hGpio, + &t->hEcRequestPin, 1, NvRmGpioPinMode_Output)); + } + NV_CHECK_ERROR(HwI2cInitController(t)); GetBufferForRxData(t); g_IsInitialized = NV_TRUE; |