ARM: tegra: clock: Add fence read in emc clock change
Alex Frid [Thu, 7 Jun 2012 06:51:28 +0000 (23:51 -0700)]
Added fence read in Tegra3 emc clock change procedure.

Change-Id: I2162affb4dddcacf38057e07ff6fbd5964643188
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/106956
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/tegra3_emc.c

index 363519c..a70f6ac 100644 (file)
@@ -497,6 +497,7 @@ static inline void do_clock_change(u32 clk_setting)
 
        mc_readl(MC_EMEM_ADR_CFG);      /* completes prev writes */
        writel(clk_setting, (u32)clk_base + emc->reg);
+       readl((u32)clk_base + emc->reg);/* completes prev write */
 
        err = wait_for_update(EMC_INTSTATUS,
                              EMC_INTSTATUS_CLKCHANGE_COMPLETE, true);