imx233: enable PLL on startup

Implement PLL enabling/disable and unconditionally power the PLL
on startup. This is needed at least on the Zen X-Fi2.

Change-Id: Ib9ddfdeaf973cedded4b3586dd16aa95a61e78ba
This commit is contained in:
Amaury Pouly 2012-05-21 16:28:12 +02:00
parent 0ebfb937aa
commit cd7a478ec1
3 changed files with 14 additions and 1 deletions

View file

@ -43,6 +43,17 @@ void imx233_clkctrl_enable_clock(enum imx233_clock_t clk, bool enable)
{
case CLK_PIX: REG = &HW_CLKCTRL_PIX; break;
case CLK_SSP: REG = &HW_CLKCTRL_SSP; break;
case CLK_PLL:
{
if(enable)
{
__REG_SET(HW_CLKCTRL_PLLCTRL0) = HW_CLKCTRL_PLLCTRL0__POWER;
while(!(HW_CLKCTRL_PLLCTRL1 & HW_CLKCTRL_PLLCTRL1__LOCK));
}
else
__REG_CLR(HW_CLKCTRL_PLLCTRL0) = HW_CLKCTRL_PLLCTRL0__POWER;
return;
}
default: return;
}