diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2011-08-26 19:28:35 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-09-06 16:47:10 -0700 |
commit | 58de177d5eb9ad81c6bfb25195a88011ce8622b9 (patch) | |
tree | d811165d28dd5b840a315a96551dfa5f1e913069 /arch | |
parent | 618abf2f8a5841277440e77e7f46406924d2a63b (diff) |
arm: tegra: xmm : Changes for CP initiated system resume
Added the changes required for CP initiated L3 -> L0 resume.
BUG 828389
Change-Id: Ic6be39965f0f6b66db1f57fd8f860b6f7bb0d18b
Reviewed-on: http://git-master/r/49462
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/baseband-xmm-power.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/arch/arm/mach-tegra/baseband-xmm-power.c b/arch/arm/mach-tegra/baseband-xmm-power.c index 0eb395f9ebfc..dc8f8191a95d 100644 --- a/arch/arm/mach-tegra/baseband-xmm-power.c +++ b/arch/arm/mach-tegra/baseband-xmm-power.c @@ -532,19 +532,29 @@ static int baseband_xmm_power_driver_resume(struct platform_device *device) struct baseband_power_platform_data *data = (struct baseband_power_platform_data *) device->dev.platform_data; int value; + int delay = 10000; /* maxmum delay in msec */ pr_debug("%s\n", __func__); - /* wake bb */ - gpio_set_value(data->modem.xmm.ipc_bb_wake, 1); - - pr_debug("waiting for host wakeup\n"); - do { - mdelay(1); - value = gpio_get_value(baseband_power_driver_data - ->modem.xmm.ipc_ap_wake); - } while (!value); - pr_debug("gpio host wakeup high <-\n"); + value = gpio_get_value(data->modem.xmm.ipc_ap_wake); + if (!value) { + pr_info("AP Initiated L3 -> L0\n"); + /* wake bb */ + gpio_set_value(data->modem.xmm.ipc_bb_wake, 1); + + pr_debug("waiting for host wakeup\n"); + do { + mdelay(1); + value = gpio_get_value(data->modem.xmm.ipc_ap_wake); + delay--; + } while ((!value) && (delay)); + if (delay) + pr_debug("gpio host wakeup high <-\n"); + else + pr_err("%s host wakeup not happened\n", __func__); + } else { + pr_info("CP Initiated L3 -> L0\n"); + } /* signal bb to resume hsic */ gpio_set_value(data->modem.xmm.ipc_hsic_active, 1); |