diff options
Diffstat (limited to 'arch/arm/mach-exynos/clock-exynos5.c')
-rw-r--r-- | arch/arm/mach-exynos/clock-exynos5.c | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index fefa336be2b4..774533c67066 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -131,6 +131,11 @@ static int exynos5_clksrc_mask_peric0_ctrl(struct clk *clk, int enable) | |||
131 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC0, clk, enable); | 131 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC0, clk, enable); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int exynos5_clksrc_mask_peric1_ctrl(struct clk *clk, int enable) | ||
135 | { | ||
136 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC1, clk, enable); | ||
137 | } | ||
138 | |||
134 | static int exynos5_clk_ip_acp_ctrl(struct clk *clk, int enable) | 139 | static int exynos5_clk_ip_acp_ctrl(struct clk *clk, int enable) |
135 | { | 140 | { |
136 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ACP, clk, enable); | 141 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ACP, clk, enable); |
@@ -741,6 +746,24 @@ static struct clk exynos5_init_clocks_off[] = { | |||
741 | .enable = exynos5_clk_ip_peric_ctrl, | 746 | .enable = exynos5_clk_ip_peric_ctrl, |
742 | .ctrlbit = (1 << 14), | 747 | .ctrlbit = (1 << 14), |
743 | }, { | 748 | }, { |
749 | .name = "spi", | ||
750 | .devname = "exynos4210-spi.0", | ||
751 | .parent = &exynos5_clk_aclk_66.clk, | ||
752 | .enable = exynos5_clk_ip_peric_ctrl, | ||
753 | .ctrlbit = (1 << 16), | ||
754 | }, { | ||
755 | .name = "spi", | ||
756 | .devname = "exynos4210-spi.1", | ||
757 | .parent = &exynos5_clk_aclk_66.clk, | ||
758 | .enable = exynos5_clk_ip_peric_ctrl, | ||
759 | .ctrlbit = (1 << 17), | ||
760 | }, { | ||
761 | .name = "spi", | ||
762 | .devname = "exynos4210-spi.2", | ||
763 | .parent = &exynos5_clk_aclk_66.clk, | ||
764 | .enable = exynos5_clk_ip_peric_ctrl, | ||
765 | .ctrlbit = (1 << 18), | ||
766 | }, { | ||
744 | .name = SYSMMU_CLOCK_NAME, | 767 | .name = SYSMMU_CLOCK_NAME, |
745 | .devname = SYSMMU_CLOCK_DEVNAME(mfc_l, 0), | 768 | .devname = SYSMMU_CLOCK_DEVNAME(mfc_l, 0), |
746 | .enable = &exynos5_clk_ip_mfc_ctrl, | 769 | .enable = &exynos5_clk_ip_mfc_ctrl, |
@@ -1034,6 +1057,69 @@ static struct clksrc_clk exynos5_clk_sclk_mmc3 = { | |||
1034 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 24, .size = 8 }, | 1057 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 24, .size = 8 }, |
1035 | }; | 1058 | }; |
1036 | 1059 | ||
1060 | static struct clksrc_clk exynos5_clk_mdout_spi0 = { | ||
1061 | .clk = { | ||
1062 | .name = "mdout_spi", | ||
1063 | .devname = "exynos4210-spi.0", | ||
1064 | }, | ||
1065 | .sources = &exynos5_clkset_group, | ||
1066 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 16, .size = 4 }, | ||
1067 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 0, .size = 4 }, | ||
1068 | }; | ||
1069 | |||
1070 | static struct clksrc_clk exynos5_clk_mdout_spi1 = { | ||
1071 | .clk = { | ||
1072 | .name = "mdout_spi", | ||
1073 | .devname = "exynos4210-spi.1", | ||
1074 | }, | ||
1075 | .sources = &exynos5_clkset_group, | ||
1076 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 20, .size = 4 }, | ||
1077 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 16, .size = 4 }, | ||
1078 | }; | ||
1079 | |||
1080 | static struct clksrc_clk exynos5_clk_mdout_spi2 = { | ||
1081 | .clk = { | ||
1082 | .name = "mdout_spi", | ||
1083 | .devname = "exynos4210-spi.2", | ||
1084 | }, | ||
1085 | .sources = &exynos5_clkset_group, | ||
1086 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 24, .size = 4 }, | ||
1087 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 0, .size = 4 }, | ||
1088 | }; | ||
1089 | |||
1090 | static struct clksrc_clk exynos5_clk_sclk_spi0 = { | ||
1091 | .clk = { | ||
1092 | .name = "sclk_spi", | ||
1093 | .devname = "exynos4210-spi.0", | ||
1094 | .parent = &exynos5_clk_mdout_spi0.clk, | ||
1095 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
1096 | .ctrlbit = (1 << 16), | ||
1097 | }, | ||
1098 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 8, .size = 8 }, | ||
1099 | }; | ||
1100 | |||
1101 | static struct clksrc_clk exynos5_clk_sclk_spi1 = { | ||
1102 | .clk = { | ||
1103 | .name = "sclk_spi", | ||
1104 | .devname = "exynos4210-spi.1", | ||
1105 | .parent = &exynos5_clk_mdout_spi1.clk, | ||
1106 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
1107 | .ctrlbit = (1 << 20), | ||
1108 | }, | ||
1109 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 24, .size = 8 }, | ||
1110 | }; | ||
1111 | |||
1112 | static struct clksrc_clk exynos5_clk_sclk_spi2 = { | ||
1113 | .clk = { | ||
1114 | .name = "sclk_spi", | ||
1115 | .devname = "exynos4210-spi.2", | ||
1116 | .parent = &exynos5_clk_mdout_spi2.clk, | ||
1117 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
1118 | .ctrlbit = (1 << 24), | ||
1119 | }, | ||
1120 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, | ||
1121 | }; | ||
1122 | |||
1037 | static struct clksrc_clk exynos5_clksrcs[] = { | 1123 | static struct clksrc_clk exynos5_clksrcs[] = { |
1038 | { | 1124 | { |
1039 | .clk = { | 1125 | .clk = { |
@@ -1148,6 +1234,12 @@ static struct clksrc_clk *exynos5_sysclks[] = { | |||
1148 | &exynos5_clk_dout_mmc4, | 1234 | &exynos5_clk_dout_mmc4, |
1149 | &exynos5_clk_aclk_acp, | 1235 | &exynos5_clk_aclk_acp, |
1150 | &exynos5_clk_pclk_acp, | 1236 | &exynos5_clk_pclk_acp, |
1237 | &exynos5_clk_sclk_spi0, | ||
1238 | &exynos5_clk_sclk_spi1, | ||
1239 | &exynos5_clk_sclk_spi2, | ||
1240 | &exynos5_clk_mdout_spi0, | ||
1241 | &exynos5_clk_mdout_spi1, | ||
1242 | &exynos5_clk_mdout_spi2, | ||
1151 | }; | 1243 | }; |
1152 | 1244 | ||
1153 | static struct clk *exynos5_clk_cdev[] = { | 1245 | static struct clk *exynos5_clk_cdev[] = { |
@@ -1176,6 +1268,9 @@ static struct clk_lookup exynos5_clk_lookup[] = { | |||
1176 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), | 1268 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), |
1177 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), | 1269 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), |
1178 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), | 1270 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), |
1271 | CLKDEV_INIT("exynos4210-spi.0", "spi_busclk0", &exynos5_clk_sclk_spi0.clk), | ||
1272 | CLKDEV_INIT("exynos4210-spi.1", "spi_busclk0", &exynos5_clk_sclk_spi1.clk), | ||
1273 | CLKDEV_INIT("exynos4210-spi.2", "spi_busclk0", &exynos5_clk_sclk_spi2.clk), | ||
1179 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), | 1274 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), |
1180 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), | 1275 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), |
1181 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), | 1276 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), |