diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2014-07-14 09:38:34 -0400 |
---|---|---|
committer | Tomasz Figa <t.figa@samsung.com> | 2014-07-25 20:50:15 -0400 |
commit | ca5b4029382245397dd6829c6321121cab1a1471 (patch) | |
tree | 50b327d18f7d33b64b277a8dd009c14f932b043c /drivers/clk | |
parent | e9d529562a8ca5f293032f5aca3060eeb9c406bb (diff) |
clk: samsung: register exynos5420 apll/kpll configuration data
Register the PLL configuration data for APLL and KPLL on Exynos5420. This
configuration data table specifies PLL coefficients for supported PLL
clock speeds when a 24MHz clock is supplied as the input clock source
for these PLLs.
Cc: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Tested-by: Arjun K.V <arjun.kv@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/samsung/clk-exynos5420.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index c5eb021a5576..bc772f8585d6 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c | |||
@@ -1196,6 +1196,28 @@ static struct samsung_gate_clock exynos5x_gate_clks[] __initdata = { | |||
1196 | GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 0, 0), | 1196 | GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 0, 0), |
1197 | }; | 1197 | }; |
1198 | 1198 | ||
1199 | static const struct samsung_pll_rate_table exynos5420_pll2550x_24mhz_tbl[] = { | ||
1200 | PLL_35XX_RATE(2000000000, 250, 3, 0), | ||
1201 | PLL_35XX_RATE(1900000000, 475, 6, 0), | ||
1202 | PLL_35XX_RATE(1800000000, 225, 3, 0), | ||
1203 | PLL_35XX_RATE(1700000000, 425, 6, 0), | ||
1204 | PLL_35XX_RATE(1600000000, 200, 3, 0), | ||
1205 | PLL_35XX_RATE(1500000000, 250, 4, 0), | ||
1206 | PLL_35XX_RATE(1400000000, 175, 3, 0), | ||
1207 | PLL_35XX_RATE(1300000000, 325, 6, 0), | ||
1208 | PLL_35XX_RATE(1200000000, 200, 2, 1), | ||
1209 | PLL_35XX_RATE(1100000000, 275, 3, 1), | ||
1210 | PLL_35XX_RATE(1000000000, 250, 3, 1), | ||
1211 | PLL_35XX_RATE(900000000, 150, 2, 1), | ||
1212 | PLL_35XX_RATE(800000000, 200, 3, 1), | ||
1213 | PLL_35XX_RATE(700000000, 175, 3, 1), | ||
1214 | PLL_35XX_RATE(600000000, 200, 2, 2), | ||
1215 | PLL_35XX_RATE(500000000, 250, 3, 2), | ||
1216 | PLL_35XX_RATE(400000000, 200, 3, 2), | ||
1217 | PLL_35XX_RATE(300000000, 200, 2, 3), | ||
1218 | PLL_35XX_RATE(200000000, 200, 3, 3), | ||
1219 | }; | ||
1220 | |||
1199 | static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = { | 1221 | static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = { |
1200 | [apll] = PLL(pll_2550, CLK_FOUT_APLL, "fout_apll", "fin_pll", APLL_LOCK, | 1222 | [apll] = PLL(pll_2550, CLK_FOUT_APLL, "fout_apll", "fin_pll", APLL_LOCK, |
1201 | APLL_CON0, NULL), | 1223 | APLL_CON0, NULL), |
@@ -1249,6 +1271,12 @@ static void __init exynos5x_clk_init(struct device_node *np, | |||
1249 | samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks, | 1271 | samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks, |
1250 | ARRAY_SIZE(exynos5x_fixed_rate_ext_clks), | 1272 | ARRAY_SIZE(exynos5x_fixed_rate_ext_clks), |
1251 | ext_clk_match); | 1273 | ext_clk_match); |
1274 | |||
1275 | if (_get_rate("fin_pll") == 24 * MHZ) { | ||
1276 | exynos5x_plls[apll].rate_table = exynos5420_pll2550x_24mhz_tbl; | ||
1277 | exynos5x_plls[kpll].rate_table = exynos5420_pll2550x_24mhz_tbl; | ||
1278 | } | ||
1279 | |||
1252 | samsung_clk_register_pll(ctx, exynos5x_plls, ARRAY_SIZE(exynos5x_plls), | 1280 | samsung_clk_register_pll(ctx, exynos5x_plls, ARRAY_SIZE(exynos5x_plls), |
1253 | reg_base); | 1281 | reg_base); |
1254 | samsung_clk_register_fixed_rate(ctx, exynos5x_fixed_rate_clks, | 1282 | samsung_clk_register_fixed_rate(ctx, exynos5x_fixed_rate_clks, |