diff options
Diffstat (limited to 'drivers/usb/host/ohci.h')
-rw-r--r-- | drivers/usb/host/ohci.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 0795b934d00c..8ff6f7ea96fd 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h | |||
@@ -344,6 +344,12 @@ typedef struct urb_priv { | |||
344 | * a subset of what the full implementation needs. (Linus) | 344 | * a subset of what the full implementation needs. (Linus) |
345 | */ | 345 | */ |
346 | 346 | ||
347 | enum ohci_rh_state { | ||
348 | OHCI_RH_HALTED, | ||
349 | OHCI_RH_SUSPENDED, | ||
350 | OHCI_RH_RUNNING | ||
351 | }; | ||
352 | |||
347 | struct ohci_hcd { | 353 | struct ohci_hcd { |
348 | spinlock_t lock; | 354 | spinlock_t lock; |
349 | 355 | ||
@@ -384,6 +390,7 @@ struct ohci_hcd { | |||
384 | /* | 390 | /* |
385 | * driver state | 391 | * driver state |
386 | */ | 392 | */ |
393 | enum ohci_rh_state rh_state; | ||
387 | int num_ports; | 394 | int num_ports; |
388 | int load [NUM_INTS]; | 395 | int load [NUM_INTS]; |
389 | u32 hc_control; /* copy of hc control reg */ | 396 | u32 hc_control; /* copy of hc control reg */ |
@@ -679,11 +686,6 @@ static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci, | |||
679 | 686 | ||
680 | /*-------------------------------------------------------------------------*/ | 687 | /*-------------------------------------------------------------------------*/ |
681 | 688 | ||
682 | static inline void disable (struct ohci_hcd *ohci) | ||
683 | { | ||
684 | ohci_to_hcd(ohci)->state = HC_STATE_HALT; | ||
685 | } | ||
686 | |||
687 | #define FI 0x2edf /* 12000 bits per frame (-1) */ | 689 | #define FI 0x2edf /* 12000 bits per frame (-1) */ |
688 | #define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) | 690 | #define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) |
689 | #define FIT (1 << 31) | 691 | #define FIT (1 << 31) |
@@ -707,7 +709,7 @@ static inline void periodic_reinit (struct ohci_hcd *ohci) | |||
707 | #define read_roothub(hc, register, mask) ({ \ | 709 | #define read_roothub(hc, register, mask) ({ \ |
708 | u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \ | 710 | u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \ |
709 | if (temp == -1) \ | 711 | if (temp == -1) \ |
710 | disable (hc); \ | 712 | hc->rh_state = OHCI_RH_HALTED; \ |
711 | else if (hc->flags & OHCI_QUIRK_AMD756) \ | 713 | else if (hc->flags & OHCI_QUIRK_AMD756) \ |
712 | while (temp & mask) \ | 714 | while (temp & mask) \ |
713 | temp = ohci_readl (hc, &hc->regs->roothub.register); \ | 715 | temp = ohci_readl (hc, &hc->regs->roothub.register); \ |