summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2013-05-18 23:23:27 -0700
committerGabby Lee <galee@nvidia.com>2013-08-14 04:35:16 -0700
commit1a00e46279b0cc4f2bfa04c94651e739d4bcc64e (patch)
tree485f7bd21603786a47839c701821c1cbda46ad98
parent8a38dd632283585d882be5973a461b5c4c4de502 (diff)
ARM: tegra11: clock: Move auto-refresh control to CCFIFO
Disabled/Enabled auto-refresh during EMC clock change using CCFIFO mechanism. Bug 1339693 Change-Id: I00fc1cc4fe4668ed84c1e7a4e105ebbb684b0ca5 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/261318 Reviewed-by: David Yu (Engrg-SW) <davyu@nvidia.com> Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@nvidia.com> Tested-by: Gabby Lee <galee@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/tegra11_emc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/tegra11_emc.c b/arch/arm/mach-tegra/tegra11_emc.c
index 0fba09e4be67..0aab1c2c1898 100644
--- a/arch/arm/mach-tegra/tegra11_emc.c
+++ b/arch/arm/mach-tegra/tegra11_emc.c
@@ -669,7 +669,7 @@ static noinline void emc_set_clock(const struct tegra11_emc_table *next_timing,
overwrite_mrs_wait_cnt(next_timing, zcal_long);
/* 5.2 disable auto-refresh to save time after clock change */
- emc_writel(EMC_REFCTRL_DISABLE_ALL(dram_dev_num), EMC_REFCTRL);
+ ccfifo_writel(EMC_REFCTRL_DISABLE_ALL(dram_dev_num), EMC_REFCTRL);
/* 6. turn Off dll and enter self-refresh on DDR3 */
if (dram_type == DRAM_TYPE_DDR3) {
@@ -686,6 +686,9 @@ static noinline void emc_set_clock(const struct tegra11_emc_table *next_timing,
if (dram_type == DRAM_TYPE_DDR3)
ccfifo_writel(DRAM_BROADCAST(dram_dev_num), EMC_SELF_REF);
+ /* 8.1 re-enable auto-refresh */
+ ccfifo_writel(EMC_REFCTRL_ENABLE_ALL(dram_dev_num), EMC_REFCTRL);
+
/* 9. set dram mode registers */
set_dram_mode(next_timing, last_timing, dll_change);
@@ -711,8 +714,7 @@ static noinline void emc_set_clock(const struct tegra11_emc_table *next_timing,
change EMC clock source register wait for clk change completion */
do_clock_change(clk_setting);
- /* 14.1 re-enable auto-refresh */
- emc_writel(EMC_REFCTRL_ENABLE_ALL(dram_dev_num), EMC_REFCTRL);
+ /* 14.1 re-enable auto-refresh - moved to ccfifo in 8.1 */
/* 14.2 program burst_up_down registers if emc rate is going up */
if (next_timing->rate > last_timing->rate) {