diff options
author | Tony Lindgren <tony@atomide.com> | 2010-07-05 09:31:38 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-07-05 09:31:38 -0400 |
commit | 0d600ff6fe06d99e56166a41521e120ce37e1dd4 (patch) | |
tree | b78372b2609ee969a0dd8039e5f068234d4a670a /arch/arm/mach-omap2/usb-fs.c | |
parent | 369ed78fc9b4638d52a036c0184c2faf72c4e9c4 (diff) |
omap: mux: Make omap2 FS USB code use new mux functions
Make omap2 FS USB code use new mux functions. Do not mux usb2_tllse0
as it has multiple options.
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-fs.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-fs.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c index a4455190b216..a216d88b04b5 100644 --- a/arch/arm/mach-omap2/usb-fs.c +++ b/arch/arm/mach-omap2/usb-fs.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | 31 | ||
32 | #include <plat/control.h> | 32 | #include <plat/control.h> |
33 | #include <plat/mux.h> | ||
34 | #include <plat/usb.h> | 33 | #include <plat/usb.h> |
35 | #include <plat/board.h> | 34 | #include <plat/board.h> |
36 | 35 | ||
@@ -40,6 +39,8 @@ | |||
40 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN | 39 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN |
41 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG | 40 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG |
42 | 41 | ||
42 | #include "mux.h" | ||
43 | |||
43 | #if defined(CONFIG_ARCH_OMAP2) | 44 | #if defined(CONFIG_ARCH_OMAP2) |
44 | 45 | ||
45 | #ifdef CONFIG_USB_GADGET_OMAP | 46 | #ifdef CONFIG_USB_GADGET_OMAP |
@@ -209,13 +210,13 @@ static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device) | |||
209 | return 0; | 210 | return 0; |
210 | 211 | ||
211 | if (is_device) | 212 | if (is_device) |
212 | omap_cfg_reg(J20_24XX_USB0_PUEN); | 213 | omap_mux_init_signal("usb0_puen", 0); |
213 | 214 | ||
214 | omap_cfg_reg(K18_24XX_USB0_DAT); | 215 | omap_mux_init_signal("usb0_dat", 0); |
215 | omap_cfg_reg(K19_24XX_USB0_TXEN); | 216 | omap_mux_init_signal("usb0_txen", 0); |
216 | omap_cfg_reg(J14_24XX_USB0_SE0); | 217 | omap_mux_init_signal("usb0_se0", 0); |
217 | if (nwires != 3) | 218 | if (nwires != 3) |
218 | omap_cfg_reg(J18_24XX_USB0_RCV); | 219 | omap_mux_init_signal("usb0_rcv", 0); |
219 | 220 | ||
220 | switch (nwires) { | 221 | switch (nwires) { |
221 | case 3: | 222 | case 3: |
@@ -228,8 +229,8 @@ static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device) | |||
228 | break; | 229 | break; |
229 | case 6: | 230 | case 6: |
230 | syscon1 = 3; | 231 | syscon1 = 3; |
231 | omap_cfg_reg(J19_24XX_USB0_VP); | 232 | omap_mux_init_signal("usb0_vp", 0); |
232 | omap_cfg_reg(K20_24XX_USB0_VM); | 233 | omap_mux_init_signal("usb0_vm", 0); |
233 | omap2_usb_devconf_set(0, USB_UNIDIR); | 234 | omap2_usb_devconf_set(0, USB_UNIDIR); |
234 | break; | 235 | break; |
235 | default: | 236 | default: |
@@ -289,12 +290,12 @@ static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup) | |||
289 | if (alt_pingroup || nwires == 0) | 290 | if (alt_pingroup || nwires == 0) |
290 | return 0; | 291 | return 0; |
291 | 292 | ||
292 | omap_cfg_reg(Y11_24XX_USB2_DAT); | 293 | omap_mux_init_signal("usb2_dat", 0); |
293 | omap_cfg_reg(AA10_24XX_USB2_SE0); | 294 | omap_mux_init_signal("usb2_se0", 0); |
294 | if (nwires > 2) | 295 | if (nwires > 2) |
295 | omap_cfg_reg(AA12_24XX_USB2_TXEN); | 296 | omap_mux_init_signal("usb2_txen", 0); |
296 | if (nwires > 3) | 297 | if (nwires > 3) |
297 | omap_cfg_reg(AA6_24XX_USB2_RCV); | 298 | omap_mux_init_signal("usb2_rcv", 0); |
298 | 299 | ||
299 | switch (nwires) { | 300 | switch (nwires) { |
300 | case 2: | 301 | case 2: |
@@ -313,11 +314,13 @@ static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup) | |||
313 | omap2_usb_devconf_set(2, USB_BIDIR); | 314 | omap2_usb_devconf_set(2, USB_BIDIR); |
314 | break; | 315 | break; |
315 | case 5: | 316 | case 5: |
316 | omap_cfg_reg(AA4_24XX_USB2_TLLSE0); | 317 | /* NOTE: board-specific code must mux this setting depending |
317 | /* NOTE: board-specific code must override this setting if | 318 | * on TLL link using DP/DM. Something must also |
318 | * this TLL link is not using DP/DM. Something must also | ||
319 | * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED} | 319 | * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED} |
320 | * 2420: hdq_sio.usb2_tllse0 or vlynq_rx0.usb2_tllse0 | ||
321 | * 2430: hdq_sio.usb2_tllse0 or sdmmc2_dat0.usb2_tllse0 | ||
320 | */ | 322 | */ |
323 | |||
321 | syscon1 = 3; | 324 | syscon1 = 3; |
322 | omap2_usb2_enable_5pinunitll(); | 325 | omap2_usb2_enable_5pinunitll(); |
323 | break; | 326 | break; |