clean up spurious differences in usbehci.h versions Reference: /n/atom/patch/applied2013/ehciskew Date: Sat Sep 21 20:53:32 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/kw/usbehci.h Sat Sep 21 20:53:23 2013 +++ /sys/src/9/kw/usbehci.h Sat Sep 21 20:53:24 2013 @@ -16,9 +16,7 @@ typedef struct Qtree Qtree; #pragma incomplete Ctlr; -#pragma incomplete Ecapio; #pragma incomplete Eopio; -#pragma incomplete Edbgio; #pragma incomplete Isoio; #pragma incomplete Poll; #pragma incomplete Qh; @@ -68,7 +66,7 @@ ulong intr; /* 08 interrupt enable */ ulong frno; /* 0c frame index */ ulong seg; /* 10 bits 63:32 of EHCI datastructs (unused) */ - ulong frbase; /* 14 frame list base addr, 4096-byte boundary */ + ulong frbase; /* 14 frame list base pa (note: just 32 bits), 4096-byte boundary */ ulong link; /* 18 link for async list */ uchar d2c[0x40-0x1c]; /* 1c dummy */ ulong config; /* 40 1: all ports default-routed to this HC */ @@ -101,6 +99,8 @@ }; extern int ehcidebug; +extern Ecapio *ehcidebugcapio; +extern int ehcidebugport; void ehcilinkage(Hci *hp); void ehcimeminit(Ctlr *ctlr); --- /sys/src/9/omap/usbehci.h Sat Sep 21 20:53:25 2013 +++ /sys/src/9/omap/usbehci.h Sat Sep 21 20:53:26 2013 @@ -44,7 +44,7 @@ Qh* qhs; /* async Qh circular list for bulk/ctl */ Qtree* tree; /* tree of Qhs for the periodic list */ int ntree; /* number of dummy qhs in tree */ - Qh* intrqhs; /* list of (not dummy) qhs in tree */ + Qh* intrqhs; /* list of (not dummy) qhs in tree */ Isoio* iso; /* list of active Iso I/O */ ulong load; ulong isoload; @@ -66,7 +66,7 @@ ulong intr; /* 08 interrupt enable */ ulong frno; /* 0c frame index */ ulong seg; /* 10 bits 63:32 of EHCI datastructs (unused) */ - ulong frbase; /* 14 frame list base addr, 4096-byte boundary */ + ulong frbase; /* 14 frame list base pa (note: just 32 bits), 4096-byte boundary */ ulong link; /* 18 link for async list */ uchar d2c[0x40-0x1c]; /* 1c dummy */ ulong config; /* 40 1: all ports default-routed to this HC */ @@ -94,10 +94,9 @@ P1ulpi_bypass = 1<<0, /* utmi if set; else ulpi */ }; +extern int ehcidebug; extern Ecapio *ehcidebugcapio; extern int ehcidebugport; - -extern int ehcidebug; void ehcilinkage(Hci *hp); void ehcimeminit(Ctlr *ctlr); --- /sys/src/9/teg2/usbehci.h Sat Sep 21 20:53:27 2013 +++ /sys/src/9/teg2/usbehci.h Sat Sep 21 20:53:27 2013 @@ -3,10 +3,10 @@ #undef ddprint #undef deprint #undef ddeprint -#define dprint if(ehcidebug)print -#define ddprint if(ehcidebug>1)print -#define deprint if(ehcidebug || ep->debug)print -#define ddeprint if(ehcidebug>1 || ep->debug>1)print +#define dprint(...) do if(ehcidebug)print(__VA_ARGS__); while(0) +#define ddprint(...) do if(ehcidebug>1)print(__VA_ARGS__); while(0) +#define deprint(...) do if(ehcidebug || ep->debug)print(__VA_ARGS__); while(0) +#define ddeprint(...) do if(ehcidebug>1 || ep->debug>1)print(__VA_ARGS__); while(0) typedef struct Ctlr Ctlr; typedef struct Eopio Eopio; @@ -44,7 +44,7 @@ Qh* qhs; /* async Qh circular list for bulk/ctl */ Qtree* tree; /* tree of Qhs for the periodic list */ int ntree; /* number of dummy qhs in tree */ - Qh* intrqhs; /* list of (not dummy) qhs in tree */ + Qh* intrqhs; /* list of (not dummy) qhs in tree */ Isoio* iso; /* list of active Iso I/O */ ulong load; ulong isoload; @@ -66,7 +66,7 @@ ulong intr; /* 08 interrupt enable */ ulong frno; /* 0c frame index */ ulong seg; /* 10 bits 63:32 of EHCI datastructs (unused) */ - ulong frbase; /* 14 frame list base addr, 4096-byte boundary */ + ulong frbase; /* 14 frame list base pa (note: just 32 bits), 4096-byte boundary */ ulong link; /* 18 link for async list */ uchar d2c[0x40-0x1c]; /* 1c dummy */ ulong config; /* 40 1: all ports default-routed to this HC */ @@ -77,27 +77,14 @@ ulong insn[6]; /* implementation-specific */ }; -typedef struct Uhh Uhh; -struct Uhh { - ulong revision; /* ro */ - uchar _pad0[0x10-0x4]; - ulong sysconfig; - ulong sysstatus; /* ro */ - - uchar _pad1[0x40-0x18]; - ulong hostconfig; - ulong debug_csr; -}; - enum { /* hostconfig bits */ P1ulpi_bypass = 1<<0, /* utmi if set; else ulpi */ }; +extern int ehcidebug; extern Ecapio *ehcidebugcapio; extern int ehcidebugport; - -extern int ehcidebug; void ehcilinkage(Hci *hp); void ehcimeminit(Ctlr *ctlr);