diff options
author | Valentine Barshak <vbarshak@ru.mvista.com> | 2007-10-09 18:00:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:32 -0400 |
commit | 4f45426cfd6170311e116442ccd8ce0e31979237 (patch) | |
tree | d62325f3cf5261230f7d4423603665c9b5adbc01 /drivers/usb/host/ohci-ppc-soc.c | |
parent | f621b8437d6ae502dde45797f56407e48c7a68b4 (diff) |
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-soc.c')
-rw-r--r-- | drivers/usb/host/ohci-ppc-soc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index 1a2e1777ca61..f95be1896b0d 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c | |||
@@ -73,6 +73,11 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, | |||
73 | 73 | ||
74 | ohci = hcd_to_ohci(hcd); | 74 | ohci = hcd_to_ohci(hcd); |
75 | ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; | 75 | ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; |
76 | |||
77 | #ifdef CONFIG_PPC_MPC52xx | ||
78 | /* MPC52xx doesn't need frame_no shift */ | ||
79 | ohci->flags |= OHCI_QUIRK_FRAME_NO; | ||
80 | #endif | ||
76 | ohci_hcd_init(ohci); | 81 | ohci_hcd_init(ohci); |
77 | 82 | ||
78 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); | 83 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); |