Merge git://git.marvell.com/orion into devel

This commit is contained in:
Russell King 2008-12-13 09:12:51 +00:00 • committed by Russell King
commit 72aaf09fda
294 changed files with 5979 additions and 2409 deletions

View file

@ -2363,6 +2363,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
nuke(loop_ep, -ESHUTDOWN);
spin_unlock_irqrestore(&udc_controller->lock, flags);
/* report disconnect; the controller is already quiesced */
driver->disconnect(&udc_controller->gadget);
/* unbind gadget and unhook driver. */
driver->unbind(&udc_controller->gadget);
udc_controller->gadget.dev.driver = NULL;

View file

@ -1836,6 +1836,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
nuke(loop_ep, -ESHUTDOWN);
spin_unlock_irqrestore(&udc_controller->lock, flags);
/* report disconnect; the controller is already quiesced */
driver->disconnect(&udc_controller->gadget);
/* unbind gadget and unhook driver. */
driver->unbind(&udc_controller->gadget);
udc_controller->gadget.dev.driver = NULL;

View file

@ -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)

View file

@ -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));
}

View file

@ -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);
}
}

View file

@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options)
err("no more memory");
goto reset_open_count;
}
kref_init(&tty->kref);
termios = kzalloc(sizeof(*termios), GFP_KERNEL);
if (!termios) {
retval = -ENOMEM;

View file

@ -224,6 +224,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
#define ONDA_VENDOR_ID 0x19d2
#define ONDA_PRODUCT_MSA501HS 0x0001
#define ONDA_PRODUCT_ET502HS 0x0002
#define ONDA_PRODUCT_MT503HS 0x0200
#define BANDRICH_VENDOR_ID 0x1A8D
#define BANDRICH_PRODUCT_C100_1 0x1002
@ -413,6 +414,40 @@ static struct usb_device_id option_ids[] = {
{ USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0003) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0004) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0005) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0006) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0007) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0008) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0009) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000a) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000b) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000c) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000d) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000e) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x000f) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0010) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0011) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0012) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0013) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0014) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0015) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0016) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0017) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0018) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0019) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0020) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0021) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0022) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0023) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0024) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0025) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0026) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0027) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0028) },
{ USB_DEVICE(ONDA_VENDOR_ID, 0x0029) },
{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) },
{ USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
{ USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },

View file

@ -318,6 +318,18 @@ UNUSUAL_DEV( 0x045a, 0x5210, 0x0101, 0x0101,
US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
#endif
/* Reported by Tamas Kerecsen <[email protected]>
* Obviously the PROM has not been customized by the VAR;
* the Vendor and Product string descriptors are:
* Generic Mass Storage (PROTOTYPE--Remember to change idVendor)
* Generic Manufacturer (PROTOTYPE--Remember to change idVendor)
*/
UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000,
"Mitac",
"GPS",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),
/*
* This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
* Reported by Pete Zaitcev <zaitcev@redhat.com>
@ -377,6 +389,13 @@ UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x0200,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),
/* Reported by Tobias Kunze Briseno <[email protected]> */
UNUSUAL_DEV( 0x04b0, 0x0403, 0x0200, 0x0200,
"NIKON",
"NIKON DSC D2H",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),
/* Reported by Milinevsky Dmitry <[email protected]> */
UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100,
"NIKON",