aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5p64x0/clock-s5p6450.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5p64x0/clock-s5p6450.c')
-rw-r--r--arch/arm/mach-s5p64x0/clock-s5p6450.c61
1 files changed, 42 insertions, 19 deletions
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c
index f3e0ef3d27c9..154dea702d70 100644
--- a/arch/arm/mach-s5p64x0/clock-s5p6450.c
+++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c
@@ -247,24 +247,6 @@ static struct clk init_clocks_off[] = {
247 .enable = s5p64x0_pclk_ctrl, 247 .enable = s5p64x0_pclk_ctrl,
248 .ctrlbit = (1 << 22), 248 .ctrlbit = (1 << 22),
249 }, { 249 }, {
250 .name = "iis",
251 .devname = "samsung-i2s.0",
252 .parent = &clk_pclk_low.clk,
253 .enable = s5p64x0_pclk_ctrl,
254 .ctrlbit = (1 << 26),
255 }, {
256 .name = "iis",
257 .devname = "samsung-i2s.1",
258 .parent = &clk_pclk_low.clk,
259 .enable = s5p64x0_pclk_ctrl,
260 .ctrlbit = (1 << 15),
261 }, {
262 .name = "iis",
263 .devname = "samsung-i2s.2",
264 .parent = &clk_pclk_low.clk,
265 .enable = s5p64x0_pclk_ctrl,
266 .ctrlbit = (1 << 16),
267 }, {
268 .name = "i2c", 250 .name = "i2c",
269 .devname = "s3c2440-i2c.1", 251 .devname = "s3c2440-i2c.1",
270 .parent = &clk_pclk_low.clk, 252 .parent = &clk_pclk_low.clk,
@@ -402,6 +384,7 @@ static struct clksrc_sources clkset_sclk_audio0 = {
402static struct clksrc_clk clk_sclk_audio0 = { 384static struct clksrc_clk clk_sclk_audio0 = {
403 .clk = { 385 .clk = {
404 .name = "audio-bus", 386 .name = "audio-bus",
387 .devname = "samsung-i2s.0",
405 .enable = s5p64x0_sclk_ctrl, 388 .enable = s5p64x0_sclk_ctrl,
406 .ctrlbit = (1 << 8), 389 .ctrlbit = (1 << 8),
407 .parent = &clk_dout_epll.clk, 390 .parent = &clk_dout_epll.clk,
@@ -549,6 +532,36 @@ static struct clksrc_clk clk_sclk_spi1 = {
549 .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 4, .size = 4 }, 532 .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 4, .size = 4 },
550}; 533};
551 534
535static struct clk clk_i2s0 = {
536 .name = "iis",
537 .devname = "samsung-i2s.0",
538 .parent = &clk_pclk_low.clk,
539 .enable = s5p64x0_pclk_ctrl,
540 .ctrlbit = (1 << 26),
541};
542
543static struct clk clk_i2s1 = {
544 .name = "iis",
545 .devname = "samsung-i2s.1",
546 .parent = &clk_pclk_low.clk,
547 .enable = s5p64x0_pclk_ctrl,
548 .ctrlbit = (1 << 15),
549};
550
551static struct clk clk_i2s2 = {
552 .name = "iis",
553 .devname = "samsung-i2s.2",
554 .parent = &clk_pclk_low.clk,
555 .enable = s5p64x0_pclk_ctrl,
556 .ctrlbit = (1 << 16),
557};
558
559static struct clk *clk_cdev[] = {
560 &clk_i2s0,
561 &clk_i2s1,
562 &clk_i2s2,
563};
564
552static struct clksrc_clk *clksrc_cdev[] = { 565static struct clksrc_clk *clksrc_cdev[] = {
553 &clk_sclk_uclk, 566 &clk_sclk_uclk,
554 &clk_sclk_spi0, 567 &clk_sclk_spi0,
@@ -556,6 +569,7 @@ static struct clksrc_clk *clksrc_cdev[] = {
556 &clk_sclk_mmc0, 569 &clk_sclk_mmc0,
557 &clk_sclk_mmc1, 570 &clk_sclk_mmc1,
558 &clk_sclk_mmc2, 571 &clk_sclk_mmc2,
572 &clk_sclk_audio0,
559}; 573};
560 574
561static struct clk_lookup s5p6450_clk_lookup[] = { 575static struct clk_lookup s5p6450_clk_lookup[] = {
@@ -567,6 +581,10 @@ static struct clk_lookup s5p6450_clk_lookup[] = {
567 CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk), 581 CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk),
568 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk), 582 CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk),
569 CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk), 583 CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk),
584 CLKDEV_INIT("samsung-i2s.0", "i2s_opclk0", &clk_i2s0),
585 CLKDEV_INIT("samsung-i2s.0", "i2s_opclk1", &clk_sclk_audio0.clk),
586 CLKDEV_INIT("samsung-i2s.1", "i2s_opclk0", &clk_i2s1),
587 CLKDEV_INIT("samsung-i2s.2", "i2s_opclk0", &clk_i2s2),
570}; 588};
571 589
572/* Clock initialization code */ 590/* Clock initialization code */
@@ -584,7 +602,6 @@ static struct clksrc_clk *sysclks[] = {
584 &clk_pclk, 602 &clk_pclk,
585 &clk_hclk_low, 603 &clk_hclk_low,
586 &clk_pclk_low, 604 &clk_pclk_low,
587 &clk_sclk_audio0,
588}; 605};
589 606
590static struct clk dummy_apb_pclk = { 607static struct clk dummy_apb_pclk = {
@@ -661,10 +678,16 @@ void __init_or_cpufreq s5p6450_setup_clocks(void)
661void __init s5p6450_register_clocks(void) 678void __init s5p6450_register_clocks(void)
662{ 679{
663 int ptr; 680 int ptr;
681 unsigned int cnt;
664 682
665 for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) 683 for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
666 s3c_register_clksrc(sysclks[ptr], 1); 684 s3c_register_clksrc(sysclks[ptr], 1);
667 685
686
687 s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
688 for (cnt = 0; cnt < ARRAY_SIZE(clk_cdev); cnt++)
689 s3c_disable_clocks(clk_cdev[cnt], 1);
690
668 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); 691 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
669 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); 692 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
670 for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) 693 for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++)