USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
[safe/jmp/linux-2.6] / drivers / usb / host / ohci.h
index 47c5c66..5bf15fe 100644 (file)
@@ -371,6 +371,7 @@ struct ohci_hcd {
         * other external transceivers should be software-transparent
         */
        struct otg_transceiver  *transceiver;
+       void (*start_hnp)(struct ohci_hcd *ohci);
 
        /*
         * memory management for queue data structures
@@ -399,6 +400,9 @@ struct ohci_hcd {
 #define        OHCI_QUIRK_ZFMICRO      0x20                    /* Compaq ZFMicro chipset*/
 #define        OHCI_QUIRK_NEC          0x40                    /* lost interrupts */
 #define        OHCI_QUIRK_FRAME_NO     0x80                    /* no big endian frame_no shift */
+#define        OHCI_QUIRK_HUB_POWER    0x100                   /* distrust firmware power/oc setup */
+#define        OHCI_QUIRK_AMD_ISO      0x200                   /* ISO transfers*/
+#define        OHCI_QUIRK_AMD_PREFETCH 0x400                   /* pre-fetch for ISO transfer */
        // there are also chip quirks/bugs in init logic
 
        struct work_struct      nec_work;       /* Worker for NEC quirk */
@@ -408,6 +412,13 @@ struct ohci_hcd {
        unsigned                eds_scheduled;
        struct ed               *ed_to_check;
        unsigned                zf_delay;
+
+#ifdef DEBUG
+       struct dentry           *debug_dir;
+       struct dentry           *debug_async;
+       struct dentry           *debug_periodic;
+       struct dentry           *debug_registers;
+#endif
 };
 
 #ifdef CONFIG_PCI
@@ -419,6 +430,14 @@ static inline int quirk_zfmicro(struct ohci_hcd *ohci)
 {
        return ohci->flags & OHCI_QUIRK_ZFMICRO;
 }
+static inline int quirk_amdiso(struct ohci_hcd *ohci)
+{
+       return ohci->flags & OHCI_QUIRK_AMD_ISO;
+}
+static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
+{
+       return ohci->flags & OHCI_QUIRK_AMD_PREFETCH;
+}
 #else
 static inline int quirk_nec(struct ohci_hcd *ohci)
 {
@@ -428,6 +447,14 @@ static inline int quirk_zfmicro(struct ohci_hcd *ohci)
 {
        return 0;
 }
+static inline int quirk_amdiso(struct ohci_hcd *ohci)
+{
+       return 0;
+}
+static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
+{
+       return 0;
+}
 #endif
 
 /* convert between an hcd pointer and the corresponding ohci_hcd */
@@ -522,15 +549,7 @@ static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
  * Big-endian read/write functions are arch-specific.
  * Other arches can be added if/when they're needed.
  *
- * REVISIT: arch/powerpc now has readl/writel_be, so the
- * definition below can die once the STB04xxx support is
- * finally ported over.
  */
-#if defined(CONFIG_PPC) && !defined(CONFIG_PPC_MERGE)
-#define readl_be(addr)         in_be32((__force unsigned *)addr)
-#define writel_be(val, addr)   out_be32((__force unsigned *)addr, val)
-#endif
-
 static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
                                        __hc32 __iomem * regs)
 {