aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVaradarajan, Charulatha <charu@ti.com>2010-12-07 19:26:56 -0500
committerTony Lindgren <tony@atomide.com>2010-12-07 19:26:56 -0500
commitaeac0e441045974757e901b46719980a98c270a5 (patch)
treef464f8aa0f0970269af2e06548f6ac56314923e8 /arch
parent59c348c38fbe85e6e86c711b9a38c37315008d9e (diff)
OMAP2430: hwmod data: Add GPIO
Add GPIO hwmod data for OMAP2430 Also remove "omap24xx.h" header file as it is not required anymore. Signed-off-by: Charulatha V <charu@ti.com> Acked-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c280
1 files changed, 279 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 7cf0d3ab2a4a..f68409e9fd3e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -17,7 +17,7 @@
17#include <plat/dma.h> 17#include <plat/dma.h>
18#include <plat/serial.h> 18#include <plat/serial.h>
19#include <plat/i2c.h> 19#include <plat/i2c.h>
20#include <plat/omap24xx.h> 20#include <plat/gpio.h>
21 21
22#include "omap_hwmod_common_data.h" 22#include "omap_hwmod_common_data.h"
23 23
@@ -38,6 +38,11 @@ static struct omap_hwmod omap2430_iva_hwmod;
38static struct omap_hwmod omap2430_l3_main_hwmod; 38static struct omap_hwmod omap2430_l3_main_hwmod;
39static struct omap_hwmod omap2430_l4_core_hwmod; 39static struct omap_hwmod omap2430_l4_core_hwmod;
40static struct omap_hwmod omap2430_wd_timer2_hwmod; 40static struct omap_hwmod omap2430_wd_timer2_hwmod;
41static struct omap_hwmod omap2430_gpio1_hwmod;
42static struct omap_hwmod omap2430_gpio2_hwmod;
43static struct omap_hwmod omap2430_gpio3_hwmod;
44static struct omap_hwmod omap2430_gpio4_hwmod;
45static struct omap_hwmod omap2430_gpio5_hwmod;
41 46
42/* L3 -> L4_CORE interface */ 47/* L3 -> L4_CORE interface */
43static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { 48static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
@@ -569,6 +574,272 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
569 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 574 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
570}; 575};
571 576
577/* l4_wkup -> gpio1 */
578static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
579 {
580 .pa_start = 0x4900C000,
581 .pa_end = 0x4900C1ff,
582 .flags = ADDR_TYPE_RT
583 },
584};
585
586static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
587 .master = &omap2430_l4_wkup_hwmod,
588 .slave = &omap2430_gpio1_hwmod,
589 .clk = "gpios_ick",
590 .addr = omap2430_gpio1_addr_space,
591 .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
592 .user = OCP_USER_MPU | OCP_USER_SDMA,
593};
594
595/* l4_wkup -> gpio2 */
596static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
597 {
598 .pa_start = 0x4900E000,
599 .pa_end = 0x4900E1ff,
600 .flags = ADDR_TYPE_RT
601 },
602};
603
604static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
605 .master = &omap2430_l4_wkup_hwmod,
606 .slave = &omap2430_gpio2_hwmod,
607 .clk = "gpios_ick",
608 .addr = omap2430_gpio2_addr_space,
609 .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
610 .user = OCP_USER_MPU | OCP_USER_SDMA,
611};
612
613/* l4_wkup -> gpio3 */
614static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
615 {
616 .pa_start = 0x49010000,
617 .pa_end = 0x490101ff,
618 .flags = ADDR_TYPE_RT
619 },
620};
621
622static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
623 .master = &omap2430_l4_wkup_hwmod,
624 .slave = &omap2430_gpio3_hwmod,
625 .clk = "gpios_ick",
626 .addr = omap2430_gpio3_addr_space,
627 .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
628 .user = OCP_USER_MPU | OCP_USER_SDMA,
629};
630
631/* l4_wkup -> gpio4 */
632static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
633 {
634 .pa_start = 0x49012000,
635 .pa_end = 0x490121ff,
636 .flags = ADDR_TYPE_RT
637 },
638};
639
640static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
641 .master = &omap2430_l4_wkup_hwmod,
642 .slave = &omap2430_gpio4_hwmod,
643 .clk = "gpios_ick",
644 .addr = omap2430_gpio4_addr_space,
645 .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
646 .user = OCP_USER_MPU | OCP_USER_SDMA,
647};
648
649/* l4_core -> gpio5 */
650static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
651 {
652 .pa_start = 0x480B6000,
653 .pa_end = 0x480B61ff,
654 .flags = ADDR_TYPE_RT
655 },
656};
657
658static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
659 .master = &omap2430_l4_core_hwmod,
660 .slave = &omap2430_gpio5_hwmod,
661 .clk = "gpio5_ick",
662 .addr = omap2430_gpio5_addr_space,
663 .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
664 .user = OCP_USER_MPU | OCP_USER_SDMA,
665};
666
667/* gpio dev_attr */
668static struct omap_gpio_dev_attr gpio_dev_attr = {
669 .bank_width = 32,
670 .dbck_flag = false,
671};
672
673static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
674 .rev_offs = 0x0000,
675 .sysc_offs = 0x0010,
676 .syss_offs = 0x0014,
677 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
678 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
679 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
680 .sysc_fields = &omap_hwmod_sysc_type1,
681};
682
683/*
684 * 'gpio' class
685 * general purpose io module
686 */
687static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
688 .name = "gpio",
689 .sysc = &omap243x_gpio_sysc,
690 .rev = 0,
691};
692
693/* gpio1 */
694static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
695 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
696};
697
698static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
699 &omap2430_l4_wkup__gpio1,
700};
701
702static struct omap_hwmod omap2430_gpio1_hwmod = {
703 .name = "gpio1",
704 .mpu_irqs = omap243x_gpio1_irqs,
705 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
706 .main_clk = "gpios_fck",
707 .prcm = {
708 .omap2 = {
709 .prcm_reg_id = 1,
710 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
711 .module_offs = WKUP_MOD,
712 .idlest_reg_id = 1,
713 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
714 },
715 },
716 .slaves = omap2430_gpio1_slaves,
717 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
718 .class = &omap243x_gpio_hwmod_class,
719 .dev_attr = &gpio_dev_attr,
720 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
721};
722
723/* gpio2 */
724static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
725 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
726};
727
728static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
729 &omap2430_l4_wkup__gpio2,
730};
731
732static struct omap_hwmod omap2430_gpio2_hwmod = {
733 .name = "gpio2",
734 .mpu_irqs = omap243x_gpio2_irqs,
735 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
736 .main_clk = "gpios_fck",
737 .prcm = {
738 .omap2 = {
739 .prcm_reg_id = 1,
740 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
741 .module_offs = WKUP_MOD,
742 .idlest_reg_id = 1,
743 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
744 },
745 },
746 .slaves = omap2430_gpio2_slaves,
747 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
748 .class = &omap243x_gpio_hwmod_class,
749 .dev_attr = &gpio_dev_attr,
750 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
751};
752
753/* gpio3 */
754static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
755 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
756};
757
758static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
759 &omap2430_l4_wkup__gpio3,
760};
761
762static struct omap_hwmod omap2430_gpio3_hwmod = {
763 .name = "gpio3",
764 .mpu_irqs = omap243x_gpio3_irqs,
765 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
766 .main_clk = "gpios_fck",
767 .prcm = {
768 .omap2 = {
769 .prcm_reg_id = 1,
770 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
771 .module_offs = WKUP_MOD,
772 .idlest_reg_id = 1,
773 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
774 },
775 },
776 .slaves = omap2430_gpio3_slaves,
777 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
778 .class = &omap243x_gpio_hwmod_class,
779 .dev_attr = &gpio_dev_attr,
780 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
781};
782
783/* gpio4 */
784static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
785 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
786};
787
788static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
789 &omap2430_l4_wkup__gpio4,
790};
791
792static struct omap_hwmod omap2430_gpio4_hwmod = {
793 .name = "gpio4",
794 .mpu_irqs = omap243x_gpio4_irqs,
795 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
796 .main_clk = "gpios_fck",
797 .prcm = {
798 .omap2 = {
799 .prcm_reg_id = 1,
800 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
801 .module_offs = WKUP_MOD,
802 .idlest_reg_id = 1,
803 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
804 },
805 },
806 .slaves = omap2430_gpio4_slaves,
807 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
808 .class = &omap243x_gpio_hwmod_class,
809 .dev_attr = &gpio_dev_attr,
810 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
811};
812
813/* gpio5 */
814static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
815 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
816};
817
818static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
819 &omap2430_l4_core__gpio5,
820};
821
822static struct omap_hwmod omap2430_gpio5_hwmod = {
823 .name = "gpio5",
824 .mpu_irqs = omap243x_gpio5_irqs,
825 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
826 .main_clk = "gpio5_fck",
827 .prcm = {
828 .omap2 = {
829 .prcm_reg_id = 2,
830 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
831 .module_offs = CORE_MOD,
832 .idlest_reg_id = 2,
833 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
834 },
835 },
836 .slaves = omap2430_gpio5_slaves,
837 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
838 .class = &omap243x_gpio_hwmod_class,
839 .dev_attr = &gpio_dev_attr,
840 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
841};
842
572static __initdata struct omap_hwmod *omap2430_hwmods[] = { 843static __initdata struct omap_hwmod *omap2430_hwmods[] = {
573 &omap2430_l3_main_hwmod, 844 &omap2430_l3_main_hwmod,
574 &omap2430_l4_core_hwmod, 845 &omap2430_l4_core_hwmod,
@@ -581,6 +852,13 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
581 &omap2430_uart3_hwmod, 852 &omap2430_uart3_hwmod,
582 &omap2430_i2c1_hwmod, 853 &omap2430_i2c1_hwmod,
583 &omap2430_i2c2_hwmod, 854 &omap2430_i2c2_hwmod,
855
856 /* gpio class */
857 &omap2430_gpio1_hwmod,
858 &omap2430_gpio2_hwmod,
859 &omap2430_gpio3_hwmod,
860 &omap2430_gpio4_hwmod,
861 &omap2430_gpio5_hwmod,
584 NULL, 862 NULL,
585}; 863};
586 864