change ddrfreq directly in ddr_init() since lcdc is not init
author陈亮 <cl@rock-chips.com>
Fri, 4 Jul 2014 03:58:01 +0000 (20:58 -0700)
committer陈亮 <cl@rock-chips.com>
Fri, 4 Jul 2014 03:58:01 +0000 (20:58 -0700)
Signed-off-by: 陈亮 <cl@rock-chips.com>
arch/arm/mach-rockchip/ddr_rk32.c

index 9381089806a31349198e787bd325fd80e6c68bba..27367cec5b7292abf07921dc6f6fb7c225341f9c 100755 (executable)
@@ -4025,6 +4025,9 @@ static int _ddr_change_freq(uint32 nMHz)
        {
                ddr_freq_t.screen_ft_us = rk_fb_get_prmry_screen_ft();
                ddr_freq_t.t0 = rk_fb_get_prmry_screen_framedone_t();
+               if (!ddr_freq_t.screen_ft_us)
+                       return __ddr_change_freq(nMHz, ddr_freq_t);
+
                tmp = cpu_clock(0) - ddr_freq_t.t0;
                do_div(tmp, 1000);
                pass_t = tmp;