aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos
diff options
context:
space:
mode:
authorRajeshwari Shinde <rajeshwari.s@samsung.com>2011-10-24 11:05:58 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:09:16 -0500
commita361d10a2b490812b051433b1aad5b4351372597 (patch)
tree7132392c01d78d275d12313056803e15e97c5f6b /arch/arm/mach-exynos
parenta60879e7ca17ea41bacd57e3cb2b56e48135f7a3 (diff)
ARM: SAMSUNG: Add lookup of sdhci-s3c clocks using generic names
Add support for lookup of sdhci-s3c controller clocks using generic names for s3c2416, s3c64xx, s5pc100, s5pv210 and exynos4 SoC's. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> [kgene.kim@samsung.com: fixed trailing whitespace] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r--arch/arm/mach-exynos/clock.c88
1 files changed, 52 insertions, 36 deletions
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
index 7dee8694486a..5d8d4831e244 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -1156,42 +1156,6 @@ static struct clksrc_clk clksrcs[] = {
1156 .reg_div = { .reg = S5P_CLKDIV_MFC, .shift = 0, .size = 4 }, 1156 .reg_div = { .reg = S5P_CLKDIV_MFC, .shift = 0, .size = 4 },
1157 }, { 1157 }, {
1158 .clk = { 1158 .clk = {
1159 .name = "sclk_mmc",
1160 .devname = "s3c-sdhci.0",
1161 .parent = &clk_dout_mmc0.clk,
1162 .enable = exynos4_clksrc_mask_fsys_ctrl,
1163 .ctrlbit = (1 << 0),
1164 },
1165 .reg_div = { .reg = S5P_CLKDIV_FSYS1, .shift = 8, .size = 8 },
1166 }, {
1167 .clk = {
1168 .name = "sclk_mmc",
1169 .devname = "s3c-sdhci.1",
1170 .parent = &clk_dout_mmc1.clk,
1171 .enable = exynos4_clksrc_mask_fsys_ctrl,
1172 .ctrlbit = (1 << 4),
1173 },
1174 .reg_div = { .reg = S5P_CLKDIV_FSYS1, .shift = 24, .size = 8 },
1175 }, {
1176 .clk = {
1177 .name = "sclk_mmc",
1178 .devname = "s3c-sdhci.2",
1179 .parent = &clk_dout_mmc2.clk,
1180 .enable = exynos4_clksrc_mask_fsys_ctrl,
1181 .ctrlbit = (1 << 8),
1182 },
1183 .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 8, .size = 8 },
1184 }, {
1185 .clk = {
1186 .name = "sclk_mmc",
1187 .devname = "s3c-sdhci.3",
1188 .parent = &clk_dout_mmc3.clk,
1189 .enable = exynos4_clksrc_mask_fsys_ctrl,
1190 .ctrlbit = (1 << 12),
1191 },
1192 .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 },
1193 }, {
1194 .clk = {
1195 .name = "sclk_dwmmc", 1159 .name = "sclk_dwmmc",
1196 .parent = &clk_dout_mmc4.clk, 1160 .parent = &clk_dout_mmc4.clk,
1197 .enable = exynos4_clksrc_mask_fsys_ctrl, 1161 .enable = exynos4_clksrc_mask_fsys_ctrl,
@@ -1249,6 +1213,50 @@ static struct clksrc_clk clk_sclk_uart3 = {
1249 .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 12, .size = 4 }, 1213 .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 12, .size = 4 },
1250}; 1214};
1251 1215
1216static struct clksrc_clk clk_sclk_mmc0 = {
1217 .clk = {
1218 .name = "sclk_mmc",
1219 .devname = "s3c-sdhci.0",
1220 .parent = &clk_dout_mmc0.clk,
1221 .enable = exynos4_clksrc_mask_fsys_ctrl,
1222 .ctrlbit = (1 << 0),
1223 },
1224 .reg_div = { .reg = S5P_CLKDIV_FSYS1, .shift = 8, .size = 8 },
1225};
1226
1227static struct clksrc_clk clk_sclk_mmc1 = {
1228 .clk = {
1229 .name = "sclk_mmc",
1230 .devname = "s3c-sdhci.1",
1231 .parent = &clk_dout_mmc1.clk,
1232 .enable = exynos4_clksrc_mask_fsys_ctrl,
1233 .ctrlbit = (1 << 4),
1234 },
1235 .reg_div = { .reg = S5P_CLKDIV_FSYS1, .shift = 24, .size = 8 },
1236};
1237
1238static struct clksrc_clk clk_sclk_mmc2 = {
1239 .clk = {
1240 .name = "sclk_mmc",
1241 .devname = "s3c-sdhci.2",
1242 .parent = &clk_dout_mmc2.clk,
1243 .enable = exynos4_clksrc_mask_fsys_ctrl,
1244 .ctrlbit = (1 << 8),
1245 },
1246 .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 8, .size = 8 },
1247};
1248
1249static struct clksrc_clk clk_sclk_mmc3 = {
1250 .clk = {
1251 .name = "sclk_mmc",
1252 .devname = "s3c-sdhci.3",
1253 .parent = &clk_dout_mmc3.clk,
1254 .enable = exynos4_clksrc_mask_fsys_ctrl,
1255 .ctrlbit = (1 << 12),
1256 },
1257 .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 },
1258};
1259
1252/* Clock initialization code */ 1260/* Clock initialization code */
1253static struct clksrc_clk *sysclks[] = { 1261static struct clksrc_clk *sysclks[] = {
1254 &clk_mout_apll, 1262 &clk_mout_apll,
@@ -1293,6 +1301,10 @@ static struct clksrc_clk *clksrc_cdev[] = {
1293 &clk_sclk_uart1, 1301 &clk_sclk_uart1,
1294 &clk_sclk_uart2, 1302 &clk_sclk_uart2,
1295 &clk_sclk_uart3, 1303 &clk_sclk_uart3,
1304 &clk_sclk_mmc0,
1305 &clk_sclk_mmc1,
1306 &clk_sclk_mmc2,
1307 &clk_sclk_mmc3,
1296}; 1308};
1297 1309
1298static struct clk_lookup exynos4_clk_lookup[] = { 1310static struct clk_lookup exynos4_clk_lookup[] = {
@@ -1300,6 +1312,10 @@ static struct clk_lookup exynos4_clk_lookup[] = {
1300 CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &clk_sclk_uart1.clk), 1312 CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &clk_sclk_uart1.clk),
1301 CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &clk_sclk_uart2.clk), 1313 CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &clk_sclk_uart2.clk),
1302 CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &clk_sclk_uart3.clk), 1314 CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &clk_sclk_uart3.clk),
1315 CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk),
1316 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk),
1317 CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk),
1318 CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &clk_sclk_mmc3.clk),
1303 CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0), 1319 CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0),
1304 CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1), 1320 CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1),
1305}; 1321};