aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-ppc-of.c
diff options
context:
space:
mode:
authorValentine Barshak <vbarshak@ru.mvista.com>2007-10-09 15:00:05 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 14:55:32 -0700
commit4f45426cfd6170311e116442ccd8ce0e31979237 (patch)
treed62325f3cf5261230f7d4423603665c9b5adbc01 /drivers/usb/host/ohci-ppc-of.c
parentUSB: funsoft: Fix termios (diff)
downloadlinux-dev-4f45426cfd6170311e116442ccd8ce0e31979237.tar.xz
linux-dev-4f45426cfd6170311e116442ccd8ce0e31979237.zip
USB: add runtime frame_no quirk for big-endian OHCI
Add OHCI big endian frame_no quirk. The frame_no value stored in the HCCA is a 16 bit field at a specific offset, but since not all CPUs can do 16-bit memory accesses it's used as a 32 bit field. And that's why big-endian OHCI must shift 16 bits ... unless the spec is not followed. Currently there's one MPC52xx platform that doesn't need the shift. This patch adds a new "big endian frame_no" quirk to control that at runtime. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-ppc-of.c')
-rw-r--r--drivers/usb/host/ohci-ppc-of.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index c43b66acd4d5..0a7426920150 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -134,8 +134,11 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
}
ohci = hcd_to_ohci(hcd);
- if (is_bigendian)
+ if (is_bigendian) {
ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
+ if (of_device_is_compatible(dn, "mpc5200-ohci"))
+ ohci->flags |= OHCI_QUIRK_FRAME_NO;
+ }
ohci_hcd_init(ohci);