aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorVaradarajan, Charulatha <charu@ti.com>2010-12-07 19:26:57 -0500
committerTony Lindgren <tony@atomide.com>2010-12-07 19:26:57 -0500
commit70034d38fbfd0f98a49367d36aa72f776a9e663a (patch)
tree30842ff8004799b8bee287168dffb1efd9a4dab9 /arch/arm/mach-omap2
parentaeac0e441045974757e901b46719980a98c270a5 (diff)
OMAP3: hwmod data: Add GPIO
Add GPIO hwmod data for OMAP3 Also remove "omap34xx.h" header file as it is not required anymore. Signed-off-by: Charulatha V <charu@ti.com> Signed-off-by: Rajendra Nayak <rnayak@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/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c361
1 files changed, 360 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index a8bed843079c..2687be10d7aa 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -20,7 +20,7 @@
20#include <plat/serial.h> 20#include <plat/serial.h>
21#include <plat/l4_3xxx.h> 21#include <plat/l4_3xxx.h>
22#include <plat/i2c.h> 22#include <plat/i2c.h>
23#include <plat/omap34xx.h> 23#include <plat/gpio.h>
24 24
25#include "omap_hwmod_common_data.h" 25#include "omap_hwmod_common_data.h"
26 26
@@ -45,6 +45,12 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
45static struct omap_hwmod omap3xxx_i2c1_hwmod; 45static struct omap_hwmod omap3xxx_i2c1_hwmod;
46static struct omap_hwmod omap3xxx_i2c2_hwmod; 46static struct omap_hwmod omap3xxx_i2c2_hwmod;
47static struct omap_hwmod omap3xxx_i2c3_hwmod; 47static struct omap_hwmod omap3xxx_i2c3_hwmod;
48static struct omap_hwmod omap3xxx_gpio1_hwmod;
49static struct omap_hwmod omap3xxx_gpio2_hwmod;
50static struct omap_hwmod omap3xxx_gpio3_hwmod;
51static struct omap_hwmod omap3xxx_gpio4_hwmod;
52static struct omap_hwmod omap3xxx_gpio5_hwmod;
53static struct omap_hwmod omap3xxx_gpio6_hwmod;
48 54
49/* L3 -> L4_CORE interface */ 55/* L3 -> L4_CORE interface */
50static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { 56static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
@@ -739,6 +745,351 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
739 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), 745 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
740}; 746};
741 747
748/* l4_wkup -> gpio1 */
749static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
750 {
751 .pa_start = 0x48310000,
752 .pa_end = 0x483101ff,
753 .flags = ADDR_TYPE_RT
754 },
755};
756
757static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
758 .master = &omap3xxx_l4_wkup_hwmod,
759 .slave = &omap3xxx_gpio1_hwmod,
760 .addr = omap3xxx_gpio1_addrs,
761 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
762 .user = OCP_USER_MPU | OCP_USER_SDMA,
763};
764
765/* l4_per -> gpio2 */
766static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
767 {
768 .pa_start = 0x49050000,
769 .pa_end = 0x490501ff,
770 .flags = ADDR_TYPE_RT
771 },
772};
773
774static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
775 .master = &omap3xxx_l4_per_hwmod,
776 .slave = &omap3xxx_gpio2_hwmod,
777 .addr = omap3xxx_gpio2_addrs,
778 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
779 .user = OCP_USER_MPU | OCP_USER_SDMA,
780};
781
782/* l4_per -> gpio3 */
783static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
784 {
785 .pa_start = 0x49052000,
786 .pa_end = 0x490521ff,
787 .flags = ADDR_TYPE_RT
788 },
789};
790
791static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
792 .master = &omap3xxx_l4_per_hwmod,
793 .slave = &omap3xxx_gpio3_hwmod,
794 .addr = omap3xxx_gpio3_addrs,
795 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
796 .user = OCP_USER_MPU | OCP_USER_SDMA,
797};
798
799/* l4_per -> gpio4 */
800static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
801 {
802 .pa_start = 0x49054000,
803 .pa_end = 0x490541ff,
804 .flags = ADDR_TYPE_RT
805 },
806};
807
808static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
809 .master = &omap3xxx_l4_per_hwmod,
810 .slave = &omap3xxx_gpio4_hwmod,
811 .addr = omap3xxx_gpio4_addrs,
812 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
813 .user = OCP_USER_MPU | OCP_USER_SDMA,
814};
815
816/* l4_per -> gpio5 */
817static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
818 {
819 .pa_start = 0x49056000,
820 .pa_end = 0x490561ff,
821 .flags = ADDR_TYPE_RT
822 },
823};
824
825static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
826 .master = &omap3xxx_l4_per_hwmod,
827 .slave = &omap3xxx_gpio5_hwmod,
828 .addr = omap3xxx_gpio5_addrs,
829 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
830 .user = OCP_USER_MPU | OCP_USER_SDMA,
831};
832
833/* l4_per -> gpio6 */
834static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
835 {
836 .pa_start = 0x49058000,
837 .pa_end = 0x490581ff,
838 .flags = ADDR_TYPE_RT
839 },
840};
841
842static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
843 .master = &omap3xxx_l4_per_hwmod,
844 .slave = &omap3xxx_gpio6_hwmod,
845 .addr = omap3xxx_gpio6_addrs,
846 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
847 .user = OCP_USER_MPU | OCP_USER_SDMA,
848};
849
850/*
851 * 'gpio' class
852 * general purpose io module
853 */
854
855static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
856 .rev_offs = 0x0000,
857 .sysc_offs = 0x0010,
858 .syss_offs = 0x0014,
859 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
860 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
861 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
862 .sysc_fields = &omap_hwmod_sysc_type1,
863};
864
865static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
866 .name = "gpio",
867 .sysc = &omap3xxx_gpio_sysc,
868 .rev = 1,
869};
870
871/* gpio_dev_attr*/
872static struct omap_gpio_dev_attr gpio_dev_attr = {
873 .bank_width = 32,
874 .dbck_flag = true,
875};
876
877/* gpio1 */
878static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
879 { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
880};
881
882static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
883 { .role = "dbclk", .clk = "gpio1_dbck", },
884};
885
886static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
887 &omap3xxx_l4_wkup__gpio1,
888};
889
890static struct omap_hwmod omap3xxx_gpio1_hwmod = {
891 .name = "gpio1",
892 .mpu_irqs = omap3xxx_gpio1_irqs,
893 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
894 .main_clk = "gpio1_ick",
895 .opt_clks = gpio1_opt_clks,
896 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
897 .prcm = {
898 .omap2 = {
899 .prcm_reg_id = 1,
900 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
901 .module_offs = WKUP_MOD,
902 .idlest_reg_id = 1,
903 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
904 },
905 },
906 .slaves = omap3xxx_gpio1_slaves,
907 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
908 .class = &omap3xxx_gpio_hwmod_class,
909 .dev_attr = &gpio_dev_attr,
910 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
911};
912
913/* gpio2 */
914static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
915 { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
916};
917
918static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
919 { .role = "dbclk", .clk = "gpio2_dbck", },
920};
921
922static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
923 &omap3xxx_l4_per__gpio2,
924};
925
926static struct omap_hwmod omap3xxx_gpio2_hwmod = {
927 .name = "gpio2",
928 .mpu_irqs = omap3xxx_gpio2_irqs,
929 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
930 .main_clk = "gpio2_ick",
931 .opt_clks = gpio2_opt_clks,
932 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
933 .prcm = {
934 .omap2 = {
935 .prcm_reg_id = 1,
936 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
937 .module_offs = OMAP3430_PER_MOD,
938 .idlest_reg_id = 1,
939 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
940 },
941 },
942 .slaves = omap3xxx_gpio2_slaves,
943 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
944 .class = &omap3xxx_gpio_hwmod_class,
945 .dev_attr = &gpio_dev_attr,
946 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
947};
948
949/* gpio3 */
950static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
951 { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
952};
953
954static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
955 { .role = "dbclk", .clk = "gpio3_dbck", },
956};
957
958static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
959 &omap3xxx_l4_per__gpio3,
960};
961
962static struct omap_hwmod omap3xxx_gpio3_hwmod = {
963 .name = "gpio3",
964 .mpu_irqs = omap3xxx_gpio3_irqs,
965 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
966 .main_clk = "gpio3_ick",
967 .opt_clks = gpio3_opt_clks,
968 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
969 .prcm = {
970 .omap2 = {
971 .prcm_reg_id = 1,
972 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
973 .module_offs = OMAP3430_PER_MOD,
974 .idlest_reg_id = 1,
975 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
976 },
977 },
978 .slaves = omap3xxx_gpio3_slaves,
979 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
980 .class = &omap3xxx_gpio_hwmod_class,
981 .dev_attr = &gpio_dev_attr,
982 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
983};
984
985/* gpio4 */
986static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
987 { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
988};
989
990static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
991 { .role = "dbclk", .clk = "gpio4_dbck", },
992};
993
994static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
995 &omap3xxx_l4_per__gpio4,
996};
997
998static struct omap_hwmod omap3xxx_gpio4_hwmod = {
999 .name = "gpio4",
1000 .mpu_irqs = omap3xxx_gpio4_irqs,
1001 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
1002 .main_clk = "gpio4_ick",
1003 .opt_clks = gpio4_opt_clks,
1004 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
1005 .prcm = {
1006 .omap2 = {
1007 .prcm_reg_id = 1,
1008 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
1009 .module_offs = OMAP3430_PER_MOD,
1010 .idlest_reg_id = 1,
1011 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
1012 },
1013 },
1014 .slaves = omap3xxx_gpio4_slaves,
1015 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
1016 .class = &omap3xxx_gpio_hwmod_class,
1017 .dev_attr = &gpio_dev_attr,
1018 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1019};
1020
1021/* gpio5 */
1022static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
1023 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
1024};
1025
1026static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1027 { .role = "dbclk", .clk = "gpio5_dbck", },
1028};
1029
1030static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
1031 &omap3xxx_l4_per__gpio5,
1032};
1033
1034static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1035 .name = "gpio5",
1036 .mpu_irqs = omap3xxx_gpio5_irqs,
1037 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
1038 .main_clk = "gpio5_ick",
1039 .opt_clks = gpio5_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
1041 .prcm = {
1042 .omap2 = {
1043 .prcm_reg_id = 1,
1044 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
1045 .module_offs = OMAP3430_PER_MOD,
1046 .idlest_reg_id = 1,
1047 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
1048 },
1049 },
1050 .slaves = omap3xxx_gpio5_slaves,
1051 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
1052 .class = &omap3xxx_gpio_hwmod_class,
1053 .dev_attr = &gpio_dev_attr,
1054 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1055};
1056
1057/* gpio6 */
1058static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
1059 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
1060};
1061
1062static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1063 { .role = "dbclk", .clk = "gpio6_dbck", },
1064};
1065
1066static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
1067 &omap3xxx_l4_per__gpio6,
1068};
1069
1070static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1071 .name = "gpio6",
1072 .mpu_irqs = omap3xxx_gpio6_irqs,
1073 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
1074 .main_clk = "gpio6_ick",
1075 .opt_clks = gpio6_opt_clks,
1076 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1077 .prcm = {
1078 .omap2 = {
1079 .prcm_reg_id = 1,
1080 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1081 .module_offs = OMAP3430_PER_MOD,
1082 .idlest_reg_id = 1,
1083 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1084 },
1085 },
1086 .slaves = omap3xxx_gpio6_slaves,
1087 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
1088 .class = &omap3xxx_gpio_hwmod_class,
1089 .dev_attr = &gpio_dev_attr,
1090 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1091};
1092
742static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { 1093static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
743 &omap3xxx_l3_main_hwmod, 1094 &omap3xxx_l3_main_hwmod,
744 &omap3xxx_l4_core_hwmod, 1095 &omap3xxx_l4_core_hwmod,
@@ -754,6 +1105,14 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
754 &omap3xxx_i2c1_hwmod, 1105 &omap3xxx_i2c1_hwmod,
755 &omap3xxx_i2c2_hwmod, 1106 &omap3xxx_i2c2_hwmod,
756 &omap3xxx_i2c3_hwmod, 1107 &omap3xxx_i2c3_hwmod,
1108
1109 /* gpio class */
1110 &omap3xxx_gpio1_hwmod,
1111 &omap3xxx_gpio2_hwmod,
1112 &omap3xxx_gpio3_hwmod,
1113 &omap3xxx_gpio4_hwmod,
1114 &omap3xxx_gpio5_hwmod,
1115 &omap3xxx_gpio6_hwmod,
757 NULL, 1116 NULL,
758}; 1117};
759 1118