1 Index: linux-2.6.25.4/drivers/usb/host/ohci-ssb.c
2 ===================================================================
3 --- linux-2.6.25.4.orig/drivers/usb/host/ohci-ssb.c
4 +++ linux-2.6.25.4/drivers/usb/host/ohci-ssb.c
5 @@ -142,10 +142,59 @@ static int ssb_ohci_attach(struct ssb_de
9 - if (dev->id.coreid == SSB_DEV_USB11_HOSTDEV)
11 + * THE FOLLOWING COMMENTS PRESERVED FROM GPL SOURCE RELEASE
13 + * The USB core requires a special bit to be set during core
14 + * reset to enable host (OHCI) mode. Resetting the SB core in
15 + * pcibios_enable_device() is a hack for compatibility with
16 + * vanilla usb-ohci so that it does not have to know about
17 + * SB. A driver that wants to use the USB core in device mode
18 + * should know about SB and should reset the bit back to 0
19 + * after calling pcibios_enable_device().
22 + if (dev->id.coreid == SSB_DEV_USB11_HOSTDEV) {
23 flags |= SSB_OHCI_TMSLOW_HOSTMODE;
24 + ssb_device_enable(dev, flags);
28 + * USB 2.0 special considerations:
30 + * 1. Since the core supports both OHCI and EHCI functions, it must
31 + * only be reset once.
33 + * 2. In addition to the standard SB reset sequence, the Host Control
34 + * Register must be programmed to bring the USB core and various
35 + * phy components out of reset.
38 + else if (dev->id.coreid == SSB_DEV_USB20_HOST) {
39 +#warning FIX ME need test for core being up & exit
40 + ssb_device_enable(dev, 0);
41 + ssb_write32(dev, 0x200, 0x7ff);
43 + if (dev->id.revision == 1) { // bug in rev 1
45 + /* Change Flush control reg */
46 + tmp = ssb_read32(dev, 0x400);
48 + ssb_write32(dev, 0x400, tmp);
49 + tmp = ssb_read32(dev, 0x400);
50 + printk("USB20H fcr: 0x%0x\n", tmp);
52 + /* Change Shim control reg */
53 + tmp = ssb_read32(dev, 0x304);
55 + ssb_write32(dev, 0x304, tmp);
56 + tmp = ssb_read32(dev, 0x304);
57 + printk("USB20H shim: 0x%0x\n", tmp);
61 + ssb_device_enable(dev, 0);
63 - ssb_device_enable(dev, flags);
65 hcd = usb_create_hcd(&ssb_ohci_hc_driver, dev->dev,
67 @@ -236,6 +285,7 @@ static int ssb_ohci_resume(struct ssb_de
68 static const struct ssb_device_id ssb_ohci_table[] = {
69 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB11_HOSTDEV, SSB_ANY_REV),
70 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB11_HOST, SSB_ANY_REV),
71 + SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB20_HOST, SSB_ANY_REV),
74 MODULE_DEVICE_TABLE(ssb, ssb_ohci_table);