summaryrefslogtreecommitdiff
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
authorManjunath Goudar <manjunath.goudar@linaro.org>2013-05-28 18:34:50 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-30 21:36:03 +0900
commit2621d0119e574f12496c4ab731265d5777cb6a18 (patch)
tree33dcdb956f43d4f4b8859f1ebbaf6cbae400fae5 /drivers/usb/host/pci-quirks.c
parent95e44d44fc29b3d84a74fc5793d8a78ba843c66b (diff)
USB: OHCI: Generic changes to make ohci-pci a separate driver
Note that this changes is part of separating the ohci pci host controller driver from ohci-hcd host code. This contains : -Moved sb800_prefetch() function from ohci-pci.c to pci-quirks.c file and EXPORTed, this is part of the effort to move the ohci pci related code to generic pci code. -Passed "device" argument instead of "ohci_hcd" in sb800_prefetch() function to avoid extra include file in pci-quirks.c. V2: -Passed "device" argment instead of "pci_dev", then we use to_pci_dev() to get the "pci_dev" structure. Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 4c338ec03a07..b9848e4d3d44 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -91,6 +91,19 @@ static struct amd_chipset_info {
static DEFINE_SPINLOCK(amd_lock);
+void sb800_prefetch(struct device *dev, int on)
+{
+ u16 misc;
+ struct pci_dev *pdev = to_pci_dev(dev);
+
+ pci_read_config_word(pdev, 0x50, &misc);
+ if (on == 0)
+ pci_write_config_word(pdev, 0x50, misc & 0xfcff);
+ else
+ pci_write_config_word(pdev, 0x50, misc | 0x0300);
+}
+EXPORT_SYMBOL_GPL(sb800_prefetch);
+
int usb_amd_find_chipset_info(void)
{
u8 rev = 0;