Skip to content

Commit

Permalink
sun4i: clock: fix PLL4 initialization for non-revC
Browse files Browse the repository at this point in the history
Based on a patch by Andreas Baierl <list@imkreisrum.de> to fix a problem
initializing Mali's clock on a revB board.
  • Loading branch information
amery committed Oct 18, 2012
1 parent ab7575d commit baacd51
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/arm/mach-sun4i/clock/clock.c
Expand Up @@ -162,20 +162,21 @@ int clk_init(void)
tmpSclk->clk->onoff = AW_CCU_CLK_ON;
tmpSclk->set_clk(tmpSclk->clk);

if(MAGIC_VER_C == sw_get_ic_ver()) {
/* initiate PLL4 */
#if(USE_PLL6M_REPLACE_PLL4)
/* initiate PLL4 */
#if(USE_PLL6M_REPLACE_PLL4)
if(MAGIC_VER_C == sw_get_ic_ver()) {
tmpSclk = &ccu_sys_clk[AW_SYS_CLK_PLL4];
tmpSclk->clk->onoff = AW_CCU_CLK_OFF;
tmpSclk->set_clk(tmpSclk->clk);
#else
} else
#endif
{
tmpSclk = &ccu_sys_clk[AW_SYS_CLK_PLL4];
tmpSclk->clk->rate = 960000000;
tmpSclk->set_clk(tmpSclk->clk);
tmpSclk->clk->onoff = AW_CCU_CLK_ON;
tmpSclk->set_clk(tmpSclk->clk);
#endif
}
}

/* initiate PLL6 */
tmpSclk = &ccu_sys_clk[AW_SYS_CLK_PLL6];
Expand Down

0 comments on commit baacd51

Please sign in to comment.