aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-08-26 13:09:10 -0400
committerMike Turquette <mturquette@linaro.org>2013-09-06 16:34:01 -0400
commitefb19a85cb0b44c06ed5ff7c397341ab852148e5 (patch)
tree8d16afce3f44f1d79057726bcfb5c4af99d82edd
parent5fadfc7ed37efe272983639f0d2f8c801303e796 (diff)
clk: samsung: exynos4: Register PLL rate tables for Exynos4x12
This patch adds rate tables for PLLs that can be reconfigured at runtime for Exynos4x12 SoCs. Provided tables contain PLL coefficients for input clock of 24 MHz and so are registered only in this case. MPLL does not need runtime reconfiguration and so table for it is not provided. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r--drivers/clk/samsung/clk-exynos4.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index c6796aff2421..bf5e5e1e99d9 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -1022,6 +1022,46 @@ static struct samsung_pll_rate_table exynos4210_vpll_rates[] __initdata = {
1022 { /* sentinel */ } 1022 { /* sentinel */ }
1023}; 1023};
1024 1024
1025static struct samsung_pll_rate_table exynos4x12_apll_rates[] __initdata = {
1026 PLL_35XX_RATE(1500000000, 250, 4, 0),
1027 PLL_35XX_RATE(1400000000, 175, 3, 0),
1028 PLL_35XX_RATE(1300000000, 325, 6, 0),
1029 PLL_35XX_RATE(1200000000, 200, 4, 0),
1030 PLL_35XX_RATE(1100000000, 275, 6, 0),
1031 PLL_35XX_RATE(1000000000, 125, 3, 0),
1032 PLL_35XX_RATE( 900000000, 150, 4, 0),
1033 PLL_35XX_RATE( 800000000, 100, 3, 0),
1034 PLL_35XX_RATE( 700000000, 175, 3, 1),
1035 PLL_35XX_RATE( 600000000, 200, 4, 1),
1036 PLL_35XX_RATE( 500000000, 125, 3, 1),
1037 PLL_35XX_RATE( 400000000, 100, 3, 1),
1038 PLL_35XX_RATE( 300000000, 200, 4, 2),
1039 PLL_35XX_RATE( 200000000, 100, 3, 2),
1040 { /* sentinel */ }
1041};
1042
1043static struct samsung_pll_rate_table exynos4x12_epll_rates[] __initdata = {
1044 PLL_36XX_RATE(192000000, 48, 3, 1, 0),
1045 PLL_36XX_RATE(180633605, 45, 3, 1, 10381),
1046 PLL_36XX_RATE(180000000, 45, 3, 1, 0),
1047 PLL_36XX_RATE( 73727996, 73, 3, 3, 47710),
1048 PLL_36XX_RATE( 67737602, 90, 4, 3, 20762),
1049 PLL_36XX_RATE( 49151992, 49, 3, 3, 9961),
1050 PLL_36XX_RATE( 45158401, 45, 3, 3, 10381),
1051 { /* sentinel */ }
1052};
1053
1054static struct samsung_pll_rate_table exynos4x12_vpll_rates[] __initdata = {
1055 PLL_36XX_RATE(533000000, 133, 3, 1, 16384),
1056 PLL_36XX_RATE(440000000, 110, 3, 1, 0),
1057 PLL_36XX_RATE(350000000, 175, 3, 2, 0),
1058 PLL_36XX_RATE(266000000, 133, 3, 2, 0),
1059 PLL_36XX_RATE(160000000, 160, 3, 3, 0),
1060 PLL_36XX_RATE(106031250, 53, 3, 2, 1024),
1061 PLL_36XX_RATE( 53015625, 53, 3, 3, 1024),
1062 { /* sentinel */ }
1063};
1064
1025static struct samsung_pll_clock exynos4210_plls[nr_plls] __initdata = { 1065static struct samsung_pll_clock exynos4210_plls[nr_plls] __initdata = {
1026 [apll] = PLL_A(pll_4508, fout_apll, "fout_apll", "fin_pll", APLL_LOCK, 1066 [apll] = PLL_A(pll_4508, fout_apll, "fout_apll", "fin_pll", APLL_LOCK,
1027 APLL_CON0, "fout_apll", NULL), 1067 APLL_CON0, "fout_apll", NULL),
@@ -1086,6 +1126,15 @@ static void __init exynos4_clk_init(struct device_node *np,
1086 samsung_clk_register_pll(exynos4210_plls, 1126 samsung_clk_register_pll(exynos4210_plls,
1087 ARRAY_SIZE(exynos4210_plls), reg_base); 1127 ARRAY_SIZE(exynos4210_plls), reg_base);
1088 } else { 1128 } else {
1129 if (_get_rate("fin_pll") == 24000000) {
1130 exynos4x12_plls[apll].rate_table =
1131 exynos4x12_apll_rates;
1132 exynos4x12_plls[epll].rate_table =
1133 exynos4x12_epll_rates;
1134 exynos4x12_plls[vpll].rate_table =
1135 exynos4x12_vpll_rates;
1136 }
1137
1089 samsung_clk_register_pll(exynos4x12_plls, 1138 samsung_clk_register_pll(exynos4x12_plls,
1090 ARRAY_SIZE(exynos4x12_plls), reg_base); 1139 ARRAY_SIZE(exynos4x12_plls), reg_base);
1091 } 1140 }