aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2018-02-12 20:32:38 -0500
committerTony Lindgren <tony@atomide.com>2018-02-14 13:28:12 -0500
commit5297e1d7679560212355ecb88b700be6c0bc378b (patch)
tree2af299dd5c387f7c5e6ebaf7e398880cd0a75d25
parenta0e37da2a542acb6069b9e10d8aba3be4e5204d7 (diff)
ARM: OMAP2+: Cleanup omap_i2c_dev_attr usage
The omap_i2c_dev_attr data was used to supply instance-specific data for legacy non-DT devices. The I2C legacy device support has been cleaned up in commit 65fa3e719f36 ("ARM: OMAP2+: Remove legacy i2c.c platform init code") and this data is therefore no longer needed. So, cleanup the structure and all the associated data in various hwmod data files. The i2c-omap.h header is still needed because of the need for various OMAP_I2C_IP_VERSION_x macros. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/i2c.h13
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c9
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c7
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c20
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_54xx_data.c10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c10
8 files changed, 0 insertions, 85 deletions
diff --git a/arch/arm/mach-omap2/i2c.h b/arch/arm/mach-omap2/i2c.h
index 42b6f2e7d190..f76ff790b435 100644
--- a/arch/arm/mach-omap2/i2c.h
+++ b/arch/arm/mach-omap2/i2c.h
@@ -24,19 +24,6 @@
24#ifndef __MACH_OMAP2_I2C_H 24#ifndef __MACH_OMAP2_I2C_H
25#define __MACH_OMAP2_I2C_H 25#define __MACH_OMAP2_I2C_H
26 26
27/**
28 * i2c_dev_attr - OMAP I2C controller device attributes for omap_hwmod
29 * @fifo_depth: total controller FIFO size (in bytes)
30 * @flags: differences in hardware support capability
31 *
32 * @fifo_depth represents what exists on the hardware, not what is
33 * actually configured at runtime by the device driver.
34 */
35struct omap_i2c_dev_attr {
36 u8 fifo_depth;
37 u32 flags;
38};
39
40int omap_i2c_reset(struct omap_hwmod *oh); 27int omap_i2c_reset(struct omap_hwmod *oh);
41 28
42#endif /* __MACH_OMAP2_I2C_H */ 29#endif /* __MACH_OMAP2_I2C_H */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 0afb014b211f..1fdfd4568899 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -97,13 +97,6 @@ static struct omap_hwmod_class i2c_class = {
97 .reset = &omap_i2c_reset, 97 .reset = &omap_i2c_reset,
98}; 98};
99 99
100static struct omap_i2c_dev_attr i2c_dev_attr = {
101 .flags = OMAP_I2C_FLAG_NO_FIFO |
102 OMAP_I2C_FLAG_SIMPLE_CLOCK |
103 OMAP_I2C_FLAG_16BIT_DATA_REG |
104 OMAP_I2C_FLAG_BUS_SHIFT_2,
105};
106
107/* I2C1 */ 100/* I2C1 */
108static struct omap_hwmod omap2420_i2c1_hwmod = { 101static struct omap_hwmod omap2420_i2c1_hwmod = {
109 .name = "i2c1", 102 .name = "i2c1",
@@ -116,7 +109,6 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
116 }, 109 },
117 }, 110 },
118 .class = &i2c_class, 111 .class = &i2c_class,
119 .dev_attr = &i2c_dev_attr,
120 /* 112 /*
121 * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state 113 * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state
122 * while a transfer is active seems to cause the I2C block to 114 * while a transfer is active seems to cause the I2C block to
@@ -137,7 +129,6 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
137 }, 129 },
138 }, 130 },
139 .class = &i2c_class, 131 .class = &i2c_class,
140 .dev_attr = &i2c_dev_attr,
141 .flags = HWMOD_16BIT_REG, 132 .flags = HWMOD_16BIT_REG,
142}; 133};
143 134
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 1f696bec9962..9b5a18b35ff6 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -75,12 +75,6 @@ static struct omap_hwmod_class i2c_class = {
75 .reset = &omap_i2c_reset, 75 .reset = &omap_i2c_reset,
76}; 76};
77 77
78static struct omap_i2c_dev_attr i2c_dev_attr = {
79 .fifo_depth = 8, /* bytes */
80 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
81 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
82};
83
84/* I2C1 */ 78/* I2C1 */
85static struct omap_hwmod omap2430_i2c1_hwmod = { 79static struct omap_hwmod omap2430_i2c1_hwmod = {
86 .name = "i2c1", 80 .name = "i2c1",
@@ -102,7 +96,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
102 }, 96 },
103 }, 97 },
104 .class = &i2c_class, 98 .class = &i2c_class,
105 .dev_attr = &i2c_dev_attr,
106}; 99};
107 100
108/* I2C2 */ 101/* I2C2 */
@@ -118,7 +111,6 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
118 }, 111 },
119 }, 112 },
120 .class = &i2c_class, 113 .class = &i2c_class,
121 .dev_attr = &i2c_dev_attr,
122}; 114};
123 115
124/* gpio5 */ 116/* gpio5 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index db8cd550a5bd..b1118b1124d9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -647,10 +647,6 @@ static struct omap_hwmod_class i2c_class = {
647 .reset = &omap_i2c_reset, 647 .reset = &omap_i2c_reset,
648}; 648};
649 649
650static struct omap_i2c_dev_attr i2c_dev_attr = {
651 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
652};
653
654/* i2c1 */ 650/* i2c1 */
655struct omap_hwmod am33xx_i2c1_hwmod = { 651struct omap_hwmod am33xx_i2c1_hwmod = {
656 .name = "i2c1", 652 .name = "i2c1",
@@ -663,7 +659,6 @@ struct omap_hwmod am33xx_i2c1_hwmod = {
663 .modulemode = MODULEMODE_SWCTRL, 659 .modulemode = MODULEMODE_SWCTRL,
664 }, 660 },
665 }, 661 },
666 .dev_attr = &i2c_dev_attr,
667}; 662};
668 663
669/* i2c1 */ 664/* i2c1 */
@@ -678,7 +673,6 @@ struct omap_hwmod am33xx_i2c2_hwmod = {
678 .modulemode = MODULEMODE_SWCTRL, 673 .modulemode = MODULEMODE_SWCTRL,
679 }, 674 },
680 }, 675 },
681 .dev_attr = &i2c_dev_attr,
682}; 676};
683 677
684/* i2c3 */ 678/* i2c3 */
@@ -693,7 +687,6 @@ struct omap_hwmod am33xx_i2c3_hwmod = {
693 .modulemode = MODULEMODE_SWCTRL, 687 .modulemode = MODULEMODE_SWCTRL,
694 }, 688 },
695 }, 689 },
696 .dev_attr = &i2c_dev_attr,
697}; 690};
698 691
699/* 692/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index c7ff7560f47a..1bb33d8bd2ac 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -682,11 +682,6 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
682}; 682};
683 683
684/* I2C1 */ 684/* I2C1 */
685static struct omap_i2c_dev_attr i2c1_dev_attr = {
686 .fifo_depth = 8, /* bytes */
687 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
688};
689
690static struct omap_hwmod omap3xxx_i2c1_hwmod = { 685static struct omap_hwmod omap3xxx_i2c1_hwmod = {
691 .name = "i2c1", 686 .name = "i2c1",
692 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 687 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -699,15 +694,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
699 }, 694 },
700 }, 695 },
701 .class = &i2c_class, 696 .class = &i2c_class,
702 .dev_attr = &i2c1_dev_attr,
703}; 697};
704 698
705/* I2C2 */ 699/* I2C2 */
706static struct omap_i2c_dev_attr i2c2_dev_attr = {
707 .fifo_depth = 8, /* bytes */
708 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
709};
710
711static struct omap_hwmod omap3xxx_i2c2_hwmod = { 700static struct omap_hwmod omap3xxx_i2c2_hwmod = {
712 .name = "i2c2", 701 .name = "i2c2",
713 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 702 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -720,17 +709,9 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
720 }, 709 },
721 }, 710 },
722 .class = &i2c_class, 711 .class = &i2c_class,
723 .dev_attr = &i2c2_dev_attr,
724}; 712};
725 713
726/* I2C3 */ 714/* I2C3 */
727static struct omap_i2c_dev_attr i2c3_dev_attr = {
728 .fifo_depth = 64, /* bytes */
729 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
730};
731
732
733
734static struct omap_hwmod omap3xxx_i2c3_hwmod = { 715static struct omap_hwmod omap3xxx_i2c3_hwmod = {
735 .name = "i2c3", 716 .name = "i2c3",
736 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 717 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -743,7 +724,6 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
743 }, 724 },
744 }, 725 },
745 .class = &i2c_class, 726 .class = &i2c_class,
746 .dev_attr = &i2c3_dev_attr,
747}; 727};
748 728
749/* 729/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 3afb7333b800..cb39901d611b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1381,10 +1381,6 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
1381 .reset = &omap_i2c_reset, 1381 .reset = &omap_i2c_reset,
1382}; 1382};
1383 1383
1384static struct omap_i2c_dev_attr i2c_dev_attr = {
1385 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
1386};
1387
1388/* i2c1 */ 1384/* i2c1 */
1389static struct omap_hwmod omap44xx_i2c1_hwmod = { 1385static struct omap_hwmod omap44xx_i2c1_hwmod = {
1390 .name = "i2c1", 1386 .name = "i2c1",
@@ -1399,7 +1395,6 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
1399 .modulemode = MODULEMODE_SWCTRL, 1395 .modulemode = MODULEMODE_SWCTRL,
1400 }, 1396 },
1401 }, 1397 },
1402 .dev_attr = &i2c_dev_attr,
1403}; 1398};
1404 1399
1405/* i2c2 */ 1400/* i2c2 */
@@ -1416,7 +1411,6 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
1416 .modulemode = MODULEMODE_SWCTRL, 1411 .modulemode = MODULEMODE_SWCTRL,
1417 }, 1412 },
1418 }, 1413 },
1419 .dev_attr = &i2c_dev_attr,
1420}; 1414};
1421 1415
1422/* i2c3 */ 1416/* i2c3 */
@@ -1433,7 +1427,6 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
1433 .modulemode = MODULEMODE_SWCTRL, 1427 .modulemode = MODULEMODE_SWCTRL,
1434 }, 1428 },
1435 }, 1429 },
1436 .dev_attr = &i2c_dev_attr,
1437}; 1430};
1438 1431
1439/* i2c4 */ 1432/* i2c4 */
@@ -1450,7 +1443,6 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = {
1450 .modulemode = MODULEMODE_SWCTRL, 1443 .modulemode = MODULEMODE_SWCTRL,
1451 }, 1444 },
1452 }, 1445 },
1453 .dev_attr = &i2c_dev_attr,
1454}; 1446};
1455 1447
1456/* 1448/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index 593b4bc92d99..250524fed202 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -824,11 +824,6 @@ static struct omap_hwmod_class omap54xx_i2c_hwmod_class = {
824 .rev = OMAP_I2C_IP_VERSION_2, 824 .rev = OMAP_I2C_IP_VERSION_2,
825}; 825};
826 826
827/* i2c dev_attr */
828static struct omap_i2c_dev_attr i2c_dev_attr = {
829 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
830};
831
832/* i2c1 */ 827/* i2c1 */
833static struct omap_hwmod omap54xx_i2c1_hwmod = { 828static struct omap_hwmod omap54xx_i2c1_hwmod = {
834 .name = "i2c1", 829 .name = "i2c1",
@@ -843,7 +838,6 @@ static struct omap_hwmod omap54xx_i2c1_hwmod = {
843 .modulemode = MODULEMODE_SWCTRL, 838 .modulemode = MODULEMODE_SWCTRL,
844 }, 839 },
845 }, 840 },
846 .dev_attr = &i2c_dev_attr,
847}; 841};
848 842
849/* i2c2 */ 843/* i2c2 */
@@ -860,7 +854,6 @@ static struct omap_hwmod omap54xx_i2c2_hwmod = {
860 .modulemode = MODULEMODE_SWCTRL, 854 .modulemode = MODULEMODE_SWCTRL,
861 }, 855 },
862 }, 856 },
863 .dev_attr = &i2c_dev_attr,
864}; 857};
865 858
866/* i2c3 */ 859/* i2c3 */
@@ -877,7 +870,6 @@ static struct omap_hwmod omap54xx_i2c3_hwmod = {
877 .modulemode = MODULEMODE_SWCTRL, 870 .modulemode = MODULEMODE_SWCTRL,
878 }, 871 },
879 }, 872 },
880 .dev_attr = &i2c_dev_attr,
881}; 873};
882 874
883/* i2c4 */ 875/* i2c4 */
@@ -894,7 +886,6 @@ static struct omap_hwmod omap54xx_i2c4_hwmod = {
894 .modulemode = MODULEMODE_SWCTRL, 886 .modulemode = MODULEMODE_SWCTRL,
895 }, 887 },
896 }, 888 },
897 .dev_attr = &i2c_dev_attr,
898}; 889};
899 890
900/* i2c5 */ 891/* i2c5 */
@@ -911,7 +902,6 @@ static struct omap_hwmod omap54xx_i2c5_hwmod = {
911 .modulemode = MODULEMODE_SWCTRL, 902 .modulemode = MODULEMODE_SWCTRL,
912 }, 903 },
913 }, 904 },
914 .dev_attr = &i2c_dev_attr,
915}; 905};
916 906
917/* 907/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 523e89498fd3..a78f9285cbe8 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1090,11 +1090,6 @@ static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
1090 .rev = OMAP_I2C_IP_VERSION_2, 1090 .rev = OMAP_I2C_IP_VERSION_2,
1091}; 1091};
1092 1092
1093/* i2c dev_attr */
1094static struct omap_i2c_dev_attr i2c_dev_attr = {
1095 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
1096};
1097
1098/* i2c1 */ 1093/* i2c1 */
1099static struct omap_hwmod dra7xx_i2c1_hwmod = { 1094static struct omap_hwmod dra7xx_i2c1_hwmod = {
1100 .name = "i2c1", 1095 .name = "i2c1",
@@ -1109,7 +1104,6 @@ static struct omap_hwmod dra7xx_i2c1_hwmod = {
1109 .modulemode = MODULEMODE_SWCTRL, 1104 .modulemode = MODULEMODE_SWCTRL,
1110 }, 1105 },
1111 }, 1106 },
1112 .dev_attr = &i2c_dev_attr,
1113}; 1107};
1114 1108
1115/* i2c2 */ 1109/* i2c2 */
@@ -1126,7 +1120,6 @@ static struct omap_hwmod dra7xx_i2c2_hwmod = {
1126 .modulemode = MODULEMODE_SWCTRL, 1120 .modulemode = MODULEMODE_SWCTRL,
1127 }, 1121 },
1128 }, 1122 },
1129 .dev_attr = &i2c_dev_attr,
1130}; 1123};
1131 1124
1132/* i2c3 */ 1125/* i2c3 */
@@ -1143,7 +1136,6 @@ static struct omap_hwmod dra7xx_i2c3_hwmod = {
1143 .modulemode = MODULEMODE_SWCTRL, 1136 .modulemode = MODULEMODE_SWCTRL,
1144 }, 1137 },
1145 }, 1138 },
1146 .dev_attr = &i2c_dev_attr,
1147}; 1139};
1148 1140
1149/* i2c4 */ 1141/* i2c4 */
@@ -1160,7 +1152,6 @@ static struct omap_hwmod dra7xx_i2c4_hwmod = {
1160 .modulemode = MODULEMODE_SWCTRL, 1152 .modulemode = MODULEMODE_SWCTRL,
1161 }, 1153 },
1162 }, 1154 },
1163 .dev_attr = &i2c_dev_attr,
1164}; 1155};
1165 1156
1166/* i2c5 */ 1157/* i2c5 */
@@ -1177,7 +1168,6 @@ static struct omap_hwmod dra7xx_i2c5_hwmod = {
1177 .modulemode = MODULEMODE_SWCTRL, 1168 .modulemode = MODULEMODE_SWCTRL,
1178 }, 1169 },
1179 }, 1170 },
1180 .dev_attr = &i2c_dev_attr,
1181}; 1171};
1182 1172
1183/* 1173/*