Merge branches 'clk-fixed-rate-remove' and 'clk-qcom-cleanup' into clk-next
[linux-2.6-block.git] / drivers / clk / samsung / clk-exynos5433.c
index 162de44df099bff5be3a70e4fd5b010e1fc584f5..751e2c4fb65b64faa046c1be2abed06f825289a1 100644 (file)
@@ -177,6 +177,17 @@ static const unsigned long top_clk_regs[] __initconst = {
        ENABLE_CMU_TOP_DIV_STAT,
 };
 
+static const struct samsung_clk_reg_dump top_suspend_regs[] = {
+       /* force all aclk clocks enabled */
+       { ENABLE_ACLK_TOP, 0x67ecffed },
+       /* force all sclk_uart clocks enabled */
+       { ENABLE_SCLK_TOP_PERIC, 0x38 },
+       /* ISP PLL has to be enabled for suspend: reset value + ENABLE bit */
+       { ISP_PLL_CON0, 0x85cc0502 },
+       /* ISP PLL has to be enabled for suspend: reset value + ENABLE bit */
+       { AUD_PLL_CON0, 0x84830202 },
+};
+
 /* list of all parent clock list */
 PNAME(mout_aud_pll_p)          = { "oscclk", "fout_aud_pll", };
 PNAME(mout_isp_pll_p)          = { "oscclk", "fout_isp_pll", };
@@ -792,6 +803,8 @@ static const struct samsung_cmu_info top_cmu_info __initconst = {
        .nr_clk_ids             = TOP_NR_CLK,
        .clk_regs               = top_clk_regs,
        .nr_clk_regs            = ARRAY_SIZE(top_clk_regs),
+       .suspend_regs           = top_suspend_regs,
+       .nr_suspend_regs        = ARRAY_SIZE(top_suspend_regs),
 };
 
 static void __init exynos5433_cmu_top_init(struct device_node *np)
@@ -822,6 +835,13 @@ static const unsigned long cpif_clk_regs[] __initconst = {
        ENABLE_SCLK_CPIF,
 };
 
+static const struct samsung_clk_reg_dump cpif_suspend_regs[] = {
+       /* force all sclk clocks enabled */
+       { ENABLE_SCLK_CPIF, 0x3ff },
+       /* MPHY PLL has to be enabled for suspend: reset value + ENABLE bit */
+       { MPHY_PLL_CON0, 0x81c70601 },
+};
+
 /* list of all parent clock list */
 PNAME(mout_mphy_pll_p)         = { "oscclk", "fout_mphy_pll", };
 
@@ -862,6 +882,8 @@ static const struct samsung_cmu_info cpif_cmu_info __initconst = {
        .nr_clk_ids             = CPIF_NR_CLK,
        .clk_regs               = cpif_clk_regs,
        .nr_clk_regs            = ARRAY_SIZE(cpif_clk_regs),
+       .suspend_regs           = cpif_suspend_regs,
+       .nr_suspend_regs        = ARRAY_SIZE(cpif_suspend_regs),
 };
 
 static void __init exynos5433_cmu_cpif_init(struct device_node *np)
@@ -1547,6 +1569,13 @@ static const unsigned long peric_clk_regs[] __initconst = {
        ENABLE_IP_PERIC2,
 };
 
+static const struct samsung_clk_reg_dump peric_suspend_regs[] = {
+       /* pclk: sci, pmu, sysreg, gpio_{finger, ese, touch, nfc}, uart2-0 */
+       { ENABLE_PCLK_PERIC0, 0xe00ff000 },
+       /* sclk: uart2-0 */
+       { ENABLE_SCLK_PERIC, 0x7 },
+};
+
 static const struct samsung_div_clock peric_div_clks[] __initconst = {
        /* DIV_PERIC */
        DIV(CLK_DIV_SCLK_SCI, "div_sclk_sci", "oscclk", DIV_PERIC, 4, 4),
@@ -1705,6 +1734,8 @@ static const struct samsung_cmu_info peric_cmu_info __initconst = {
        .nr_clk_ids             = PERIC_NR_CLK,
        .clk_regs               = peric_clk_regs,
        .nr_clk_regs            = ARRAY_SIZE(peric_clk_regs),
+       .suspend_regs           = peric_suspend_regs,
+       .nr_suspend_regs        = ARRAY_SIZE(peric_suspend_regs),
 };
 
 static void __init exynos5433_cmu_peric_init(struct device_node *np)
@@ -5630,7 +5661,7 @@ static const struct of_device_id exynos5433_cmu_of_match[] = {
 static const struct dev_pm_ops exynos5433_cmu_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos5433_cmu_suspend, exynos5433_cmu_resume,
                           NULL)
-       SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+       SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
                                     pm_runtime_force_resume)
 };