aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-07-19 18:03:08 -0400
committerOlof Johansson <olof@lixom.net>2014-07-19 18:03:08 -0400
commitf37ac9e5a47d72eab5185b0ddc14dfc943cc9589 (patch)
tree53577aa529e3bbe718459d0626fc6d45ada3dcdd /drivers/clk
parent4338925434e4bf5ff714055713f3fb9b5fae9037 (diff)
parentfc2cac41ebbfb16da8b036cba6ec6714ab780a6d (diff)
Merge tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
Merge "Samsung exynos cpuidle update for v3.17" from Kukjin Kim: - add callbacks exynos_suspend() and exynos_powered_up() for support cpuidle through mcpm - skip exynos_cpuidle for exynos5420 because is uses cpuidle-big-liggle generic cpuidle driver - add generic functions to calculate cpu number is used for pmu and this is required for exynos5420 multi-cluster - add of_device_id structure for big.LITTLE cpuidle and add "samsung,exynos5420" compatible string for exynos5420 * tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm ARM: EXYNOS: do not allow cpuidle registration for exynos5420 cpuidle: big.LITTLE: init driver for exynos5420 cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config ARM: EXYNOS: add generic function to calculate cpu number cpuidle: big.LITTLE: add of_device_id structure + Linux 3.16-rc5 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-s2mps11.c7
-rw-r--r--drivers/clk/qcom/mmcc-msm8960.c2
-rw-r--r--drivers/clk/samsung/clk-exynos4.c16
-rw-r--r--drivers/clk/samsung/clk-exynos5250.c2
-rw-r--r--drivers/clk/samsung/clk-exynos5420.c91
-rw-r--r--drivers/clk/samsung/clk-s3c2410.c9
-rw-r--r--drivers/clk/samsung/clk-s3c64xx.c6
-rw-r--r--drivers/clk/spear/spear3xx_clock.c16
-rw-r--r--drivers/clk/sunxi/clk-sun6i-apb0-gates.c2
-rw-r--r--drivers/clk/ti/apll.c8
-rw-r--r--drivers/clk/ti/dpll.c5
-rw-r--r--drivers/clk/ti/mux.c2
12 files changed, 97 insertions, 69 deletions
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index 9b7b5859a420..3757e9e72d37 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -230,16 +230,13 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
230 goto err_reg; 230 goto err_reg;
231 } 231 }
232 232
233 s2mps11_clk->lookup = devm_kzalloc(&pdev->dev, 233 s2mps11_clk->lookup = clkdev_alloc(s2mps11_clk->clk,
234 sizeof(struct clk_lookup), GFP_KERNEL); 234 s2mps11_name(s2mps11_clk), NULL);
235 if (!s2mps11_clk->lookup) { 235 if (!s2mps11_clk->lookup) {
236 ret = -ENOMEM; 236 ret = -ENOMEM;
237 goto err_lup; 237 goto err_lup;
238 } 238 }
239 239
240 s2mps11_clk->lookup->con_id = s2mps11_name(s2mps11_clk);
241 s2mps11_clk->lookup->clk = s2mps11_clk->clk;
242
243 clkdev_add(s2mps11_clk->lookup); 240 clkdev_add(s2mps11_clk->lookup);
244 } 241 }
245 242
diff --git a/drivers/clk/qcom/mmcc-msm8960.c b/drivers/clk/qcom/mmcc-msm8960.c
index 12f3c0b64fcd..4c449b3170f6 100644
--- a/drivers/clk/qcom/mmcc-msm8960.c
+++ b/drivers/clk/qcom/mmcc-msm8960.c
@@ -1209,7 +1209,7 @@ static struct clk_branch rot_clk = {
1209 1209
1210static u8 mmcc_pxo_hdmi_map[] = { 1210static u8 mmcc_pxo_hdmi_map[] = {
1211 [P_PXO] = 0, 1211 [P_PXO] = 0,
1212 [P_HDMI_PLL] = 2, 1212 [P_HDMI_PLL] = 3,
1213}; 1213};
1214 1214
1215static const char *mmcc_pxo_hdmi[] = { 1215static const char *mmcc_pxo_hdmi[] = {
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index 4f150c9dd38c..7f4a473a7ad7 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -925,21 +925,13 @@ static struct samsung_gate_clock exynos4x12_gate_clks[] __initdata = {
925 GATE(CLK_RTC, "rtc", "aclk100", E4X12_GATE_IP_PERIR, 15, 925 GATE(CLK_RTC, "rtc", "aclk100", E4X12_GATE_IP_PERIR, 15,
926 0, 0), 926 0, 0),
927 GATE(CLK_KEYIF, "keyif", "aclk100", E4X12_GATE_IP_PERIR, 16, 0, 0), 927 GATE(CLK_KEYIF, "keyif", "aclk100", E4X12_GATE_IP_PERIR, 16, 0, 0),
928 GATE(CLK_SCLK_PWM_ISP, "sclk_pwm_isp", "div_pwm_isp", 928 GATE(CLK_PWM_ISP_SCLK, "pwm_isp_sclk", "div_pwm_isp",
929 E4X12_SRC_MASK_ISP, 0, CLK_SET_RATE_PARENT, 0),
930 GATE(CLK_SCLK_SPI0_ISP, "sclk_spi0_isp", "div_spi0_isp_pre",
931 E4X12_SRC_MASK_ISP, 4, CLK_SET_RATE_PARENT, 0),
932 GATE(CLK_SCLK_SPI1_ISP, "sclk_spi1_isp", "div_spi1_isp_pre",
933 E4X12_SRC_MASK_ISP, 8, CLK_SET_RATE_PARENT, 0),
934 GATE(CLK_SCLK_UART_ISP, "sclk_uart_isp", "div_uart_isp",
935 E4X12_SRC_MASK_ISP, 12, CLK_SET_RATE_PARENT, 0),
936 GATE(CLK_PWM_ISP_SCLK, "pwm_isp_sclk", "sclk_pwm_isp",
937 E4X12_GATE_IP_ISP, 0, 0, 0), 929 E4X12_GATE_IP_ISP, 0, 0, 0),
938 GATE(CLK_SPI0_ISP_SCLK, "spi0_isp_sclk", "sclk_spi0_isp", 930 GATE(CLK_SPI0_ISP_SCLK, "spi0_isp_sclk", "div_spi0_isp_pre",
939 E4X12_GATE_IP_ISP, 1, 0, 0), 931 E4X12_GATE_IP_ISP, 1, 0, 0),
940 GATE(CLK_SPI1_ISP_SCLK, "spi1_isp_sclk", "sclk_spi1_isp", 932 GATE(CLK_SPI1_ISP_SCLK, "spi1_isp_sclk", "div_spi1_isp_pre",
941 E4X12_GATE_IP_ISP, 2, 0, 0), 933 E4X12_GATE_IP_ISP, 2, 0, 0),
942 GATE(CLK_UART_ISP_SCLK, "uart_isp_sclk", "sclk_uart_isp", 934 GATE(CLK_UART_ISP_SCLK, "uart_isp_sclk", "div_uart_isp",
943 E4X12_GATE_IP_ISP, 3, 0, 0), 935 E4X12_GATE_IP_ISP, 3, 0, 0),
944 GATE(CLK_WDT, "watchdog", "aclk100", E4X12_GATE_IP_PERIR, 14, 0, 0), 936 GATE(CLK_WDT, "watchdog", "aclk100", E4X12_GATE_IP_PERIR, 14, 0, 0),
945 GATE(CLK_PCM0, "pcm0", "aclk100", E4X12_GATE_IP_MAUDIO, 2, 937 GATE(CLK_PCM0, "pcm0", "aclk100", E4X12_GATE_IP_MAUDIO, 2,
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 1fad4c5e3f5d..184f64293b26 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -661,7 +661,7 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = {
661 GATE(CLK_RTC, "rtc", "div_aclk66", GATE_IP_PERIS, 20, 0, 0), 661 GATE(CLK_RTC, "rtc", "div_aclk66", GATE_IP_PERIS, 20, 0, 0),
662 GATE(CLK_TMU, "tmu", "div_aclk66", GATE_IP_PERIS, 21, 0, 0), 662 GATE(CLK_TMU, "tmu", "div_aclk66", GATE_IP_PERIS, 21, 0, 0),
663 GATE(CLK_SMMU_TV, "smmu_tv", "mout_aclk200_disp1_sub", 663 GATE(CLK_SMMU_TV, "smmu_tv", "mout_aclk200_disp1_sub",
664 GATE_IP_DISP1, 2, 0, 0), 664 GATE_IP_DISP1, 9, 0, 0),
665 GATE(CLK_SMMU_FIMD1, "smmu_fimd1", "mout_aclk200_disp1_sub", 665 GATE(CLK_SMMU_FIMD1, "smmu_fimd1", "mout_aclk200_disp1_sub",
666 GATE_IP_DISP1, 8, 0, 0), 666 GATE_IP_DISP1, 8, 0, 0),
667 GATE(CLK_SMMU_2D, "smmu_2d", "div_aclk200", GATE_IP_ACP, 7, 0, 0), 667 GATE(CLK_SMMU_2D, "smmu_2d", "div_aclk200", GATE_IP_ACP, 7, 0, 0),
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 9d7d7eed03fd..a4e6cc782e5c 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -631,7 +631,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = {
631 SRC_TOP4, 16, 1), 631 SRC_TOP4, 16, 1),
632 MUX(0, "mout_user_aclk266", mout_user_aclk266_p, SRC_TOP4, 20, 1), 632 MUX(0, "mout_user_aclk266", mout_user_aclk266_p, SRC_TOP4, 20, 1),
633 MUX(0, "mout_user_aclk166", mout_user_aclk166_p, SRC_TOP4, 24, 1), 633 MUX(0, "mout_user_aclk166", mout_user_aclk166_p, SRC_TOP4, 24, 1),
634 MUX(0, "mout_user_aclk333", mout_user_aclk333_p, SRC_TOP4, 28, 1), 634 MUX(CLK_MOUT_USER_ACLK333, "mout_user_aclk333", mout_user_aclk333_p,
635 SRC_TOP4, 28, 1),
635 636
636 MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p, 637 MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p,
637 SRC_TOP5, 0, 1), 638 SRC_TOP5, 0, 1),
@@ -684,7 +685,8 @@ static struct samsung_mux_clock exynos5x_mux_clks[] __initdata = {
684 SRC_TOP11, 12, 1), 685 SRC_TOP11, 12, 1),
685 MUX(0, "mout_sw_aclk266", mout_sw_aclk266_p, SRC_TOP11, 20, 1), 686 MUX(0, "mout_sw_aclk266", mout_sw_aclk266_p, SRC_TOP11, 20, 1),
686 MUX(0, "mout_sw_aclk166", mout_sw_aclk166_p, SRC_TOP11, 24, 1), 687 MUX(0, "mout_sw_aclk166", mout_sw_aclk166_p, SRC_TOP11, 24, 1),
687 MUX(0, "mout_sw_aclk333", mout_sw_aclk333_p, SRC_TOP11, 28, 1), 688 MUX(CLK_MOUT_SW_ACLK333, "mout_sw_aclk333", mout_sw_aclk333_p,
689 SRC_TOP11, 28, 1),
688 690
689 MUX(0, "mout_sw_aclk400_disp1", mout_sw_aclk400_disp1_p, 691 MUX(0, "mout_sw_aclk400_disp1", mout_sw_aclk400_disp1_p,
690 SRC_TOP12, 4, 1), 692 SRC_TOP12, 4, 1),
@@ -890,8 +892,6 @@ static struct samsung_gate_clock exynos5x_gate_clks[] __initdata = {
890 GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0), 892 GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0),
891 GATE(0, "aclk66_psgen", "mout_user_aclk66_psgen", 893 GATE(0, "aclk66_psgen", "mout_user_aclk66_psgen",
892 GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0), 894 GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0),
893 GATE(CLK_ACLK66_PERIC, "aclk66_peric", "mout_user_aclk66_peric",
894 GATE_BUS_TOP, 11, CLK_IGNORE_UNUSED, 0),
895 GATE(0, "aclk266_isp", "mout_user_aclk266_isp", 895 GATE(0, "aclk266_isp", "mout_user_aclk266_isp",
896 GATE_BUS_TOP, 13, 0, 0), 896 GATE_BUS_TOP, 13, 0, 0),
897 GATE(0, "aclk166", "mout_user_aclk166", 897 GATE(0, "aclk166", "mout_user_aclk166",
@@ -994,34 +994,61 @@ static struct samsung_gate_clock exynos5x_gate_clks[] __initdata = {
994 SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), 994 SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0),
995 995
996 /* PERIC Block */ 996 /* PERIC Block */
997 GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_IP_PERIC, 0, 0, 0), 997 GATE(CLK_UART0, "uart0", "mout_user_aclk66_peric",
998 GATE(CLK_UART1, "uart1", "aclk66_peric", GATE_IP_PERIC, 1, 0, 0), 998 GATE_IP_PERIC, 0, 0, 0),
999 GATE(CLK_UART2, "uart2", "aclk66_peric", GATE_IP_PERIC, 2, 0, 0), 999 GATE(CLK_UART1, "uart1", "mout_user_aclk66_peric",
1000 GATE(CLK_UART3, "uart3", "aclk66_peric", GATE_IP_PERIC, 3, 0, 0), 1000 GATE_IP_PERIC, 1, 0, 0),
1001 GATE(CLK_I2C0, "i2c0", "aclk66_peric", GATE_IP_PERIC, 6, 0, 0), 1001 GATE(CLK_UART2, "uart2", "mout_user_aclk66_peric",
1002 GATE(CLK_I2C1, "i2c1", "aclk66_peric", GATE_IP_PERIC, 7, 0, 0), 1002 GATE_IP_PERIC, 2, 0, 0),
1003 GATE(CLK_I2C2, "i2c2", "aclk66_peric", GATE_IP_PERIC, 8, 0, 0), 1003 GATE(CLK_UART3, "uart3", "mout_user_aclk66_peric",
1004 GATE(CLK_I2C3, "i2c3", "aclk66_peric", GATE_IP_PERIC, 9, 0, 0), 1004 GATE_IP_PERIC, 3, 0, 0),
1005 GATE(CLK_USI0, "usi0", "aclk66_peric", GATE_IP_PERIC, 10, 0, 0), 1005 GATE(CLK_I2C0, "i2c0", "mout_user_aclk66_peric",
1006 GATE(CLK_USI1, "usi1", "aclk66_peric", GATE_IP_PERIC, 11, 0, 0), 1006 GATE_IP_PERIC, 6, 0, 0),
1007 GATE(CLK_USI2, "usi2", "aclk66_peric", GATE_IP_PERIC, 12, 0, 0), 1007 GATE(CLK_I2C1, "i2c1", "mout_user_aclk66_peric",
1008 GATE(CLK_USI3, "usi3", "aclk66_peric", GATE_IP_PERIC, 13, 0, 0), 1008 GATE_IP_PERIC, 7, 0, 0),
1009 GATE(CLK_I2C_HDMI, "i2c_hdmi", "aclk66_peric", GATE_IP_PERIC, 14, 0, 0), 1009 GATE(CLK_I2C2, "i2c2", "mout_user_aclk66_peric",
1010 GATE(CLK_TSADC, "tsadc", "aclk66_peric", GATE_IP_PERIC, 15, 0, 0), 1010 GATE_IP_PERIC, 8, 0, 0),
1011 GATE(CLK_SPI0, "spi0", "aclk66_peric", GATE_IP_PERIC, 16, 0, 0), 1011 GATE(CLK_I2C3, "i2c3", "mout_user_aclk66_peric",
1012 GATE(CLK_SPI1, "spi1", "aclk66_peric", GATE_IP_PERIC, 17, 0, 0), 1012 GATE_IP_PERIC, 9, 0, 0),
1013 GATE(CLK_SPI2, "spi2", "aclk66_peric", GATE_IP_PERIC, 18, 0, 0), 1013 GATE(CLK_USI0, "usi0", "mout_user_aclk66_peric",
1014 GATE(CLK_I2S1, "i2s1", "aclk66_peric", GATE_IP_PERIC, 20, 0, 0), 1014 GATE_IP_PERIC, 10, 0, 0),
1015 GATE(CLK_I2S2, "i2s2", "aclk66_peric", GATE_IP_PERIC, 21, 0, 0), 1015 GATE(CLK_USI1, "usi1", "mout_user_aclk66_peric",
1016 GATE(CLK_PCM1, "pcm1", "aclk66_peric", GATE_IP_PERIC, 22, 0, 0), 1016 GATE_IP_PERIC, 11, 0, 0),
1017 GATE(CLK_PCM2, "pcm2", "aclk66_peric", GATE_IP_PERIC, 23, 0, 0), 1017 GATE(CLK_USI2, "usi2", "mout_user_aclk66_peric",
1018 GATE(CLK_PWM, "pwm", "aclk66_peric", GATE_IP_PERIC, 24, 0, 0), 1018 GATE_IP_PERIC, 12, 0, 0),
1019 GATE(CLK_SPDIF, "spdif", "aclk66_peric", GATE_IP_PERIC, 26, 0, 0), 1019 GATE(CLK_USI3, "usi3", "mout_user_aclk66_peric",
1020 GATE(CLK_USI4, "usi4", "aclk66_peric", GATE_IP_PERIC, 28, 0, 0), 1020 GATE_IP_PERIC, 13, 0, 0),
1021 GATE(CLK_USI5, "usi5", "aclk66_peric", GATE_IP_PERIC, 30, 0, 0), 1021 GATE(CLK_I2C_HDMI, "i2c_hdmi", "mout_user_aclk66_peric",
1022 GATE(CLK_USI6, "usi6", "aclk66_peric", GATE_IP_PERIC, 31, 0, 0), 1022 GATE_IP_PERIC, 14, 0, 0),
1023 1023 GATE(CLK_TSADC, "tsadc", "mout_user_aclk66_peric",
1024 GATE(CLK_KEYIF, "keyif", "aclk66_peric", GATE_BUS_PERIC, 22, 0, 0), 1024 GATE_IP_PERIC, 15, 0, 0),
1025 GATE(CLK_SPI0, "spi0", "mout_user_aclk66_peric",
1026 GATE_IP_PERIC, 16, 0, 0),
1027 GATE(CLK_SPI1, "spi1", "mout_user_aclk66_peric",
1028 GATE_IP_PERIC, 17, 0, 0),
1029 GATE(CLK_SPI2, "spi2", "mout_user_aclk66_peric",
1030 GATE_IP_PERIC, 18, 0, 0),
1031 GATE(CLK_I2S1, "i2s1", "mout_user_aclk66_peric",
1032 GATE_IP_PERIC, 20, 0, 0),
1033 GATE(CLK_I2S2, "i2s2", "mout_user_aclk66_peric",
1034 GATE_IP_PERIC, 21, 0, 0),
1035 GATE(CLK_PCM1, "pcm1", "mout_user_aclk66_peric",
1036 GATE_IP_PERIC, 22, 0, 0),
1037 GATE(CLK_PCM2, "pcm2", "mout_user_aclk66_peric",
1038 GATE_IP_PERIC, 23, 0, 0),
1039 GATE(CLK_PWM, "pwm", "mout_user_aclk66_peric",
1040 GATE_IP_PERIC, 24, 0, 0),
1041 GATE(CLK_SPDIF, "spdif", "mout_user_aclk66_peric",
1042 GATE_IP_PERIC, 26, 0, 0),
1043 GATE(CLK_USI4, "usi4", "mout_user_aclk66_peric",
1044 GATE_IP_PERIC, 28, 0, 0),
1045 GATE(CLK_USI5, "usi5", "mout_user_aclk66_peric",
1046 GATE_IP_PERIC, 30, 0, 0),
1047 GATE(CLK_USI6, "usi6", "mout_user_aclk66_peric",
1048 GATE_IP_PERIC, 31, 0, 0),
1049
1050 GATE(CLK_KEYIF, "keyif", "mout_user_aclk66_peric",
1051 GATE_BUS_PERIC, 22, 0, 0),
1025 1052
1026 /* PERIS Block */ 1053 /* PERIS Block */
1027 GATE(CLK_CHIPID, "chipid", "aclk66_psgen", 1054 GATE(CLK_CHIPID, "chipid", "aclk66_psgen",
diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c
index ba0716801db2..140f4733c02e 100644
--- a/drivers/clk/samsung/clk-s3c2410.c
+++ b/drivers/clk/samsung/clk-s3c2410.c
@@ -152,6 +152,11 @@ struct samsung_clock_alias s3c2410_common_aliases[] __initdata = {
152 ALIAS(HCLK, NULL, "hclk"), 152 ALIAS(HCLK, NULL, "hclk"),
153 ALIAS(MPLL, NULL, "mpll"), 153 ALIAS(MPLL, NULL, "mpll"),
154 ALIAS(FCLK, NULL, "fclk"), 154 ALIAS(FCLK, NULL, "fclk"),
155 ALIAS(PCLK, NULL, "watchdog"),
156 ALIAS(PCLK_SDI, NULL, "sdi"),
157 ALIAS(HCLK_NAND, NULL, "nand"),
158 ALIAS(PCLK_I2S, NULL, "iis"),
159 ALIAS(PCLK_I2C, NULL, "i2c"),
155}; 160};
156 161
157/* S3C2410 specific clocks */ 162/* S3C2410 specific clocks */
@@ -378,7 +383,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
378 if (!np) 383 if (!np)
379 s3c2410_common_clk_register_fixed_ext(ctx, xti_f); 384 s3c2410_common_clk_register_fixed_ext(ctx, xti_f);
380 385
381 if (current_soc == 2410) { 386 if (current_soc == S3C2410) {
382 if (_get_rate("xti") == 12 * MHZ) { 387 if (_get_rate("xti") == 12 * MHZ) {
383 s3c2410_plls[mpll].rate_table = pll_s3c2410_12mhz_tbl; 388 s3c2410_plls[mpll].rate_table = pll_s3c2410_12mhz_tbl;
384 s3c2410_plls[upll].rate_table = pll_s3c2410_12mhz_tbl; 389 s3c2410_plls[upll].rate_table = pll_s3c2410_12mhz_tbl;
@@ -432,7 +437,7 @@ void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
432 samsung_clk_register_fixed_factor(ctx, s3c2410_ffactor, 437 samsung_clk_register_fixed_factor(ctx, s3c2410_ffactor,
433 ARRAY_SIZE(s3c2410_ffactor)); 438 ARRAY_SIZE(s3c2410_ffactor));
434 samsung_clk_register_alias(ctx, s3c2410_aliases, 439 samsung_clk_register_alias(ctx, s3c2410_aliases,
435 ARRAY_SIZE(s3c2410_common_aliases)); 440 ARRAY_SIZE(s3c2410_aliases));
436 break; 441 break;
437 case S3C2440: 442 case S3C2440:
438 samsung_clk_register_mux(ctx, s3c2440_muxes, 443 samsung_clk_register_mux(ctx, s3c2440_muxes,
diff --git a/drivers/clk/samsung/clk-s3c64xx.c b/drivers/clk/samsung/clk-s3c64xx.c
index efa16ee592c8..8889ff1c10fc 100644
--- a/drivers/clk/samsung/clk-s3c64xx.c
+++ b/drivers/clk/samsung/clk-s3c64xx.c
@@ -418,8 +418,10 @@ static struct samsung_clock_alias s3c64xx_clock_aliases[] = {
418 ALIAS(SCLK_MMC2, "s3c-sdhci.2", "mmc_busclk.2"), 418 ALIAS(SCLK_MMC2, "s3c-sdhci.2", "mmc_busclk.2"),
419 ALIAS(SCLK_MMC1, "s3c-sdhci.1", "mmc_busclk.2"), 419 ALIAS(SCLK_MMC1, "s3c-sdhci.1", "mmc_busclk.2"),
420 ALIAS(SCLK_MMC0, "s3c-sdhci.0", "mmc_busclk.2"), 420 ALIAS(SCLK_MMC0, "s3c-sdhci.0", "mmc_busclk.2"),
421 ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi-bus"), 421 ALIAS(PCLK_SPI1, "s3c6410-spi.1", "spi_busclk0"),
422 ALIAS(SCLK_SPI0, "s3c6410-spi.0", "spi-bus"), 422 ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi_busclk2"),
423 ALIAS(PCLK_SPI0, "s3c6410-spi.0", "spi_busclk0"),
424 ALIAS(SCLK_SPI0, "s3c6410-spi.0", "spi_busclk2"),
423 ALIAS(SCLK_AUDIO1, "samsung-pcm.1", "audio-bus"), 425 ALIAS(SCLK_AUDIO1, "samsung-pcm.1", "audio-bus"),
424 ALIAS(SCLK_AUDIO1, "samsung-i2s.1", "audio-bus"), 426 ALIAS(SCLK_AUDIO1, "samsung-i2s.1", "audio-bus"),
425 ALIAS(SCLK_AUDIO0, "samsung-pcm.0", "audio-bus"), 427 ALIAS(SCLK_AUDIO0, "samsung-pcm.0", "audio-bus"),
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index c2d204315546..bb5f387774e2 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -211,7 +211,7 @@ static inline void spear310_clk_init(void) { }
211/* array of all spear 320 clock lookups */ 211/* array of all spear 320 clock lookups */
212#ifdef CONFIG_MACH_SPEAR320 212#ifdef CONFIG_MACH_SPEAR320
213 213
214#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000) 214#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010)
215#define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018) 215#define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018)
216 216
217 #define SPEAR320_UARTX_PCLK_MASK 0x1 217 #define SPEAR320_UARTX_PCLK_MASK 0x1
@@ -245,7 +245,8 @@ static const char *smii0_parents[] = { "smii_125m_pad", "ras_pll2_clk",
245 "ras_syn0_gclk", }; 245 "ras_syn0_gclk", };
246static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", }; 246static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", };
247 247
248static void __init spear320_clk_init(void __iomem *soc_config_base) 248static void __init spear320_clk_init(void __iomem *soc_config_base,
249 struct clk *ras_apb_clk)
249{ 250{
250 struct clk *clk; 251 struct clk *clk;
251 252
@@ -342,6 +343,8 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
342 SPEAR320_CONTROL_REG, UART1_PCLK_SHIFT, UART1_PCLK_MASK, 343 SPEAR320_CONTROL_REG, UART1_PCLK_SHIFT, UART1_PCLK_MASK,
343 0, &_lock); 344 0, &_lock);
344 clk_register_clkdev(clk, NULL, "a3000000.serial"); 345 clk_register_clkdev(clk, NULL, "a3000000.serial");
346 /* Enforce ras_apb_clk */
347 clk_set_parent(clk, ras_apb_clk);
345 348
346 clk = clk_register_mux(NULL, "uart2_clk", uartx_parents, 349 clk = clk_register_mux(NULL, "uart2_clk", uartx_parents,
347 ARRAY_SIZE(uartx_parents), 350 ARRAY_SIZE(uartx_parents),
@@ -349,6 +352,8 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
349 SPEAR320_EXT_CTRL_REG, SPEAR320_UART2_PCLK_SHIFT, 352 SPEAR320_EXT_CTRL_REG, SPEAR320_UART2_PCLK_SHIFT,
350 SPEAR320_UARTX_PCLK_MASK, 0, &_lock); 353 SPEAR320_UARTX_PCLK_MASK, 0, &_lock);
351 clk_register_clkdev(clk, NULL, "a4000000.serial"); 354 clk_register_clkdev(clk, NULL, "a4000000.serial");
355 /* Enforce ras_apb_clk */
356 clk_set_parent(clk, ras_apb_clk);
352 357
353 clk = clk_register_mux(NULL, "uart3_clk", uartx_parents, 358 clk = clk_register_mux(NULL, "uart3_clk", uartx_parents,
354 ARRAY_SIZE(uartx_parents), 359 ARRAY_SIZE(uartx_parents),
@@ -379,12 +384,12 @@ static void __init spear320_clk_init(void __iomem *soc_config_base)
379 clk_register_clkdev(clk, NULL, "60100000.serial"); 384 clk_register_clkdev(clk, NULL, "60100000.serial");
380} 385}
381#else 386#else
382static inline void spear320_clk_init(void __iomem *soc_config_base) { } 387static inline void spear320_clk_init(void __iomem *sb, struct clk *rc) { }
383#endif 388#endif
384 389
385void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base) 390void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base)
386{ 391{
387 struct clk *clk, *clk1; 392 struct clk *clk, *clk1, *ras_apb_clk;
388 393
389 clk = clk_register_fixed_rate(NULL, "osc_32k_clk", NULL, CLK_IS_ROOT, 394 clk = clk_register_fixed_rate(NULL, "osc_32k_clk", NULL, CLK_IS_ROOT,
390 32000); 395 32000);
@@ -613,6 +618,7 @@ void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_
613 clk = clk_register_gate(NULL, "ras_apb_clk", "apb_clk", 0, RAS_CLK_ENB, 618 clk = clk_register_gate(NULL, "ras_apb_clk", "apb_clk", 0, RAS_CLK_ENB,
614 RAS_APB_CLK_ENB, 0, &_lock); 619 RAS_APB_CLK_ENB, 0, &_lock);
615 clk_register_clkdev(clk, "ras_apb_clk", NULL); 620 clk_register_clkdev(clk, "ras_apb_clk", NULL);
621 ras_apb_clk = clk;
616 622
617 clk = clk_register_gate(NULL, "ras_32k_clk", "osc_32k_clk", 0, 623 clk = clk_register_gate(NULL, "ras_32k_clk", "osc_32k_clk", 0,
618 RAS_CLK_ENB, RAS_32K_CLK_ENB, 0, &_lock); 624 RAS_CLK_ENB, RAS_32K_CLK_ENB, 0, &_lock);
@@ -659,5 +665,5 @@ void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_
659 else if (of_machine_is_compatible("st,spear310")) 665 else if (of_machine_is_compatible("st,spear310"))
660 spear310_clk_init(); 666 spear310_clk_init();
661 else if (of_machine_is_compatible("st,spear320")) 667 else if (of_machine_is_compatible("st,spear320"))
662 spear320_clk_init(soc_config_base); 668 spear320_clk_init(soc_config_base, ras_apb_clk);
663} 669}
diff --git a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
index 44cd27c5c401..670f90d629d7 100644
--- a/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
+++ b/drivers/clk/sunxi/clk-sun6i-apb0-gates.c
@@ -29,7 +29,7 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
29 29
30 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 30 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
31 reg = devm_ioremap_resource(&pdev->dev, r); 31 reg = devm_ioremap_resource(&pdev->dev, r);
32 if (!reg) 32 if (IS_ERR(reg))
33 return PTR_ERR(reg); 33 return PTR_ERR(reg);
34 34
35 clk_parent = of_clk_get_parent_name(np, 0); 35 clk_parent = of_clk_get_parent_name(np, 0);
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 5428c9c547cd..72d97279eae1 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw)
77 if (i == MAX_APLL_WAIT_TRIES) { 77 if (i == MAX_APLL_WAIT_TRIES) {
78 pr_warn("clock: %s failed transition to '%s'\n", 78 pr_warn("clock: %s failed transition to '%s'\n",
79 clk_name, (state) ? "locked" : "bypassed"); 79 clk_name, (state) ? "locked" : "bypassed");
80 } else { 80 r = -EBUSY;
81 } else
81 pr_debug("clock: %s transition to '%s' in %d loops\n", 82 pr_debug("clock: %s transition to '%s' in %d loops\n",
82 clk_name, (state) ? "locked" : "bypassed", i); 83 clk_name, (state) ? "locked" : "bypassed", i);
83 84
84 r = 0;
85 }
86
87 return r; 85 return r;
88} 86}
89 87
@@ -338,7 +336,7 @@ static void __init of_omap2_apll_setup(struct device_node *node)
338 const char *parent_name; 336 const char *parent_name;
339 u32 val; 337 u32 val;
340 338
341 ad = kzalloc(sizeof(*clk_hw), GFP_KERNEL); 339 ad = kzalloc(sizeof(*ad), GFP_KERNEL);
342 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL); 340 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
343 init = kzalloc(sizeof(*init), GFP_KERNEL); 341 init = kzalloc(sizeof(*init), GFP_KERNEL);
344 342
diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
index abd956d5f838..79791e1bf282 100644
--- a/drivers/clk/ti/dpll.c
+++ b/drivers/clk/ti/dpll.c
@@ -161,7 +161,8 @@ cleanup:
161} 161}
162 162
163#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ 163#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
164 defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) 164 defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
165 defined(CONFIG_SOC_AM43XX)
165/** 166/**
166 * ti_clk_register_dpll_x2 - Registers a DPLLx2 clock 167 * ti_clk_register_dpll_x2 - Registers a DPLLx2 clock
167 * @node: device node for this clock 168 * @node: device node for this clock
@@ -322,7 +323,7 @@ CLK_OF_DECLARE(ti_omap4_dpll_x2_clock, "ti,omap4-dpll-x2-clock",
322 of_ti_omap4_dpll_x2_setup); 323 of_ti_omap4_dpll_x2_setup);
323#endif 324#endif
324 325
325#ifdef CONFIG_SOC_AM33XX 326#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
326static void __init of_ti_am3_dpll_x2_setup(struct device_node *node) 327static void __init of_ti_am3_dpll_x2_setup(struct device_node *node)
327{ 328{
328 ti_clk_register_dpll_x2(node, &dpll_x2_ck_ops, NULL); 329 ti_clk_register_dpll_x2(node, &dpll_x2_ck_ops, NULL);
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index 0197a478720c..e9d650e51287 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -160,7 +160,7 @@ static void of_mux_clk_setup(struct device_node *node)
160 u8 clk_mux_flags = 0; 160 u8 clk_mux_flags = 0;
161 u32 mask = 0; 161 u32 mask = 0;
162 u32 shift = 0; 162 u32 shift = 0;
163 u32 flags = 0; 163 u32 flags = CLK_SET_RATE_NO_REPARENT;
164 164
165 num_parents = of_clk_get_parent_count(node); 165 num_parents = of_clk_get_parent_count(node);
166 if (num_parents < 2) { 166 if (num_parents < 2) {