arm: tegra: xmm: reduce timeout timing on resume
Seongho Joo [Sun, 26 Feb 2012 03:18:02 +0000 (12:18 +0900)]
1.reduce CP ack timeout to 1000 ms, based on modem vendor spec.
expected timing is 10ms, but modem vendor recommend to wait less than 1 sec.
2.move log print after spinlock section.
log in spinlock could waste cpu resource.

Bug 932104

Signed-off-by: Seongho Joo <sjoo@nvidia.com>
Reviewed-on: http://git-master/r/86003
(cherry picked from commit de853a886153cfb35cafcf797df490207187cc33)

Change-Id: I4b1ea80d25e0aa1f93599c08eedf306dbed00d63
Reviewed-on: http://git-master/r/91934
Reviewed-by: Shawn Joo <sjoo@nvidia.com>
Tested-by: Shawn Joo <sjoo@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>

arch/arm/mach-tegra/baseband-xmm-power.c

index e428570..7d5c527 100644 (file)
@@ -561,7 +561,7 @@ static void baseband_xmm_power_L2_resume(void)
 {
        struct baseband_power_platform_data *data = baseband_power_driver_data;
        int value;
-       int delay = 10000; /* maxmum delay in msec */
+       int delay = 1000; /* maxmum delay in msec */
 
        pr_debug("%s\n", __func__);
 
@@ -942,7 +942,7 @@ static int baseband_xmm_power_driver_handle_resume(
                        struct baseband_power_platform_data *data)
 {
        int value;
-       int delay = 10000; /* maxmum delay in msec */
+       int delay = 1000; /* maxmum delay in msec */
        unsigned long flags;
 
        pr_debug("%s\n", __func__);
@@ -1013,9 +1013,9 @@ static int baseband_xmm_power_suspend_noirq(struct device *dev)
        pr_debug("%s\n", __func__);
        spin_lock_irqsave(&xmm_lock, flags);
        if (wakeup_pending) {
-               pr_info("%s:**Abort Suspend: reason CP WAKEUP**\n", __func__);
                wakeup_pending = false;
                spin_unlock_irqrestore(&xmm_lock, flags);
+               pr_info("%s:**Abort Suspend: reason CP WAKEUP**\n", __func__);
                return -EBUSY;
        }
        spin_unlock_irqrestore(&xmm_lock, flags);