arm: tegra12: fix PTSA registers save/restore
Roger Hsieh [Mon, 2 Mar 2015 11:23:33 +0000 (19:23 +0800)]
Some of PTSA regsiters are restored to wrong value that affects
other clients under memory controller. Correct it to fix audio
noise issue after LP0 resume.

Bug 1612520

Change-Id: I92f03cace5dcc81a33a71cdd4628c2112f7015ed
Signed-off-by: Roger Hsieh <rhsieh@nvidia.com>
Reviewed-on: http://git-master/r/712540
(cherry picked from commit 478e8e144acd8218421ddbf69e8dd2676a68ab8e)
Reviewed-on: http://git-master/r/713592
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/mach-tegra/tegra12x_la.c

index 52b2b44..3e9918b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/tegra12x_la.c
  *
- * Copyright (C) 2013-2014, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (C) 2013-2015, NVIDIA CORPORATION. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -498,7 +498,7 @@ static void program_ptsa(void)
        writel(p->usbx_ptsa_max, T12X_MC_RA(USBX_PTSA_MAX_0));
 
        writel(p->usbd_ptsa_min, T12X_MC_RA(USBD_PTSA_MIN_0));
-       writel(p->usbd_ptsa_min, T12X_MC_RA(USBD_PTSA_MAX_0));
+       writel(p->usbd_ptsa_max, T12X_MC_RA(USBD_PTSA_MAX_0));
 
        writel(p->ftop_ptsa_min, T12X_MC_RA(FTOP_PTSA_MIN_0));
        writel(p->ftop_ptsa_max, T12X_MC_RA(FTOP_PTSA_MAX_0));
@@ -567,7 +567,7 @@ static void save_ptsa(void)
        p->r0_dis_ptsa_max = readl(T12X_MC_RA(R0_DIS_PTSA_MAX_0));
 
        p->r0_disb_ptsa_min = readl(T12X_MC_RA(R0_DISB_PTSA_MIN_0));
-       p->r0_disb_ptsa_min = readl(T12X_MC_RA(R0_DISB_PTSA_MAX_0));
+       p->r0_disb_ptsa_max = readl(T12X_MC_RA(R0_DISB_PTSA_MAX_0));
 
        p->vd_ptsa_min = readl(T12X_MC_RA(VD_PTSA_MIN_0));
        p->vd_ptsa_max = readl(T12X_MC_RA(VD_PTSA_MAX_0));
@@ -579,7 +579,7 @@ static void save_ptsa(void)
        p->gk_ptsa_max = readl(T12X_MC_RA(GK_PTSA_MAX_0));
 
        p->vicpc_ptsa_min = readl(T12X_MC_RA(VICPC_PTSA_MIN_0));
-       p->vicpc_ptsa_min = readl(T12X_MC_RA(VICPC_PTSA_MAX_0));
+       p->vicpc_ptsa_max = readl(T12X_MC_RA(VICPC_PTSA_MAX_0));
 
        p->apb_ptsa_min = readl(T12X_MC_RA(APB_PTSA_MIN_0));
        p->apb_ptsa_max = readl(T12X_MC_RA(APB_PTSA_MAX_0));