aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2010-09-27 10:49:19 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-29 15:22:04 -0400
commitdb12ba53fe8b2d79c06bfe00589b3e98fd50cb4c (patch)
tree2f184e67ed19bbe135f5dec5c4fbcc0d195c4627 /arch/arm
parent26428b5c4f675434d52c8dc09c4c8d5e6198a6ac (diff)
OMAP4: UART: Add uart1-4 hwmods data for omap4
Add uart1-4 hwmod data into omap4_hwmod data file. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Govindraj.R <govindraj.raja@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.c235
1 files changed, 235 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..afcbd483a6c4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -452,6 +452,235 @@ 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 * 'uart' class
457 * universal asynchronous receiver/transmitter (uart)
458 */
459
460static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
461 .rev_offs = 0x0050,
462 .sysc_offs = 0x0054,
463 .syss_offs = 0x0058,
464 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
465 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
466 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
467 .sysc_fields = &omap_hwmod_sysc_type1,
468};
469
470static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
471 .name = "uart",
472 .sysc = &omap44xx_uart_sysc,
473};
474
475/* uart1 */
476static struct omap_hwmod omap44xx_uart1_hwmod;
477static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
478 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
479};
480
481static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
482 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
483 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
484};
485
486static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
487 {
488 .pa_start = 0x4806a000,
489 .pa_end = 0x4806a0ff,
490 .flags = ADDR_TYPE_RT
491 },
492};
493
494/* l4_per -> uart1 */
495static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
496 .master = &omap44xx_l4_per_hwmod,
497 .slave = &omap44xx_uart1_hwmod,
498 .clk = "l4_div_ck",
499 .addr = omap44xx_uart1_addrs,
500 .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
501 .user = OCP_USER_MPU | OCP_USER_SDMA,
502};
503
504/* uart1 slave ports */
505static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
506 &omap44xx_l4_per__uart1,
507};
508
509static struct omap_hwmod omap44xx_uart1_hwmod = {
510 .name = "uart1",
511 .class = &omap44xx_uart_hwmod_class,
512 .mpu_irqs = omap44xx_uart1_irqs,
513 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
514 .sdma_reqs = omap44xx_uart1_sdma_reqs,
515 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
516 .main_clk = "uart1_fck",
517 .prcm = {
518 .omap4 = {
519 .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
520 },
521 },
522 .slaves = omap44xx_uart1_slaves,
523 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
524 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
525};
526
527/* uart2 */
528static struct omap_hwmod omap44xx_uart2_hwmod;
529static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
530 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
531};
532
533static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
534 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
535 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
536};
537
538static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
539 {
540 .pa_start = 0x4806c000,
541 .pa_end = 0x4806c0ff,
542 .flags = ADDR_TYPE_RT
543 },
544};
545
546/* l4_per -> uart2 */
547static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
548 .master = &omap44xx_l4_per_hwmod,
549 .slave = &omap44xx_uart2_hwmod,
550 .clk = "l4_div_ck",
551 .addr = omap44xx_uart2_addrs,
552 .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
553 .user = OCP_USER_MPU | OCP_USER_SDMA,
554};
555
556/* uart2 slave ports */
557static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
558 &omap44xx_l4_per__uart2,
559};
560
561static struct omap_hwmod omap44xx_uart2_hwmod = {
562 .name = "uart2",
563 .class = &omap44xx_uart_hwmod_class,
564 .mpu_irqs = omap44xx_uart2_irqs,
565 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
566 .sdma_reqs = omap44xx_uart2_sdma_reqs,
567 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
568 .main_clk = "uart2_fck",
569 .prcm = {
570 .omap4 = {
571 .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
572 },
573 },
574 .slaves = omap44xx_uart2_slaves,
575 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
576 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
577};
578
579/* uart3 */
580static struct omap_hwmod omap44xx_uart3_hwmod;
581static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
582 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
583};
584
585static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
586 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
587 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
588};
589
590static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
591 {
592 .pa_start = 0x48020000,
593 .pa_end = 0x480200ff,
594 .flags = ADDR_TYPE_RT
595 },
596};
597
598/* l4_per -> uart3 */
599static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
600 .master = &omap44xx_l4_per_hwmod,
601 .slave = &omap44xx_uart3_hwmod,
602 .clk = "l4_div_ck",
603 .addr = omap44xx_uart3_addrs,
604 .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
605 .user = OCP_USER_MPU | OCP_USER_SDMA,
606};
607
608/* uart3 slave ports */
609static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
610 &omap44xx_l4_per__uart3,
611};
612
613static struct omap_hwmod omap44xx_uart3_hwmod = {
614 .name = "uart3",
615 .class = &omap44xx_uart_hwmod_class,
616 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
617 .mpu_irqs = omap44xx_uart3_irqs,
618 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
619 .sdma_reqs = omap44xx_uart3_sdma_reqs,
620 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
621 .main_clk = "uart3_fck",
622 .prcm = {
623 .omap4 = {
624 .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
625 },
626 },
627 .slaves = omap44xx_uart3_slaves,
628 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
629 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
630};
631
632/* uart4 */
633static struct omap_hwmod omap44xx_uart4_hwmod;
634static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
635 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
636};
637
638static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
639 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
640 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
641};
642
643static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
644 {
645 .pa_start = 0x4806e000,
646 .pa_end = 0x4806e0ff,
647 .flags = ADDR_TYPE_RT
648 },
649};
650
651/* l4_per -> uart4 */
652static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
653 .master = &omap44xx_l4_per_hwmod,
654 .slave = &omap44xx_uart4_hwmod,
655 .clk = "l4_div_ck",
656 .addr = omap44xx_uart4_addrs,
657 .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
658 .user = OCP_USER_MPU | OCP_USER_SDMA,
659};
660
661/* uart4 slave ports */
662static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
663 &omap44xx_l4_per__uart4,
664};
665
666static struct omap_hwmod omap44xx_uart4_hwmod = {
667 .name = "uart4",
668 .class = &omap44xx_uart_hwmod_class,
669 .mpu_irqs = omap44xx_uart4_irqs,
670 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
671 .sdma_reqs = omap44xx_uart4_sdma_reqs,
672 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
673 .main_clk = "uart4_fck",
674 .prcm = {
675 .omap4 = {
676 .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
677 },
678 },
679 .slaves = omap44xx_uart4_slaves,
680 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
681 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
682};
683
455static __initdata struct omap_hwmod *omap44xx_hwmods[] = { 684static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
456 /* dmm class */ 685 /* dmm class */
457 &omap44xx_dmm_hwmod, 686 &omap44xx_dmm_hwmod,
@@ -472,6 +701,12 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
472 701
473 /* mpu class */ 702 /* mpu class */
474 &omap44xx_mpu_hwmod, 703 &omap44xx_mpu_hwmod,
704
705 /* uart class */
706 &omap44xx_uart1_hwmod,
707 &omap44xx_uart2_hwmod,
708 &omap44xx_uart3_hwmod,
709 &omap44xx_uart4_hwmod,
475 NULL, 710 NULL,
476}; 711};
477 712