~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/usb/host/ohci-hcd.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * OHCI HCD (Host Controller Driver) for USB.
 
2
 * Open Host Controller Interface (OHCI) driver for USB.
 
3
 *
 
4
 * Maintainer: Alan Stern <stern@rowland.harvard.edu>
3
5
 *
4
6
 * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
5
7
 * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
162
164
                // case PIPE_INTERRUPT:
163
165
                // case PIPE_BULK:
164
166
                default:
165
 
                        /* one TD for every 4096 Bytes (can be upto 8K) */
 
167
                        /* one TD for every 4096 Bytes (can be up to 8K) */
166
168
                        size += urb->transfer_buffer_length / 4096;
167
169
                        /* ... and for any remaining bytes ... */
168
170
                        if ((urb->transfer_buffer_length % 4096) != 0)
764
766
        if (ints == ~(u32)0) {
765
767
                disable (ohci);
766
768
                ohci_dbg (ohci, "device removed!\n");
 
769
                usb_hc_died(hcd);
767
770
                return IRQ_HANDLED;
768
771
        }
769
772
 
771
774
        ints &= ohci_readl(ohci, &regs->intrenable);
772
775
 
773
776
        /* interrupt for some other device? */
774
 
        if (ints == 0)
 
777
        if (ints == 0 || unlikely(hcd->state == HC_STATE_HALT))
775
778
                return IRQ_NOTMINE;
776
779
 
777
780
        if (ints & OHCI_INTR_UE) {
788
791
                } else {
789
792
                        disable (ohci);
790
793
                        ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");
 
794
                        usb_hc_died(hcd);
791
795
                }
792
796
 
793
797
                ohci_dump (ohci, 1);
1014
1018
#define OMAP3_PLATFORM_DRIVER   ohci_hcd_omap3_driver
1015
1019
#endif
1016
1020
 
1017
 
#ifdef CONFIG_ARCH_LH7A404
1018
 
#include "ohci-lh7a404.c"
1019
 
#define PLATFORM_DRIVER         ohci_hcd_lh7a404_driver
1020
 
#endif
1021
 
 
1022
1021
#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
1023
1022
#include "ohci-pxa27x.c"
1024
1023
#define PLATFORM_DRIVER         ohci_hcd_pxa27x_driver
1110
1109
#define PLATFORM_DRIVER         ohci_hcd_cns3xxx_driver
1111
1110
#endif
1112
1111
 
 
1112
#ifdef CONFIG_USB_OHCI_ATH79
 
1113
#include "ohci-ath79.c"
 
1114
#define PLATFORM_DRIVER         ohci_hcd_ath79_driver
 
1115
#endif
 
1116
 
1113
1117
#if     !defined(PCI_DRIVER) &&         \
1114
1118
        !defined(PLATFORM_DRIVER) &&    \
1115
1119
        !defined(OMAP1_PLATFORM_DRIVER) &&      \
1168
1172
#endif
1169
1173
 
1170
1174
#ifdef OF_PLATFORM_DRIVER
1171
 
        retval = of_register_platform_driver(&OF_PLATFORM_DRIVER);
 
1175
        retval = platform_driver_register(&OF_PLATFORM_DRIVER);
1172
1176
        if (retval < 0)
1173
1177
                goto error_of_platform;
1174
1178
#endif
1227
1231
 error_sa1111:
1228
1232
#endif
1229
1233
#ifdef OF_PLATFORM_DRIVER
1230
 
        of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
 
1234
        platform_driver_unregister(&OF_PLATFORM_DRIVER);
1231
1235
 error_of_platform:
1232
1236
#endif
1233
1237
#ifdef PLATFORM_DRIVER
1275
1279
        sa1111_driver_unregister(&SA1111_DRIVER);
1276
1280
#endif
1277
1281
#ifdef OF_PLATFORM_DRIVER
1278
 
        of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
 
1282
        platform_driver_unregister(&OF_PLATFORM_DRIVER);
1279
1283
#endif
1280
1284
#ifdef PLATFORM_DRIVER
1281
1285
        platform_driver_unregister(&PLATFORM_DRIVER);