Commit 0e498763 authored by David Brownell's avatar David Brownell Committed by Greg K-H

[PATCH] USB: OHCI on Compaq Aramada 7400

This adds a quirk to the OHCI driver that lets it work with an old
Compaq implementation.  It also removes some needless strings from
the non-debug version of the driver.
Signed-off-by: default avatarChris Clayton <chris_clayton@f1internet.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a2fe2012
...@@ -54,7 +54,7 @@ ohci_pci_start (struct usb_hcd *hcd) ...@@ -54,7 +54,7 @@ ohci_pci_start (struct usb_hcd *hcd)
if (pdev->vendor == PCI_VENDOR_ID_AMD if (pdev->vendor == PCI_VENDOR_ID_AMD
&& pdev->device == 0x740c) { && pdev->device == 0x740c) {
ohci->flags = OHCI_QUIRK_AMD756; ohci->flags = OHCI_QUIRK_AMD756;
ohci_info (ohci, "AMD756 erratum 4 workaround\n"); ohci_dbg (ohci, "AMD756 erratum 4 workaround\n");
// also somewhat erratum 10 (suspend/resume issues) // also somewhat erratum 10 (suspend/resume issues)
} }
...@@ -68,7 +68,7 @@ ohci_pci_start (struct usb_hcd *hcd) ...@@ -68,7 +68,7 @@ ohci_pci_start (struct usb_hcd *hcd)
*/ */
else if (pdev->vendor == PCI_VENDOR_ID_OPTI else if (pdev->vendor == PCI_VENDOR_ID_OPTI
&& pdev->device == 0xc861) { && pdev->device == 0xc861) {
ohci_info (ohci, ohci_dbg (ohci,
"WARNING: OPTi workarounds unavailable\n"); "WARNING: OPTi workarounds unavailable\n");
} }
...@@ -84,9 +84,20 @@ ohci_pci_start (struct usb_hcd *hcd) ...@@ -84,9 +84,20 @@ ohci_pci_start (struct usb_hcd *hcd)
if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO
&& b->vendor == PCI_VENDOR_ID_NS) { && b->vendor == PCI_VENDOR_ID_NS) {
ohci->flags |= OHCI_QUIRK_SUPERIO; ohci->flags |= OHCI_QUIRK_SUPERIO;
ohci_info (ohci, "Using NSC SuperIO setup\n"); ohci_dbg (ohci, "Using NSC SuperIO setup\n");
} }
} }
/* Check for Compaq's ZFMicro chipset, which needs short
* delays before control or bulk queues get re-activated
* in finish_unlinks()
*/
else if (pdev->vendor == PCI_VENDOR_ID_COMPAQ
&& pdev->device == 0xa0f8) {
ohci->flags |= OHCI_QUIRK_ZFMICRO;
ohci_dbg (ohci,
"enabled Compaq ZFMicro chipset quirk\n");
}
} }
/* NOTE: there may have already been a first reset, to /* NOTE: there may have already been a first reset, to
......
...@@ -1021,6 +1021,8 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) ...@@ -1021,6 +1021,8 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
if (ohci->ed_controltail) { if (ohci->ed_controltail) {
command |= OHCI_CLF; command |= OHCI_CLF;
if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1);
if (!(ohci->hc_control & OHCI_CTRL_CLE)) { if (!(ohci->hc_control & OHCI_CTRL_CLE)) {
control |= OHCI_CTRL_CLE; control |= OHCI_CTRL_CLE;
ohci_writel (ohci, 0, ohci_writel (ohci, 0,
...@@ -1029,6 +1031,8 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) ...@@ -1029,6 +1031,8 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
} }
if (ohci->ed_bulktail) { if (ohci->ed_bulktail) {
command |= OHCI_BLF; command |= OHCI_BLF;
if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1);
if (!(ohci->hc_control & OHCI_CTRL_BLE)) { if (!(ohci->hc_control & OHCI_CTRL_BLE)) {
control |= OHCI_CTRL_BLE; control |= OHCI_CTRL_BLE;
ohci_writel (ohci, 0, ohci_writel (ohci, 0,
...@@ -1039,12 +1043,17 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) ...@@ -1039,12 +1043,17 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
/* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */
if (control) { if (control) {
ohci->hc_control |= control; ohci->hc_control |= control;
if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1);
ohci_writel (ohci, ohci->hc_control, ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control); &ohci->regs->control);
} }
if (command) if (command) {
if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1);
ohci_writel (ohci, command, &ohci->regs->cmdstatus); ohci_writel (ohci, command, &ohci->regs->cmdstatus);
} }
}
} }
......
...@@ -396,6 +396,7 @@ struct ohci_hcd { ...@@ -396,6 +396,7 @@ struct ohci_hcd {
#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */ #define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */
#define OHCI_QUIRK_INITRESET 0x04 /* SiS, OPTi, ... */ #define OHCI_QUIRK_INITRESET 0x04 /* SiS, OPTi, ... */
#define OHCI_BIG_ENDIAN 0x08 /* big endian HC */ #define OHCI_BIG_ENDIAN 0x08 /* big endian HC */
#define OHCI_QUIRK_ZFMICRO 0x10 /* Compaq ZFMicro chipset*/
// there are also chip quirks/bugs in init logic // there are also chip quirks/bugs in init logic
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment