History

clk: samsung: exynos4: Enable VPLL and EPLL clocks for suspend/resume cycle

Commit 6edfa11cb396 ("clk: samsung: Add enable/disable operation for PLL36XX clocks") added enable/disable operations to PLL clocks. Prior that VPLL and EPPL clocks were always enabled because the enable bit was never touched. Those clocks have to be enabled during suspend/resume cycle, because otherwise board fails to enter sleep mode. This patch enables them unconditionally before entering system suspend state. System restore function will set them to the previous state saved in the register cache done before that unconditional enable.

Marek Szyprowski committed 9 years ago

Commit 5dcbeca1 parent 79765e91 file · +15 −0Browse files

Unified · Split

drivers/clk/samsung/clk-exynos4.c+15−0
@@ -294,6 +294,18 @@ static const struct samsung_clk_reg_dump src_mask_suspend_e4210[] = { · 293 unmodified lines
294294 #define PLL_ENABLED (1 << 31)
295295 #define PLL_LOCKED (1 << 29)
296296
297+static void exynos4_clk_enable_pll(u32 reg)
298+{
299+ u32 pll_con = readl(reg_base + reg);
300+ pll_con |= PLL_ENABLED;
301+ writel(pll_con, reg_base + reg);
302+
303+ while (!(pll_con & PLL_LOCKED)) {
304+ cpu_relax();
305+ pll_con = readl(reg_base + reg);
306+ }
307+}
308+
297309 static void exynos4_clk_wait_for_pll(u32 reg)
298310 {
299311 u32 pll_con;
@@ -315,6 +327,9 @@ static int exynos4_clk_suspend(void) · 15 unmodified lines
315327 samsung_clk_save(reg_base, exynos4_save_pll,
316328 ARRAY_SIZE(exynos4_clk_pll_regs));
317329
330+ exynos4_clk_enable_pll(EPLL_CON0);
331+ exynos4_clk_enable_pll(VPLL_CON0);
332+
318333 if (exynos4_soc == EXYNOS4210) {
319334 samsung_clk_save(reg_base, exynos4_save_soc,
320335 ARRAY_SIZE(exynos4210_clk_save));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t