aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv310
diff options
context:
space:
mode:
authorJongpill Lee <boyko.lee@samsung.com>2010-08-18 09:49:24 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-20 18:52:16 -0400
commit82260bf38f36950f413ea6beb29717a3944752c3 (patch)
treee429c66c39199e24b91c33ef49677bf39ef9b699 /arch/arm/mach-s5pv310
parent340ea1ef4b3d14d621f7a696341bf6cdf2bc188f (diff)
ARM: S5PV310: Add various clocks
This patch adds various clocks for S5PV310/S5PC210. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv310')
-rw-r--r--arch/arm/mach-s5pv310/clock.c160
-rw-r--r--arch/arm/mach-s5pv310/include/mach/regs-clock.h1
2 files changed, 160 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pv310/clock.c b/arch/arm/mach-s5pv310/clock.c
index eb087ddb3125..1f9ed85d3016 100644
--- a/arch/arm/mach-s5pv310/clock.c
+++ b/arch/arm/mach-s5pv310/clock.c
@@ -61,6 +61,26 @@ static int s5pv310_clksrc_mask_peril0_ctrl(struct clk *clk, int enable)
61 return s5p_gatectrl(S5P_CLKSRC_MASK_PERIL0, clk, enable); 61 return s5p_gatectrl(S5P_CLKSRC_MASK_PERIL0, clk, enable);
62} 62}
63 63
64static int s5pv310_clk_ip_cam_ctrl(struct clk *clk, int enable)
65{
66 return s5p_gatectrl(S5P_CLKGATE_IP_CAM, clk, enable);
67}
68
69static int s5pv310_clk_ip_image_ctrl(struct clk *clk, int enable)
70{
71 return s5p_gatectrl(S5P_CLKGATE_IP_IMAGE, clk, enable);
72}
73
74static int s5pv310_clk_ip_lcd0_ctrl(struct clk *clk, int enable)
75{
76 return s5p_gatectrl(S5P_CLKGATE_IP_LCD0, clk, enable);
77}
78
79static int s5pv310_clk_ip_lcd1_ctrl(struct clk *clk, int enable)
80{
81 return s5p_gatectrl(S5P_CLKGATE_IP_LCD1, clk, enable);
82}
83
64static int s5pv310_clk_ip_fsys_ctrl(struct clk *clk, int enable) 84static int s5pv310_clk_ip_fsys_ctrl(struct clk *clk, int enable)
65{ 85{
66 return s5p_gatectrl(S5P_CLKGATE_IP_FSYS, clk, enable); 86 return s5p_gatectrl(S5P_CLKGATE_IP_FSYS, clk, enable);
@@ -71,6 +91,11 @@ static int s5pv310_clk_ip_peril_ctrl(struct clk *clk, int enable)
71 return s5p_gatectrl(S5P_CLKGATE_IP_PERIL, clk, enable); 91 return s5p_gatectrl(S5P_CLKGATE_IP_PERIL, clk, enable);
72} 92}
73 93
94static int s5pv310_clk_ip_perir_ctrl(struct clk *clk, int enable)
95{
96 return s5p_gatectrl(S5P_CLKGATE_IP_PERIR, clk, enable);
97}
98
74/* Core list of CMU_CPU side */ 99/* Core list of CMU_CPU side */
75 100
76static struct clksrc_clk clk_mout_apll = { 101static struct clksrc_clk clk_mout_apll = {
@@ -347,6 +372,46 @@ static struct clk init_clocks_disable[] = {
347 .enable = s5pv310_clk_ip_peril_ctrl, 372 .enable = s5pv310_clk_ip_peril_ctrl,
348 .ctrlbit = (1<<24), 373 .ctrlbit = (1<<24),
349 }, { 374 }, {
375 .name = "csis",
376 .id = 0,
377 .enable = s5pv310_clk_ip_cam_ctrl,
378 .ctrlbit = (1 << 4),
379 }, {
380 .name = "csis",
381 .id = 1,
382 .enable = s5pv310_clk_ip_cam_ctrl,
383 .ctrlbit = (1 << 5),
384 }, {
385 .name = "fimc",
386 .id = 0,
387 .enable = s5pv310_clk_ip_cam_ctrl,
388 .ctrlbit = (1 << 0),
389 }, {
390 .name = "fimc",
391 .id = 1,
392 .enable = s5pv310_clk_ip_cam_ctrl,
393 .ctrlbit = (1 << 1),
394 }, {
395 .name = "fimc",
396 .id = 2,
397 .enable = s5pv310_clk_ip_cam_ctrl,
398 .ctrlbit = (1 << 2),
399 }, {
400 .name = "fimc",
401 .id = 3,
402 .enable = s5pv310_clk_ip_cam_ctrl,
403 .ctrlbit = (1 << 3),
404 }, {
405 .name = "fimd",
406 .id = 0,
407 .enable = s5pv310_clk_ip_lcd0_ctrl,
408 .ctrlbit = (1 << 0),
409 }, {
410 .name = "fimd",
411 .id = 1,
412 .enable = s5pv310_clk_ip_lcd1_ctrl,
413 .ctrlbit = (1 << 0),
414 }, {
350 .name = "hsmmc", 415 .name = "hsmmc",
351 .id = 0, 416 .id = 0,
352 .parent = &clk_aclk_133.clk, 417 .parent = &clk_aclk_133.clk,
@@ -376,7 +441,100 @@ static struct clk init_clocks_disable[] = {
376 .parent = &clk_aclk_133.clk, 441 .parent = &clk_aclk_133.clk,
377 .enable = s5pv310_clk_ip_fsys_ctrl, 442 .enable = s5pv310_clk_ip_fsys_ctrl,
378 .ctrlbit = (1 << 9), 443 .ctrlbit = (1 << 9),
379 } 444 }, {
445 .name = "sata",
446 .id = -1,
447 .enable = s5pv310_clk_ip_fsys_ctrl,
448 .ctrlbit = (1 << 10),
449 }, {
450 .name = "adc",
451 .id = -1,
452 .enable = s5pv310_clk_ip_peril_ctrl,
453 .ctrlbit = (1 << 15),
454 }, {
455 .name = "watchdog",
456 .id = -1,
457 .enable = s5pv310_clk_ip_perir_ctrl,
458 .ctrlbit = (1 << 14),
459 }, {
460 .name = "usbhost",
461 .id = -1,
462 .enable = s5pv310_clk_ip_fsys_ctrl ,
463 .ctrlbit = (1 << 12),
464 }, {
465 .name = "otg",
466 .id = -1,
467 .enable = s5pv310_clk_ip_fsys_ctrl,
468 .ctrlbit = (1 << 13),
469 }, {
470 .name = "spi",
471 .id = 0,
472 .enable = s5pv310_clk_ip_peril_ctrl,
473 .ctrlbit = (1 << 16),
474 }, {
475 .name = "spi",
476 .id = 1,
477 .enable = s5pv310_clk_ip_peril_ctrl,
478 .ctrlbit = (1 << 17),
479 }, {
480 .name = "spi",
481 .id = 2,
482 .enable = s5pv310_clk_ip_peril_ctrl,
483 .ctrlbit = (1 << 18),
484 }, {
485 .name = "fimg2d",
486 .id = -1,
487 .enable = s5pv310_clk_ip_image_ctrl,
488 .ctrlbit = (1 << 0),
489 }, {
490 .name = "i2c",
491 .id = 0,
492 .parent = &clk_aclk_100.clk,
493 .enable = s5pv310_clk_ip_peril_ctrl,
494 .ctrlbit = (1 << 6),
495 }, {
496 .name = "i2c",
497 .id = 1,
498 .parent = &clk_aclk_100.clk,
499 .enable = s5pv310_clk_ip_peril_ctrl,
500 .ctrlbit = (1 << 7),
501 }, {
502 .name = "i2c",
503 .id = 2,
504 .parent = &clk_aclk_100.clk,
505 .enable = s5pv310_clk_ip_peril_ctrl,
506 .ctrlbit = (1 << 8),
507 }, {
508 .name = "i2c",
509 .id = 3,
510 .parent = &clk_aclk_100.clk,
511 .enable = s5pv310_clk_ip_peril_ctrl,
512 .ctrlbit = (1 << 9),
513 }, {
514 .name = "i2c",
515 .id = 4,
516 .parent = &clk_aclk_100.clk,
517 .enable = s5pv310_clk_ip_peril_ctrl,
518 .ctrlbit = (1 << 10),
519 }, {
520 .name = "i2c",
521 .id = 5,
522 .parent = &clk_aclk_100.clk,
523 .enable = s5pv310_clk_ip_peril_ctrl,
524 .ctrlbit = (1 << 11),
525 }, {
526 .name = "i2c",
527 .id = 6,
528 .parent = &clk_aclk_100.clk,
529 .enable = s5pv310_clk_ip_peril_ctrl,
530 .ctrlbit = (1 << 12),
531 }, {
532 .name = "i2c",
533 .id = 7,
534 .parent = &clk_aclk_100.clk,
535 .enable = s5pv310_clk_ip_peril_ctrl,
536 .ctrlbit = (1 << 13),
537 },
380}; 538};
381 539
382static struct clk init_clocks[] = { 540static struct clk init_clocks[] = {
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-clock.h b/arch/arm/mach-s5pv310/include/mach/regs-clock.h
index eda07fd859d8..12e983c11ad4 100644
--- a/arch/arm/mach-s5pv310/include/mach/regs-clock.h
+++ b/arch/arm/mach-s5pv310/include/mach/regs-clock.h
@@ -64,6 +64,7 @@
64#define S5P_CLKGATE_IP_LCD1 S5P_CLKREG(0x0C938) 64#define S5P_CLKGATE_IP_LCD1 S5P_CLKREG(0x0C938)
65#define S5P_CLKGATE_IP_FSYS S5P_CLKREG(0x0C940) 65#define S5P_CLKGATE_IP_FSYS S5P_CLKREG(0x0C940)
66#define S5P_CLKGATE_IP_PERIL S5P_CLKREG(0x0C950) 66#define S5P_CLKGATE_IP_PERIL S5P_CLKREG(0x0C950)
67#define S5P_CLKGATE_IP_PERIR S5P_CLKREG(0x0C960)
67 68
68#define S5P_CLKSRC_CORE S5P_CLKREG(0x10200) 69#define S5P_CLKSRC_CORE S5P_CLKREG(0x10200)
69#define S5P_CLKDIV_CORE0 S5P_CLKREG(0x10500) 70#define S5P_CLKDIV_CORE0 S5P_CLKREG(0x10500)