Merge git://git.marvell.com/orion into devel
This commit is contained in:
@@ -33,8 +33,9 @@
|
||||
/*
|
||||
* Implement Orion USB controller specification guidelines
|
||||
*/
|
||||
static void orion_usb_setup(struct usb_hcd *hcd)
|
||||
static void orion_usb_phy_v1_setup(struct usb_hcd *hcd)
|
||||
{
|
||||
/* The below GLs are according to the Orion Errata document */
|
||||
/*
|
||||
* Clear interrupt cause and mask
|
||||
*/
|
||||
@@ -258,9 +259,19 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
|
||||
ehci_orion_conf_mbus_windows(hcd, pd->dram);
|
||||
|
||||
/*
|
||||
* setup Orion USB controller
|
||||
* setup Orion USB controller.
|
||||
*/
|
||||
orion_usb_setup(hcd);
|
||||
switch (pd->phy_version) {
|
||||
case EHCI_PHY_NA: /* dont change USB phy settings */
|
||||
break;
|
||||
case EHCI_PHY_ORION:
|
||||
orion_usb_phy_v1_setup(hcd);
|
||||
break;
|
||||
case EHCI_PHY_DD:
|
||||
case EHCI_PHY_KW:
|
||||
default:
|
||||
printk(KERN_WARNING "Orion ehci -USB phy version isn't supported.\n");
|
||||
}
|
||||
|
||||
err = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED);
|
||||
if (err)
|
||||
|
@@ -169,18 +169,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
||||
}
|
||||
break;
|
||||
case PCI_VENDOR_ID_ATI:
|
||||
/* SB700 old version has a bug in EHCI controller,
|
||||
/* SB600 and old version of SB700 have a bug in EHCI controller,
|
||||
* which causes usb devices lose response in some cases.
|
||||
*/
|
||||
if (pdev->device == 0x4396) {
|
||||
if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) {
|
||||
p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
|
||||
PCI_DEVICE_ID_ATI_SBX00_SMBUS,
|
||||
NULL);
|
||||
if (!p_smbus)
|
||||
break;
|
||||
rev = p_smbus->revision;
|
||||
if ((rev == 0x3a) || (rev == 0x3b)) {
|
||||
if ((pdev->device == 0x4386) || (rev == 0x3a)
|
||||
|| (rev == 0x3b)) {
|
||||
u8 tmp;
|
||||
ehci_info(ehci, "applying AMD SB600/SB700 USB "
|
||||
"freeze workaround\n");
|
||||
pci_read_config_byte(pdev, 0x53, &tmp);
|
||||
pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
|
||||
}
|
||||
|
@@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
|
||||
* the async ring; just the I/O watchdog. Note that if a
|
||||
* SHRINK were pending, OFF would never be requested.
|
||||
*/
|
||||
enum ehci_timer_action oldactions = ehci->actions;
|
||||
if (timer_pending(&ehci->watchdog)
|
||||
&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
|
||||
& ehci->actions))
|
||||
return;
|
||||
|
||||
if (!test_and_set_bit (action, &ehci->actions)) {
|
||||
unsigned long t;
|
||||
|
||||
if (timer_pending(&ehci->watchdog)
|
||||
&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
|
||||
& oldactions))
|
||||
return;
|
||||
|
||||
switch (action) {
|
||||
case TIMER_IO_WATCHDOG:
|
||||
t = EHCI_IO_JIFFIES;
|
||||
@@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
|
||||
t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1;
|
||||
break;
|
||||
}
|
||||
mod_timer(&ehci->watchdog, round_jiffies(t + jiffies));
|
||||
mod_timer(&ehci->watchdog, t + jiffies);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user