diff options
Diffstat (limited to 'include/linux/usb/ehci_def.h')
-rw-r--r-- | include/linux/usb/ehci_def.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index e49dfd45baa4..7cc95ee3606b 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -25,10 +25,15 @@ | |||
25 | struct ehci_caps { | 25 | struct ehci_caps { |
26 | /* these fields are specified as 8 and 16 bit registers, | 26 | /* these fields are specified as 8 and 16 bit registers, |
27 | * but some hosts can't perform 8 or 16 bit PCI accesses. | 27 | * but some hosts can't perform 8 or 16 bit PCI accesses. |
28 | * some hosts treat caplength and hciversion as parts of a 32-bit | ||
29 | * register, others treat them as two separate registers, this | ||
30 | * affects the memory map for big endian controllers. | ||
28 | */ | 31 | */ |
29 | u32 hc_capbase; | 32 | u32 hc_capbase; |
30 | #define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */ | 33 | #define HC_LENGTH(ehci, p) (0x00ff&((p) >> /* bits 7:0 / offset 00h */ \ |
31 | #define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */ | 34 | (ehci_big_endian_capbase(ehci) ? 24 : 0))) |
35 | #define HC_VERSION(ehci, p) (0xffff&((p) >> /* bits 31:16 / offset 02h */ \ | ||
36 | (ehci_big_endian_capbase(ehci) ? 0 : 16))) | ||
32 | u32 hcs_params; /* HCSPARAMS - offset 0x4 */ | 37 | u32 hcs_params; /* HCSPARAMS - offset 0x4 */ |
33 | #define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ | 38 | #define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ |
34 | #define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ | 39 | #define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ |
@@ -52,7 +57,7 @@ struct ehci_caps { | |||
52 | #define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ | 57 | #define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ |
53 | #define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ | 58 | #define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ |
54 | u8 portroute[8]; /* nibbles for routing - offset 0xC */ | 59 | u8 portroute[8]; /* nibbles for routing - offset 0xC */ |
55 | } __attribute__ ((packed)); | 60 | }; |
56 | 61 | ||
57 | 62 | ||
58 | /* Section 2.3 Host Controller Operational Registers */ | 63 | /* Section 2.3 Host Controller Operational Registers */ |
@@ -150,7 +155,7 @@ struct ehci_regs { | |||
150 | #define PORT_CSC (1<<1) /* connect status change */ | 155 | #define PORT_CSC (1<<1) /* connect status change */ |
151 | #define PORT_CONNECT (1<<0) /* device connected */ | 156 | #define PORT_CONNECT (1<<0) /* device connected */ |
152 | #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) | 157 | #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) |
153 | } __attribute__ ((packed)); | 158 | }; |
154 | 159 | ||
155 | #define USBMODE 0x68 /* USB Device mode */ | 160 | #define USBMODE 0x68 /* USB Device mode */ |
156 | #define USBMODE_SDIS (1<<3) /* Stream disable */ | 161 | #define USBMODE_SDIS (1<<3) /* Stream disable */ |
@@ -194,7 +199,7 @@ struct ehci_dbg_port { | |||
194 | u32 data47; | 199 | u32 data47; |
195 | u32 address; | 200 | u32 address; |
196 | #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) | 201 | #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) |
197 | } __attribute__ ((packed)); | 202 | }; |
198 | 203 | ||
199 | #ifdef CONFIG_EARLY_PRINTK_DBGP | 204 | #ifdef CONFIG_EARLY_PRINTK_DBGP |
200 | #include <linux/init.h> | 205 | #include <linux/init.h> |