diff options
author | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:32 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:32 -0500 |
commit | 4896e3940a063fb03195d05806d28970dc3f102b (patch) | |
tree | f3ce32ae903d1ddb831d212d73a93b91c25da03d /arch/arm/mach-omap2/usb-ehci.c | |
parent | b63128e81214cc2db2995d690438055c26d213a5 (diff) |
omap: mux: Replace omap_cfg_reg() with new style signal or gpio functions
Replace omap_cfg_reg() with new style signal or gpio functions
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-ehci.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-ehci.c | 166 |
1 files changed, 106 insertions, 60 deletions
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index e448abd5ec5d..f1df873d59db 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
28 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
29 | 29 | ||
30 | #include "mux.h" | ||
31 | |||
30 | #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) | 32 | #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) |
31 | 33 | ||
32 | static struct resource ehci_resources[] = { | 34 | static struct resource ehci_resources[] = { |
@@ -72,32 +74,44 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
72 | { | 74 | { |
73 | switch (port_mode[0]) { | 75 | switch (port_mode[0]) { |
74 | case EHCI_HCD_OMAP_MODE_PHY: | 76 | case EHCI_HCD_OMAP_MODE_PHY: |
75 | omap_cfg_reg(Y9_3430_USB1HS_PHY_STP); | 77 | omap_mux_init_signal("hsusb1_stp", OMAP_PIN_OUTPUT); |
76 | omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK); | 78 | omap_mux_init_signal("hsusb1_clk", OMAP_PIN_OUTPUT); |
77 | omap_cfg_reg(AA14_3430_USB1HS_PHY_DIR); | 79 | omap_mux_init_signal("hsusb1_dir", OMAP_PIN_INPUT_PULLDOWN); |
78 | omap_cfg_reg(AA11_3430_USB1HS_PHY_NXT); | 80 | omap_mux_init_signal("hsusb1_nxt", OMAP_PIN_INPUT_PULLDOWN); |
79 | omap_cfg_reg(W13_3430_USB1HS_PHY_DATA0); | 81 | omap_mux_init_signal("hsusb1_data0", OMAP_PIN_INPUT_PULLDOWN); |
80 | omap_cfg_reg(W12_3430_USB1HS_PHY_DATA1); | 82 | omap_mux_init_signal("hsusb1_data1", OMAP_PIN_INPUT_PULLDOWN); |
81 | omap_cfg_reg(W11_3430_USB1HS_PHY_DATA2); | 83 | omap_mux_init_signal("hsusb1_data2", OMAP_PIN_INPUT_PULLDOWN); |
82 | omap_cfg_reg(Y11_3430_USB1HS_PHY_DATA3); | 84 | omap_mux_init_signal("hsusb1_data3", OMAP_PIN_INPUT_PULLDOWN); |
83 | omap_cfg_reg(W9_3430_USB1HS_PHY_DATA4); | 85 | omap_mux_init_signal("hsusb1_data4", OMAP_PIN_INPUT_PULLDOWN); |
84 | omap_cfg_reg(Y12_3430_USB1HS_PHY_DATA5); | 86 | omap_mux_init_signal("hsusb1_data5", OMAP_PIN_INPUT_PULLDOWN); |
85 | omap_cfg_reg(W8_3430_USB1HS_PHY_DATA6); | 87 | omap_mux_init_signal("hsusb1_data6", OMAP_PIN_INPUT_PULLDOWN); |
86 | omap_cfg_reg(Y13_3430_USB1HS_PHY_DATA7); | 88 | omap_mux_init_signal("hsusb1_data7", OMAP_PIN_INPUT_PULLDOWN); |
87 | break; | 89 | break; |
88 | case EHCI_HCD_OMAP_MODE_TLL: | 90 | case EHCI_HCD_OMAP_MODE_TLL: |
89 | omap_cfg_reg(Y9_3430_USB1HS_TLL_STP); | 91 | omap_mux_init_signal("hsusb1_tll_stp", |
90 | omap_cfg_reg(Y8_3430_USB1HS_TLL_CLK); | 92 | OMAP_PIN_INPUT_PULLUP); |
91 | omap_cfg_reg(AA14_3430_USB1HS_TLL_DIR); | 93 | omap_mux_init_signal("hsusb1_tll_clk", |
92 | omap_cfg_reg(AA11_3430_USB1HS_TLL_NXT); | 94 | OMAP_PIN_INPUT_PULLDOWN); |
93 | omap_cfg_reg(W13_3430_USB1HS_TLL_DATA0); | 95 | omap_mux_init_signal("hsusb1_tll_dir", |
94 | omap_cfg_reg(W12_3430_USB1HS_TLL_DATA1); | 96 | OMAP_PIN_INPUT_PULLDOWN); |
95 | omap_cfg_reg(W11_3430_USB1HS_TLL_DATA2); | 97 | omap_mux_init_signal("hsusb1_tll_nxt", |
96 | omap_cfg_reg(Y11_3430_USB1HS_TLL_DATA3); | 98 | OMAP_PIN_INPUT_PULLDOWN); |
97 | omap_cfg_reg(W9_3430_USB1HS_TLL_DATA4); | 99 | omap_mux_init_signal("hsusb1_tll_data0", |
98 | omap_cfg_reg(Y12_3430_USB1HS_TLL_DATA5); | 100 | OMAP_PIN_INPUT_PULLDOWN); |
99 | omap_cfg_reg(W8_3430_USB1HS_TLL_DATA6); | 101 | omap_mux_init_signal("hsusb1_tll_data1", |
100 | omap_cfg_reg(Y13_3430_USB1HS_TLL_DATA7); | 102 | OMAP_PIN_INPUT_PULLDOWN); |
103 | omap_mux_init_signal("hsusb1_tll_data2", | ||
104 | OMAP_PIN_INPUT_PULLDOWN); | ||
105 | omap_mux_init_signal("hsusb1_tll_data3", | ||
106 | OMAP_PIN_INPUT_PULLDOWN); | ||
107 | omap_mux_init_signal("hsusb1_tll_data4", | ||
108 | OMAP_PIN_INPUT_PULLDOWN); | ||
109 | omap_mux_init_signal("hsusb1_tll_data5", | ||
110 | OMAP_PIN_INPUT_PULLDOWN); | ||
111 | omap_mux_init_signal("hsusb1_tll_data6", | ||
112 | OMAP_PIN_INPUT_PULLDOWN); | ||
113 | omap_mux_init_signal("hsusb1_tll_data7", | ||
114 | OMAP_PIN_INPUT_PULLDOWN); | ||
101 | break; | 115 | break; |
102 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 116 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
103 | /* FALLTHROUGH */ | 117 | /* FALLTHROUGH */ |
@@ -107,32 +121,52 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
107 | 121 | ||
108 | switch (port_mode[1]) { | 122 | switch (port_mode[1]) { |
109 | case EHCI_HCD_OMAP_MODE_PHY: | 123 | case EHCI_HCD_OMAP_MODE_PHY: |
110 | omap_cfg_reg(AA10_3430_USB2HS_PHY_STP); | 124 | omap_mux_init_signal("hsusb2_stp", OMAP_PIN_OUTPUT); |
111 | omap_cfg_reg(AA8_3430_USB2HS_PHY_CLK); | 125 | omap_mux_init_signal("hsusb2_clk", OMAP_PIN_OUTPUT); |
112 | omap_cfg_reg(AA9_3430_USB2HS_PHY_DIR); | 126 | omap_mux_init_signal("hsusb2_dir", OMAP_PIN_INPUT_PULLDOWN); |
113 | omap_cfg_reg(AB11_3430_USB2HS_PHY_NXT); | 127 | omap_mux_init_signal("hsusb2_nxt", OMAP_PIN_INPUT_PULLDOWN); |
114 | omap_cfg_reg(AB10_3430_USB2HS_PHY_DATA0); | 128 | omap_mux_init_signal("hsusb2_data0", |
115 | omap_cfg_reg(AB9_3430_USB2HS_PHY_DATA1); | 129 | OMAP_PIN_INPUT_PULLDOWN); |
116 | omap_cfg_reg(W3_3430_USB2HS_PHY_DATA2); | 130 | omap_mux_init_signal("hsusb2_data1", |
117 | omap_cfg_reg(T4_3430_USB2HS_PHY_DATA3); | 131 | OMAP_PIN_INPUT_PULLDOWN); |
118 | omap_cfg_reg(T3_3430_USB2HS_PHY_DATA4); | 132 | omap_mux_init_signal("hsusb2_data2", |
119 | omap_cfg_reg(R3_3430_USB2HS_PHY_DATA5); | 133 | OMAP_PIN_INPUT_PULLDOWN); |
120 | omap_cfg_reg(R4_3430_USB2HS_PHY_DATA6); | 134 | omap_mux_init_signal("hsusb2_data3", |
121 | omap_cfg_reg(T2_3430_USB2HS_PHY_DATA7); | 135 | OMAP_PIN_INPUT_PULLDOWN); |
136 | omap_mux_init_signal("hsusb2_data4", | ||
137 | OMAP_PIN_INPUT_PULLDOWN); | ||
138 | omap_mux_init_signal("hsusb2_data5", | ||
139 | OMAP_PIN_INPUT_PULLDOWN); | ||
140 | omap_mux_init_signal("hsusb2_data6", | ||
141 | OMAP_PIN_INPUT_PULLDOWN); | ||
142 | omap_mux_init_signal("hsusb2_data7", | ||
143 | OMAP_PIN_INPUT_PULLDOWN); | ||
122 | break; | 144 | break; |
123 | case EHCI_HCD_OMAP_MODE_TLL: | 145 | case EHCI_HCD_OMAP_MODE_TLL: |
124 | omap_cfg_reg(AA10_3430_USB2HS_TLL_STP); | 146 | omap_mux_init_signal("hsusb2_tll_stp", |
125 | omap_cfg_reg(AA8_3430_USB2HS_TLL_CLK); | 147 | OMAP_PIN_INPUT_PULLUP); |
126 | omap_cfg_reg(AA9_3430_USB2HS_TLL_DIR); | 148 | omap_mux_init_signal("hsusb2_tll_clk", |
127 | omap_cfg_reg(AB11_3430_USB2HS_TLL_NXT); | 149 | OMAP_PIN_INPUT_PULLDOWN); |
128 | omap_cfg_reg(AB10_3430_USB2HS_TLL_DATA0); | 150 | omap_mux_init_signal("hsusb2_tll_dir", |
129 | omap_cfg_reg(AB9_3430_USB2HS_TLL_DATA1); | 151 | OMAP_PIN_INPUT_PULLDOWN); |
130 | omap_cfg_reg(W3_3430_USB2HS_TLL_DATA2); | 152 | omap_mux_init_signal("hsusb2_tll_nxt", |
131 | omap_cfg_reg(T4_3430_USB2HS_TLL_DATA3); | 153 | OMAP_PIN_INPUT_PULLDOWN); |
132 | omap_cfg_reg(T3_3430_USB2HS_TLL_DATA4); | 154 | omap_mux_init_signal("hsusb2_tll_data0", |
133 | omap_cfg_reg(R3_3430_USB2HS_TLL_DATA5); | 155 | OMAP_PIN_INPUT_PULLDOWN); |
134 | omap_cfg_reg(R4_3430_USB2HS_TLL_DATA6); | 156 | omap_mux_init_signal("hsusb2_tll_data1", |
135 | omap_cfg_reg(T2_3430_USB2HS_TLL_DATA7); | 157 | OMAP_PIN_INPUT_PULLDOWN); |
158 | omap_mux_init_signal("hsusb2_tll_data2", | ||
159 | OMAP_PIN_INPUT_PULLDOWN); | ||
160 | omap_mux_init_signal("hsusb2_tll_data3", | ||
161 | OMAP_PIN_INPUT_PULLDOWN); | ||
162 | omap_mux_init_signal("hsusb2_tll_data4", | ||
163 | OMAP_PIN_INPUT_PULLDOWN); | ||
164 | omap_mux_init_signal("hsusb2_tll_data5", | ||
165 | OMAP_PIN_INPUT_PULLDOWN); | ||
166 | omap_mux_init_signal("hsusb2_tll_data6", | ||
167 | OMAP_PIN_INPUT_PULLDOWN); | ||
168 | omap_mux_init_signal("hsusb2_tll_data7", | ||
169 | OMAP_PIN_INPUT_PULLDOWN); | ||
136 | break; | 170 | break; |
137 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 171 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
138 | /* FALLTHROUGH */ | 172 | /* FALLTHROUGH */ |
@@ -145,18 +179,30 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
145 | printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); | 179 | printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); |
146 | break; | 180 | break; |
147 | case EHCI_HCD_OMAP_MODE_TLL: | 181 | case EHCI_HCD_OMAP_MODE_TLL: |
148 | omap_cfg_reg(AB3_3430_USB3HS_TLL_STP); | 182 | omap_mux_init_signal("hsusb3_tll_stp", |
149 | omap_cfg_reg(AA6_3430_USB3HS_TLL_CLK); | 183 | OMAP_PIN_INPUT_PULLUP); |
150 | omap_cfg_reg(AA3_3430_USB3HS_TLL_DIR); | 184 | omap_mux_init_signal("hsusb3_tll_clk", |
151 | omap_cfg_reg(Y3_3430_USB3HS_TLL_NXT); | 185 | OMAP_PIN_INPUT_PULLDOWN); |
152 | omap_cfg_reg(AA5_3430_USB3HS_TLL_DATA0); | 186 | omap_mux_init_signal("hsusb3_tll_dir", |
153 | omap_cfg_reg(Y4_3430_USB3HS_TLL_DATA1); | 187 | OMAP_PIN_INPUT_PULLDOWN); |
154 | omap_cfg_reg(Y5_3430_USB3HS_TLL_DATA2); | 188 | omap_mux_init_signal("hsusb3_tll_nxt", |
155 | omap_cfg_reg(W5_3430_USB3HS_TLL_DATA3); | 189 | OMAP_PIN_INPUT_PULLDOWN); |
156 | omap_cfg_reg(AB12_3430_USB3HS_TLL_DATA4); | 190 | omap_mux_init_signal("hsusb3_tll_data0", |
157 | omap_cfg_reg(AB13_3430_USB3HS_TLL_DATA5); | 191 | OMAP_PIN_INPUT_PULLDOWN); |
158 | omap_cfg_reg(AA13_3430_USB3HS_TLL_DATA6); | 192 | omap_mux_init_signal("hsusb3_tll_data1", |
159 | omap_cfg_reg(AA12_3430_USB3HS_TLL_DATA7); | 193 | OMAP_PIN_INPUT_PULLDOWN); |
194 | omap_mux_init_signal("hsusb3_tll_data2", | ||
195 | OMAP_PIN_INPUT_PULLDOWN); | ||
196 | omap_mux_init_signal("hsusb3_tll_data3", | ||
197 | OMAP_PIN_INPUT_PULLDOWN); | ||
198 | omap_mux_init_signal("hsusb3_tll_data4", | ||
199 | OMAP_PIN_INPUT_PULLDOWN); | ||
200 | omap_mux_init_signal("hsusb3_tll_data5", | ||
201 | OMAP_PIN_INPUT_PULLDOWN); | ||
202 | omap_mux_init_signal("hsusb3_tll_data6", | ||
203 | OMAP_PIN_INPUT_PULLDOWN); | ||
204 | omap_mux_init_signal("hsusb3_tll_data7", | ||
205 | OMAP_PIN_INPUT_PULLDOWN); | ||
160 | break; | 206 | break; |
161 | case EHCI_HCD_OMAP_MODE_UNKNOWN: | 207 | case EHCI_HCD_OMAP_MODE_UNKNOWN: |
162 | /* FALLTHROUGH */ | 208 | /* FALLTHROUGH */ |