diff options
author | Alek Du <alek.du@intel.com> | 2010-06-04 03:47:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:35 -0400 |
commit | aa4d8342988d0c1a79ff19b2ede1e81dfbb16ea5 (patch) | |
tree | 7139abaa1f63af9a70405cec91dcd1b8a30bf0d0 /include/linux/usb/ehci_def.h | |
parent | e644814a2ccbfe171d2fd2b9bca491ead1ae1a96 (diff) |
USB: EHCI: EHCI 1.1 addendum: preparation
EHCI 1.1 addendum introduced several energy efficiency extensions for
EHCI USB host controllers:
1. LPM (link power management)
2. Per-port change
3. Shorter periodic frame list
4. Hardware prefetching
This patch is intended to define the HW bits and debug interface for
EHCI 1.1 addendum. The LPM and Per-port change patches will be sent out
after this patch.
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/ehci_def.h')
-rw-r--r-- | include/linux/usb/ehci_def.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index 80287af2a738..2e262cb15425 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -39,6 +39,12 @@ struct ehci_caps { | |||
39 | #define HCS_N_PORTS(p) (((p)>>0)&0xf) /* bits 3:0, ports on HC */ | 39 | #define HCS_N_PORTS(p) (((p)>>0)&0xf) /* bits 3:0, ports on HC */ |
40 | 40 | ||
41 | u32 hcc_params; /* HCCPARAMS - offset 0x8 */ | 41 | u32 hcc_params; /* HCCPARAMS - offset 0x8 */ |
42 | /* EHCI 1.1 addendum */ | ||
43 | #define HCC_32FRAME_PERIODIC_LIST(p) ((p)&(1 << 19)) | ||
44 | #define HCC_PER_PORT_CHANGE_EVENT(p) ((p)&(1 << 18)) | ||
45 | #define HCC_LPM(p) ((p)&(1 << 17)) | ||
46 | #define HCC_HW_PREFETCH(p) ((p)&(1 << 16)) | ||
47 | |||
42 | #define HCC_EXT_CAPS(p) (((p)>>8)&0xff) /* for pci extended caps */ | 48 | #define HCC_EXT_CAPS(p) (((p)>>8)&0xff) /* for pci extended caps */ |
43 | #define HCC_ISOC_CACHE(p) ((p)&(1 << 7)) /* true: can cache isoc frame */ | 49 | #define HCC_ISOC_CACHE(p) ((p)&(1 << 7)) /* true: can cache isoc frame */ |
44 | #define HCC_ISOC_THRES(p) (((p)>>4)&0x7) /* bits 6:4, uframes cached */ | 50 | #define HCC_ISOC_THRES(p) (((p)>>4)&0x7) /* bits 6:4, uframes cached */ |
@@ -54,6 +60,13 @@ struct ehci_regs { | |||
54 | 60 | ||
55 | /* USBCMD: offset 0x00 */ | 61 | /* USBCMD: offset 0x00 */ |
56 | u32 command; | 62 | u32 command; |
63 | |||
64 | /* EHCI 1.1 addendum */ | ||
65 | #define CMD_HIRD (0xf<<24) /* host initiated resume duration */ | ||
66 | #define CMD_PPCEE (1<<15) /* per port change event enable */ | ||
67 | #define CMD_FSP (1<<14) /* fully synchronized prefetch */ | ||
68 | #define CMD_ASPE (1<<13) /* async schedule prefetch enable */ | ||
69 | #define CMD_PSPE (1<<12) /* periodic schedule prefetch enable */ | ||
57 | /* 23:16 is r/w intr rate, in microframes; default "8" == 1/msec */ | 70 | /* 23:16 is r/w intr rate, in microframes; default "8" == 1/msec */ |
58 | #define CMD_PARK (1<<11) /* enable "park" on async qh */ | 71 | #define CMD_PARK (1<<11) /* enable "park" on async qh */ |
59 | #define CMD_PARK_CNT(c) (((c)>>8)&3) /* how many transfers to park for */ | 72 | #define CMD_PARK_CNT(c) (((c)>>8)&3) /* how many transfers to park for */ |
@@ -67,6 +80,7 @@ struct ehci_regs { | |||
67 | 80 | ||
68 | /* USBSTS: offset 0x04 */ | 81 | /* USBSTS: offset 0x04 */ |
69 | u32 status; | 82 | u32 status; |
83 | #define STS_PPCE_MASK (0xff<<16) /* Per-Port change event 1-16 */ | ||
70 | #define STS_ASS (1<<15) /* Async Schedule Status */ | 84 | #define STS_ASS (1<<15) /* Async Schedule Status */ |
71 | #define STS_PSS (1<<14) /* Periodic Schedule Status */ | 85 | #define STS_PSS (1<<14) /* Periodic Schedule Status */ |
72 | #define STS_RECL (1<<13) /* Reclamation */ | 86 | #define STS_RECL (1<<13) /* Reclamation */ |
@@ -100,6 +114,14 @@ struct ehci_regs { | |||
100 | 114 | ||
101 | /* PORTSC: offset 0x44 */ | 115 | /* PORTSC: offset 0x44 */ |
102 | u32 port_status[0]; /* up to N_PORTS */ | 116 | u32 port_status[0]; /* up to N_PORTS */ |
117 | /* EHCI 1.1 addendum */ | ||
118 | #define PORTSC_SUSPEND_STS_ACK 0 | ||
119 | #define PORTSC_SUSPEND_STS_NYET 1 | ||
120 | #define PORTSC_SUSPEND_STS_STALL 2 | ||
121 | #define PORTSC_SUSPEND_STS_ERR 3 | ||
122 | |||
123 | #define PORT_DEV_ADDR (0x7f<<25) /* device address */ | ||
124 | #define PORT_SSTS (0x3<<23) /* suspend status */ | ||
103 | /* 31:23 reserved */ | 125 | /* 31:23 reserved */ |
104 | #define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */ | 126 | #define PORT_WKOC_E (1<<22) /* wake on overcurrent (enable) */ |
105 | #define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */ | 127 | #define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */ |
@@ -115,6 +137,7 @@ struct ehci_regs { | |||
115 | #define PORT_USB11(x) (((x)&(3<<10)) == (1<<10)) /* USB 1.1 device */ | 137 | #define PORT_USB11(x) (((x)&(3<<10)) == (1<<10)) /* USB 1.1 device */ |
116 | /* 11:10 for detecting lowspeed devices (reset vs release ownership) */ | 138 | /* 11:10 for detecting lowspeed devices (reset vs release ownership) */ |
117 | /* 9 reserved */ | 139 | /* 9 reserved */ |
140 | #define PORT_LPM (1<<9) /* LPM transaction */ | ||
118 | #define PORT_RESET (1<<8) /* reset port */ | 141 | #define PORT_RESET (1<<8) /* reset port */ |
119 | #define PORT_SUSPEND (1<<7) /* suspend port */ | 142 | #define PORT_SUSPEND (1<<7) /* suspend port */ |
120 | #define PORT_RESUME (1<<6) /* resume it */ | 143 | #define PORT_RESUME (1<<6) /* resume it */ |