aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2011-01-25 05:41:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-04 14:42:52 -0500
commitb7d5b439b7a40dd0a0202fe1c118615a3fcc3b25 (patch)
tree8a9be25f550e4a9921733d5b0dae9c8fcdc274f6 /drivers/usb/host/ohci-hcd.c
parenta51ea8cc9cfcfd719240455ff8f217b4f165d1d0 (diff)
USB host: Move AMD PLL quirk to pci-quirks.c
This patch moves the AMD PLL quirk code in OHCI/EHCI driver to pci-quirks.c, and exports the functions to be used by xHCI driver later. AMD PLL quirk disable the optional PM feature inside specific SB700/SB800/Hudson-2/3 platforms under the following conditions: 1. If an isochronous device is connected to OHCI/EHCI/xHCI port and is active; 2. Optional PM feature that powers down the internal Bus PLL when the link is in low power state is enabled. Without AMD PLL quirk, USB isochronous stream may stutter or have breaks occasionally, which greatly impair the performance of audio/video streams. Currently AMD PLL quirk is implemented in OHCI and EHCI driver, and will be added to xHCI driver too. They are doing similar things actually, so move the quirk code to pci-quirks.c, which has several advantages: 1. Remove duplicate defines and functions in OHCI/EHCI (and xHCI) driver and make them cleaner; 2. AMD chipset information will be probed only once and then stored. Currently they're probed during every OHCI/EHCI initialization, move the detect code to pci-quirks.c saves the repeat detect cost; 3. Build up synchronization among OHCI/EHCI/xHCI driver. In current code, every host controller enable/disable PLL only according to its own status, and may enable PLL while there is still isoc transfer on other HCs. Move the quirk to pci-quirks.c prevents this issue. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alex He <alex.he@amd.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 759a12ff8048..7b791bf1e7b4 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -75,6 +75,7 @@ static const char hcd_name [] = "ohci_hcd";
75#define STATECHANGE_DELAY msecs_to_jiffies(300) 75#define STATECHANGE_DELAY msecs_to_jiffies(300)
76 76
77#include "ohci.h" 77#include "ohci.h"
78#include "pci-quirks.h"
78 79
79static void ohci_dump (struct ohci_hcd *ohci, int verbose); 80static void ohci_dump (struct ohci_hcd *ohci, int verbose);
80static int ohci_init (struct ohci_hcd *ohci); 81static int ohci_init (struct ohci_hcd *ohci);
@@ -85,18 +86,8 @@ static int ohci_restart (struct ohci_hcd *ohci);
85#endif 86#endif
86 87
87#ifdef CONFIG_PCI 88#ifdef CONFIG_PCI
88static void quirk_amd_pll(int state);
89static void amd_iso_dev_put(void);
90static void sb800_prefetch(struct ohci_hcd *ohci, int on); 89static void sb800_prefetch(struct ohci_hcd *ohci, int on);
91#else 90#else
92static inline void quirk_amd_pll(int state)
93{
94 return;
95}
96static inline void amd_iso_dev_put(void)
97{
98 return;
99}
100static inline void sb800_prefetch(struct ohci_hcd *ohci, int on) 91static inline void sb800_prefetch(struct ohci_hcd *ohci, int on)
101{ 92{
102 return; 93 return;
@@ -912,7 +903,7 @@ static void ohci_stop (struct usb_hcd *hcd)
912 if (quirk_zfmicro(ohci)) 903 if (quirk_zfmicro(ohci))
913 del_timer(&ohci->unlink_watchdog); 904 del_timer(&ohci->unlink_watchdog);
914 if (quirk_amdiso(ohci)) 905 if (quirk_amdiso(ohci))
915 amd_iso_dev_put(); 906 usb_amd_dev_put();
916 907
917 remove_debug_files (ohci); 908 remove_debug_files (ohci);
918 ohci_mem_cleanup (ohci); 909 ohci_mem_cleanup (ohci);