diff options
author | Govindraj.R <govindraj.raja@ti.com> | 2012-04-17 13:35:47 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-04-17 13:35:47 -0400 |
commit | bce492c04ba8fc66a4ea0a52b181ba255daaaf54 (patch) | |
tree | 9288bd5769a2e726d3fb873ea938e9496ce1a35b /arch/arm/mach-omap2/serial.c | |
parent | 63878acfafbc7a6ff90a2f8b3e31f0889bc61af6 (diff) |
ARM: OMAP2+: UART: Fix incorrect population of default uart pads
Commit (7496ba3 ARM: OMAP2+: UART: Add default mux for all uarts)
wrongly added muxing of default pads for all uarts. This causes
breakage on multiple boards using uart pins for alternate functions.
For example, on zoom3 random oopses can be seen with nfsroot as
the smsc911x ethernet FIFO timings on GPMC bus are controlled
by gpmc_wait2 and gpmc_wait3 pins. This means we can't mux these
pads to uart4 functionality as commit 7496ba3 was doing.
Not all boards tend to use all uarts and most of unused uart pins
are muxed for other purpose. This commit breaks the modules which
where trying to use unused uart pins on their boards.
So remove the default pad muxing. Note that this is not a complete
fix, as we now rely on bootloader set muxing for the uart wake-up
events. Further patching is needed to enable wake-up events for
uarts that are already muxed to uart mode.
Cc: Felipe Balbi <balbi@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Acked-by: Russ Dill <russ.dill@gmail.com>
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
[tony@atomide.com: updated comments to describe oops on zoom3]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 0cdd359a128e..2e351f52938a 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -120,124 +120,8 @@ static void omap_uart_set_smartidle(struct platform_device *pdev) {} | |||
120 | #endif /* CONFIG_PM */ | 120 | #endif /* CONFIG_PM */ |
121 | 121 | ||
122 | #ifdef CONFIG_OMAP_MUX | 122 | #ifdef CONFIG_OMAP_MUX |
123 | static struct omap_device_pad default_uart1_pads[] __initdata = { | ||
124 | { | ||
125 | .name = "uart1_cts.uart1_cts", | ||
126 | .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
127 | }, | ||
128 | { | ||
129 | .name = "uart1_rts.uart1_rts", | ||
130 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
131 | }, | ||
132 | { | ||
133 | .name = "uart1_tx.uart1_tx", | ||
134 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
135 | }, | ||
136 | { | ||
137 | .name = "uart1_rx.uart1_rx", | ||
138 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
139 | .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
140 | .idle = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
141 | }, | ||
142 | }; | ||
143 | |||
144 | static struct omap_device_pad default_uart2_pads[] __initdata = { | ||
145 | { | ||
146 | .name = "uart2_cts.uart2_cts", | ||
147 | .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
148 | }, | ||
149 | { | ||
150 | .name = "uart2_rts.uart2_rts", | ||
151 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
152 | }, | ||
153 | { | ||
154 | .name = "uart2_tx.uart2_tx", | ||
155 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
156 | }, | ||
157 | { | ||
158 | .name = "uart2_rx.uart2_rx", | ||
159 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
160 | .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
161 | .idle = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
162 | }, | ||
163 | }; | ||
164 | |||
165 | static struct omap_device_pad default_uart3_pads[] __initdata = { | ||
166 | { | ||
167 | .name = "uart3_cts_rctx.uart3_cts_rctx", | ||
168 | .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
169 | }, | ||
170 | { | ||
171 | .name = "uart3_rts_sd.uart3_rts_sd", | ||
172 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
173 | }, | ||
174 | { | ||
175 | .name = "uart3_tx_irtx.uart3_tx_irtx", | ||
176 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
177 | }, | ||
178 | { | ||
179 | .name = "uart3_rx_irrx.uart3_rx_irrx", | ||
180 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
181 | .enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
182 | .idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct omap_device_pad default_omap36xx_uart4_pads[] __initdata = { | ||
187 | { | ||
188 | .name = "gpmc_wait2.uart4_tx", | ||
189 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
190 | }, | ||
191 | { | ||
192 | .name = "gpmc_wait3.uart4_rx", | ||
193 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
194 | .enable = OMAP_PIN_INPUT | OMAP_MUX_MODE2, | ||
195 | .idle = OMAP_PIN_INPUT | OMAP_MUX_MODE2, | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static struct omap_device_pad default_omap4_uart4_pads[] __initdata = { | ||
200 | { | ||
201 | .name = "uart4_tx.uart4_tx", | ||
202 | .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
203 | }, | ||
204 | { | ||
205 | .name = "uart4_rx.uart4_rx", | ||
206 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, | ||
207 | .enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
208 | .idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) | 123 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) |
213 | { | 124 | { |
214 | switch (bdata->id) { | ||
215 | case 0: | ||
216 | bdata->pads = default_uart1_pads; | ||
217 | bdata->pads_cnt = ARRAY_SIZE(default_uart1_pads); | ||
218 | break; | ||
219 | case 1: | ||
220 | bdata->pads = default_uart2_pads; | ||
221 | bdata->pads_cnt = ARRAY_SIZE(default_uart2_pads); | ||
222 | break; | ||
223 | case 2: | ||
224 | bdata->pads = default_uart3_pads; | ||
225 | bdata->pads_cnt = ARRAY_SIZE(default_uart3_pads); | ||
226 | break; | ||
227 | case 3: | ||
228 | if (cpu_is_omap44xx()) { | ||
229 | bdata->pads = default_omap4_uart4_pads; | ||
230 | bdata->pads_cnt = | ||
231 | ARRAY_SIZE(default_omap4_uart4_pads); | ||
232 | } else if (cpu_is_omap3630()) { | ||
233 | bdata->pads = default_omap36xx_uart4_pads; | ||
234 | bdata->pads_cnt = | ||
235 | ARRAY_SIZE(default_omap36xx_uart4_pads); | ||
236 | } | ||
237 | break; | ||
238 | default: | ||
239 | break; | ||
240 | } | ||
241 | } | 125 | } |
242 | #else | 126 | #else |
243 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} | 127 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} |