ARM: tegra: timer: Fix mismatch in twd suspend/resume code
Alex Frid [Tue, 20 Sep 2011 02:27:19 +0000 (19:27 -0700)]
Change-Id: Ied49d7517574b62ebc54ba8a5ef04d26408f0145
Reviewed-on: http://git-master/r/53347
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Gaurav Sarode <gsarode@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

Rebase-Id: Rd540ebbeb48903eea556508be45580c5d260941e

arch/arm/mach-tegra/timer.c

index 4f011a2..ba4ad7a 100644 (file)
@@ -203,7 +203,7 @@ static void __init tegra_twd_init(void)
 void tegra_twd_suspend(struct tegra_twd_context *context)
 {
        context->twd_ctrl = readl(twd_base + TWD_TIMER_CONTROL);
-       context->twd_load = readl(twd_base + TWD_TIMER_COUNTER);
+       context->twd_load = readl(twd_base + TWD_TIMER_LOAD);
        if ((context->twd_load == 0) && (context->twd_ctrl &
                (TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE))) {
                WARN("%s: TWD enabled but counter was 0\n", __func__);