aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pc100
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-24 06:08:42 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:06:58 -0500
commit0cfb26e1fb9d7afe9c79a40a257808eafb2aff34 (patch)
treef79fb4267e4b0814b4cb3bfda69acda6bc3bd579 /arch/arm/mach-s5pc100
parentc3310fbbeb9db6967900ed22eb3d0bd0bb0e892c (diff)
ARM: SAMSUNG: register uart clocks to clock lookup list
Samsung uart driver lookups the clock using the connection id 'clk_uart_baud'. The uart clocks for all Samsung platforms are reorganized to register them with the lookup name as required by the uart driver. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r--arch/arm/mach-s5pc100/clock.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c
index 8d47709da713..9d644ece2604 100644
--- a/arch/arm/mach-s5pc100/clock.c
+++ b/arch/arm/mach-s5pc100/clock.c
@@ -962,16 +962,6 @@ static struct clksrc_clk clksrcs[] = {
962 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 12, .size = 4 }, 962 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 12, .size = 4 },
963 }, { 963 }, {
964 .clk = { 964 .clk = {
965 .name = "uclk1",
966 .ctrlbit = (1 << 3),
967 .enable = s5pc100_sclk0_ctrl,
968
969 },
970 .sources = &clk_src_group2,
971 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 },
972 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 },
973 }, {
974 .clk = {
975 .name = "sclk_mixer", 965 .name = "sclk_mixer",
976 .ctrlbit = (1 << 6), 966 .ctrlbit = (1 << 6),
977 .enable = s5pc100_sclk0_ctrl, 967 .enable = s5pc100_sclk0_ctrl,
@@ -1098,6 +1088,17 @@ static struct clksrc_clk clksrcs[] = {
1098 }, 1088 },
1099}; 1089};
1100 1090
1091static struct clksrc_clk clk_sclk_uart = {
1092 .clk = {
1093 .name = "uclk1",
1094 .ctrlbit = (1 << 3),
1095 .enable = s5pc100_sclk0_ctrl,
1096 },
1097 .sources = &clk_src_group2,
1098 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 },
1099 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 },
1100};
1101
1101/* Clock initialisation code */ 1102/* Clock initialisation code */
1102static struct clksrc_clk *sysclks[] = { 1103static struct clksrc_clk *sysclks[] = {
1103 &clk_mout_apll, 1104 &clk_mout_apll,
@@ -1127,6 +1128,10 @@ static struct clksrc_clk *sysclks[] = {
1127 &clk_sclk_spdif, 1128 &clk_sclk_spdif,
1128}; 1129};
1129 1130
1131static struct clksrc_clk *clksrc_cdev[] = {
1132 &clk_sclk_uart,
1133};
1134
1130void __init_or_cpufreq s5pc100_setup_clocks(void) 1135void __init_or_cpufreq s5pc100_setup_clocks(void)
1131{ 1136{
1132 unsigned long xtal; 1137 unsigned long xtal;
@@ -1266,6 +1271,11 @@ static struct clk *clks[] __initdata = {
1266 &clk_pcmcdclk1, 1271 &clk_pcmcdclk1,
1267}; 1272};
1268 1273
1274static struct clk_lookup s5pc100_clk_lookup[] = {
1275 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
1276 CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uart.clk),
1277};
1278
1269void __init s5pc100_register_clocks(void) 1279void __init s5pc100_register_clocks(void)
1270{ 1280{
1271 int ptr; 1281 int ptr;
@@ -1277,9 +1287,12 @@ void __init s5pc100_register_clocks(void)
1277 1287
1278 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); 1288 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
1279 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); 1289 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
1290 for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++)
1291 s3c_register_clksrc(clksrc_cdev[ptr], 1);
1280 1292
1281 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 1293 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
1282 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 1294 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
1295 clkdev_add_table(s5pc100_clk_lookup, ARRAY_SIZE(s5pc100_clk_lookup));
1283 1296
1284 s3c24xx_register_clock(&dummy_apb_pclk); 1297 s3c24xx_register_clock(&dummy_apb_pclk);
1285 1298