vserver 2.0 rc7
[linux-2.6.git] / drivers / usb / host / ehci.h
index e28d197..4df4982 100644 (file)
@@ -47,6 +47,12 @@ struct ehci_stats {
 #define        EHCI_MAX_ROOT_PORTS     15              /* see HCS_N_PORTS */
 
 struct ehci_hcd {                      /* one per controller */
+       /* glue to PCI and HCD framework */
+       struct ehci_caps __iomem *caps;
+       struct ehci_regs __iomem *regs;
+       struct ehci_dbg_port __iomem *debug;
+
+       __u32                   hcs_params;     /* cached register copy */
        spinlock_t              lock;
 
        /* async schedule support */
@@ -82,12 +88,7 @@ struct ehci_hcd {                    /* one per controller */
        unsigned long           next_statechange;
        u32                     command;
 
-       unsigned                is_arc_rh_tt:1; /* ARC roothub with TT */
-
-       /* glue to PCI and HCD framework */
-       struct ehci_caps __iomem *caps;
-       struct ehci_regs __iomem *regs;
-       __u32                   hcs_params;     /* cached register copy */
+       unsigned                is_tdi_rh_tt:1; /* TDI roothub with TT */
 
        /* irq statistics */
 #ifdef EHCI_STATS
@@ -165,7 +166,7 @@ struct ehci_caps {
        /* these fields are specified as 8 and 16 bit registers,
         * but some hosts can't perform 8 or 16 bit PCI accesses.
         */
-       u32     hc_capbase;
+       u32             hc_capbase;
 #define HC_LENGTH(p)           (((p)>>00)&0x00ff)      /* bits 7:0 */
 #define HC_VERSION(p)          (((p)>>16)&0xffff)      /* bits 31:16 */
        u32             hcs_params;     /* HCSPARAMS - offset 0x4 */
@@ -273,7 +274,7 @@ struct ehci_dbg_port {
 #define DBGP_ENABLED   (1<<28)
 #define DBGP_DONE      (1<<16)
 #define DBGP_INUSE     (1<<10)
-#define DBGP_ERRCODE(x)        (((x)>>7)&0x0f)
+#define DBGP_ERRCODE(x)        (((x)>>7)&0x07)
 #      define DBGP_ERR_BAD     1
 #      define DBGP_ERR_SIGNAL  2
 #define DBGP_ERROR     (1<<6)
@@ -282,11 +283,11 @@ struct ehci_dbg_port {
 #define DBGP_LEN(x)    (((x)>>0)&0x0f)
        u32     pids;
 #define DBGP_PID_GET(x)                (((x)>>16)&0xff)
-#define DBGP_PID_SET(data,tok) (((data)<<8)|(tok));
+#define DBGP_PID_SET(data,tok) (((data)<<8)|(tok))
        u32     data03;
        u32     data47;
        u32     address;
-#define DBGP_EPADDR(dev,ep)    (((dev)<<8)|(ep));
+#define DBGP_EPADDR(dev,ep)    (((dev)<<8)|(ep))
 } __attribute__ ((packed));
 
 /*-------------------------------------------------------------------------*/
@@ -364,7 +365,7 @@ union ehci_shadow {
        struct ehci_itd         *itd;           /* Q_TYPE_ITD */
        struct ehci_sitd        *sitd;          /* Q_TYPE_SITD */
        struct ehci_fstn        *fstn;          /* Q_TYPE_FSTN */
-       u32                     *hw_next;       /* (all types) */
+       __le32                  *hw_next;       /* (all types) */
        void                    *ptr;
 };
 
@@ -430,7 +431,7 @@ struct ehci_iso_packet {
        __le32                  transaction;    /* itd->hw_transaction[i] |= */
        u8                      cross;          /* buf crosses pages */
        /* for full speed OUT splits */
-       u16                     buf1;
+       u32                     buf1;
 };
 
 /* temporary schedule data for packets from iso urbs (both speeds)
@@ -599,13 +600,13 @@ struct ehci_fstn {
  * needed (mostly in root hub code).
  */
 
-#define        ehci_is_ARC(e)                  ((e)->is_arc_rh_tt)
+#define        ehci_is_TDI(e)                  ((e)->is_tdi_rh_tt)
 
 /* Returns the speed of a device attached to a port on the root hub. */
 static inline unsigned int
 ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
 {
-       if (ehci_is_ARC(ehci)) {
+       if (ehci_is_TDI(ehci)) {
                switch ((portsc>>26)&3) {
                case 0:
                        return 0;
@@ -621,7 +622,7 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
 
 #else
 
-#define        ehci_is_ARC(e)                  (0)
+#define        ehci_is_TDI(e)                  (0)
 
 #define        ehci_port_speed(ehci, portsc)   (1<<USB_PORT_FEAT_HIGHSPEED)
 #endif