powerpc/mpc83xx: Fix usb mux setup for mpc834x
commitd25f484f1cad667259c2ae59cc5b0e16dd043980
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 9 Jun 2009 11:43:32 +0000 (9 13:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Aug 2009 21:18:40 +0000 (16 14:18 -0700)
tree9a6862e09990b86cc1565f3237496f0949b20dff
parent21ab6bccd96a3a55b793c36c8023bcd685f44bf8
powerpc/mpc83xx: Fix usb mux setup for mpc834x

commit b7d66c88c968379ebe683a28c4005895497ebbad upstream.

usb0 and usb1 mux settings in the sicrl register were swapped (twice!)
in mpc834x_usb_cfg(), leading to various strange issues with fsl-ehci
and full speed devices.

The USB port config on mpc834x is done using 2 muxes: Port 0 is always
used for MPH port 0, and port 1 can either be used for MPH port 1 or DR
(unless DR uses UTMI phy or OTG, then it uses both ports) - See 8349 RM
figure 1-4..

mpc8349_usb_cfg() had this inverted for the DR, and it also had the bit
positions of the usb0 / usb1 mux settings swapped. It would basically
work if you specified port1 instead of port0 for the MPH controller (and
happened to use ULPI phys), which is what all the 834x dts have done,
even though that configuration is physically invalid.

Instead fix mpc8349_usb_cfg() and adjust the dts files to match reality.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/boot/dts/asp834x-redboot.dts
arch/powerpc/boot/dts/mpc8349emitx.dts
arch/powerpc/boot/dts/mpc834x_mds.dts
arch/powerpc/boot/dts/sbc8349.dts
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/83xx/usb.c