diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-12-14 14:54:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:44:31 -0500 |
commit | 11d1a4aa8d657478cb2e5d33f203ba8f01b9ac24 (patch) | |
tree | b433927494c87f5f4d4ee03b78a35b894705037d /drivers/usb/host/ohci-pci.c | |
parent | 4302a595cd9c6363b495460497ecbda49fa16858 (diff) |
USB: Implement support for "split" endian OHCI
This patch separates support for big endian MMIO register access
and big endian descriptors in order to support the Toshiba SCC
implementation which has big endian registers but little endian
in-memory descriptors.
It simplifies the access functions a bit in ohci.h while at it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index 82fbec305a66..292daf044b62 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -85,6 +85,27 @@ static int __devinit ohci_quirk_zfmicro(struct usb_hcd *hcd) | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | /* Check for Toshiba SCC OHCI which has big endian registers | ||
89 | * and little endian in memory data structures | ||
90 | */ | ||
91 | static int __devinit ohci_quirk_toshiba_scc(struct usb_hcd *hcd) | ||
92 | { | ||
93 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | ||
94 | |||
95 | /* That chip is only present in the southbridge of some | ||
96 | * cell based platforms which are supposed to select | ||
97 | * CONFIG_USB_OHCI_BIG_ENDIAN_MMIO. We verify here if | ||
98 | * that was the case though. | ||
99 | */ | ||
100 | #ifdef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO | ||
101 | ohci->flags |= OHCI_QUIRK_BE_MMIO; | ||
102 | ohci_dbg (ohci, "enabled big endian Toshiba quirk\n"); | ||
103 | return 0; | ||
104 | #else | ||
105 | ohci_err (ohci, "unsupported big endian Toshiba quirk\n"); | ||
106 | return -ENXIO; | ||
107 | #endif | ||
108 | } | ||
88 | 109 | ||
89 | /* List of quirks for OHCI */ | 110 | /* List of quirks for OHCI */ |
90 | static const struct pci_device_id ohci_pci_quirks[] = { | 111 | static const struct pci_device_id ohci_pci_quirks[] = { |
@@ -104,9 +125,14 @@ static const struct pci_device_id ohci_pci_quirks[] = { | |||
104 | PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xa0f8), | 125 | PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xa0f8), |
105 | .driver_data = (unsigned long)ohci_quirk_zfmicro, | 126 | .driver_data = (unsigned long)ohci_quirk_zfmicro, |
106 | }, | 127 | }, |
128 | { | ||
129 | PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA_2, 0x01b6), | ||
130 | .driver_data = (unsigned long)ohci_quirk_toshiba_scc, | ||
131 | }, | ||
107 | /* FIXME for some of the early AMD 760 southbridges, OHCI | 132 | /* FIXME for some of the early AMD 760 southbridges, OHCI |
108 | * won't work at all. blacklist them. | 133 | * won't work at all. blacklist them. |
109 | */ | 134 | */ |
135 | |||
110 | {}, | 136 | {}, |
111 | }; | 137 | }; |
112 | 138 | ||