From bd23709709d6dcd39cb14bd38b5df9d3da4a180e Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 23 May 2016 13:58:15 -0700 Subject: [PATCH] arm64: tegra21: emc: Make sure the DLL always has a clock Ensure the DLL always has a clock. If it does not then the DLL will not be able to swap to a new clock source. That is to say the DLL requires both the old and new clock source to be active when its source is changed. Bug 1655375 Change-Id: I796725b95628d7ea6753d7986af74324e9c1489b Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1152001 (cherry picked from commit e0a23c1f4a99a88b09faedd82dbdba64fc138bec) Reviewed-on: http://git-master/r/1185062 GVS: Gerrit_Virtual_Submit Tested-by: Robert Collins Reviewed-by: Akhilesh Khumbum Reviewed-by: Robert Collins --- drivers/platform/tegra/mc/tegra21_emc_cc_r21015.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/platform/tegra/mc/tegra21_emc_cc_r21015.c b/drivers/platform/tegra/mc/tegra21_emc_cc_r21015.c index 5464bb542e1..91c0200b5e3 100644 --- a/drivers/platform/tegra/mc/tegra21_emc_cc_r21015.c +++ b/drivers/platform/tegra/mc/tegra21_emc_cc_r21015.c @@ -1646,6 +1646,13 @@ void emc_set_clock_r21015(struct tegra21_emc_table *next_timing, prelock_dll_en = 1; } else { emc_cc_dbg(INFO, "Disabling DLL for target frequency.\n"); + + /* + * Ensure that even if the DLL is disabled for the given + * frequency it still has an active clock source. If it does + * not then it will not work during the next clock change. + */ + change_dll_src(next_timing, clksrc); dll_disable(channel_mode); } -- 2.39.2