diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-09-23 10:32:41 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-29 15:21:57 -0400 |
commit | 92b18d1cf1335a468d4014c4fdb1eb720e77526f (patch) | |
tree | 0dff8b282303c422634bd0fd84c0f582fb2595b6 /arch/arm | |
parent | 165e2161525d66a76ed2b870dedabb4c1c4714b0 (diff) |
OMAP4: hwmod data: Add watchdog timer
Add watchdog timer hwmod data for OMAP4 chip
Note: wd_timer3 in enabled in the hwmod list but it is
not yet supported by the watchdog driver.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Charulatha V <charu@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index e20b0eebc6d9..9523b4c9537f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -452,6 +452,136 @@ static struct omap_hwmod omap44xx_mpu_hwmod = { | |||
452 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 452 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
453 | }; | 453 | }; |
454 | 454 | ||
455 | /* | ||
456 | * 'wd_timer' class | ||
457 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
458 | * overflow condition | ||
459 | */ | ||
460 | |||
461 | static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = { | ||
462 | .rev_offs = 0x0000, | ||
463 | .sysc_offs = 0x0010, | ||
464 | .syss_offs = 0x0014, | ||
465 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | | ||
466 | SYSC_HAS_SOFTRESET), | ||
467 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
468 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
469 | }; | ||
470 | |||
471 | static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { | ||
472 | .name = "wd_timer", | ||
473 | .sysc = &omap44xx_wd_timer_sysc, | ||
474 | }; | ||
475 | |||
476 | /* wd_timer2 */ | ||
477 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; | ||
478 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { | ||
479 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, | ||
480 | }; | ||
481 | |||
482 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { | ||
483 | { | ||
484 | .pa_start = 0x4a314000, | ||
485 | .pa_end = 0x4a31407f, | ||
486 | .flags = ADDR_TYPE_RT | ||
487 | }, | ||
488 | }; | ||
489 | |||
490 | /* l4_wkup -> wd_timer2 */ | ||
491 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { | ||
492 | .master = &omap44xx_l4_wkup_hwmod, | ||
493 | .slave = &omap44xx_wd_timer2_hwmod, | ||
494 | .clk = "l4_wkup_clk_mux_ck", | ||
495 | .addr = omap44xx_wd_timer2_addrs, | ||
496 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs), | ||
497 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
498 | }; | ||
499 | |||
500 | /* wd_timer2 slave ports */ | ||
501 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = { | ||
502 | &omap44xx_l4_wkup__wd_timer2, | ||
503 | }; | ||
504 | |||
505 | static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | ||
506 | .name = "wd_timer2", | ||
507 | .class = &omap44xx_wd_timer_hwmod_class, | ||
508 | .mpu_irqs = omap44xx_wd_timer2_irqs, | ||
509 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs), | ||
510 | .main_clk = "wd_timer2_fck", | ||
511 | .prcm = { | ||
512 | .omap4 = { | ||
513 | .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, | ||
514 | }, | ||
515 | }, | ||
516 | .slaves = omap44xx_wd_timer2_slaves, | ||
517 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves), | ||
518 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
519 | }; | ||
520 | |||
521 | /* wd_timer3 */ | ||
522 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; | ||
523 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { | ||
524 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, | ||
525 | }; | ||
526 | |||
527 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { | ||
528 | { | ||
529 | .pa_start = 0x40130000, | ||
530 | .pa_end = 0x4013007f, | ||
531 | .flags = ADDR_TYPE_RT | ||
532 | }, | ||
533 | }; | ||
534 | |||
535 | /* l4_abe -> wd_timer3 */ | ||
536 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { | ||
537 | .master = &omap44xx_l4_abe_hwmod, | ||
538 | .slave = &omap44xx_wd_timer3_hwmod, | ||
539 | .clk = "ocp_abe_iclk", | ||
540 | .addr = omap44xx_wd_timer3_addrs, | ||
541 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs), | ||
542 | .user = OCP_USER_MPU, | ||
543 | }; | ||
544 | |||
545 | /* l4_abe -> wd_timer3 (dma) */ | ||
546 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { | ||
547 | { | ||
548 | .pa_start = 0x49030000, | ||
549 | .pa_end = 0x4903007f, | ||
550 | .flags = ADDR_TYPE_RT | ||
551 | }, | ||
552 | }; | ||
553 | |||
554 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { | ||
555 | .master = &omap44xx_l4_abe_hwmod, | ||
556 | .slave = &omap44xx_wd_timer3_hwmod, | ||
557 | .clk = "ocp_abe_iclk", | ||
558 | .addr = omap44xx_wd_timer3_dma_addrs, | ||
559 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs), | ||
560 | .user = OCP_USER_SDMA, | ||
561 | }; | ||
562 | |||
563 | /* wd_timer3 slave ports */ | ||
564 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { | ||
565 | &omap44xx_l4_abe__wd_timer3, | ||
566 | &omap44xx_l4_abe__wd_timer3_dma, | ||
567 | }; | ||
568 | |||
569 | static struct omap_hwmod omap44xx_wd_timer3_hwmod = { | ||
570 | .name = "wd_timer3", | ||
571 | .class = &omap44xx_wd_timer_hwmod_class, | ||
572 | .mpu_irqs = omap44xx_wd_timer3_irqs, | ||
573 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs), | ||
574 | .main_clk = "wd_timer3_fck", | ||
575 | .prcm = { | ||
576 | .omap4 = { | ||
577 | .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, | ||
578 | }, | ||
579 | }, | ||
580 | .slaves = omap44xx_wd_timer3_slaves, | ||
581 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves), | ||
582 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
583 | }; | ||
584 | |||
455 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | 585 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { |
456 | /* dmm class */ | 586 | /* dmm class */ |
457 | &omap44xx_dmm_hwmod, | 587 | &omap44xx_dmm_hwmod, |
@@ -472,6 +602,9 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
472 | 602 | ||
473 | /* mpu class */ | 603 | /* mpu class */ |
474 | &omap44xx_mpu_hwmod, | 604 | &omap44xx_mpu_hwmod, |
605 | /* wd_timer class */ | ||
606 | &omap44xx_wd_timer2_hwmod, | ||
607 | &omap44xx_wd_timer3_hwmod, | ||
475 | NULL, | 608 | NULL, |
476 | }; | 609 | }; |
477 | 610 | ||