diff options
author | Alek Du <alek.du@intel.com> | 2009-07-13 19:23:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 09:46:29 -0400 |
commit | 3807e26d69b9ad3864fe03224ebebc9610d5802e (patch) | |
tree | 3c85a5cb0686a7e72255c523b963942bbfc60b7f /drivers/usb/host/ehci.h | |
parent | 403dbd36739e344d2d25f56ebbe342248487bd48 (diff) |
USB: EHCI: split ehci_qh into hw and sw parts
The ehci_qh structure merged hw and sw together which is not good:
1. More and more items are being added into ehci_qh, the ehci_qh software
part are unnecessary to be allocated in DMA qh_pool.
2. If HCD has local SRAM, the sw part will consume it too, and it won't
bring any benefit.
3. For non-cache-coherence system, the entire ehci_qh is uncachable, actually
we only need the hw part to be uncacheable. Spliting them will let the sw
part to be cacheable.
Signed-off-by: Alek Du <alek.du@intel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r-- | drivers/usb/host/ehci.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index acec10894078..fa12f20fbfe2 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -299,8 +299,8 @@ union ehci_shadow { | |||
299 | * These appear in both the async and (for interrupt) periodic schedules. | 299 | * These appear in both the async and (for interrupt) periodic schedules. |
300 | */ | 300 | */ |
301 | 301 | ||
302 | struct ehci_qh { | 302 | /* first part defined by EHCI spec */ |
303 | /* first part defined by EHCI spec */ | 303 | struct ehci_qh_hw { |
304 | __hc32 hw_next; /* see EHCI 3.6.1 */ | 304 | __hc32 hw_next; /* see EHCI 3.6.1 */ |
305 | __hc32 hw_info1; /* see EHCI 3.6.2 */ | 305 | __hc32 hw_info1; /* see EHCI 3.6.2 */ |
306 | #define QH_HEAD 0x00008000 | 306 | #define QH_HEAD 0x00008000 |
@@ -318,7 +318,10 @@ struct ehci_qh { | |||
318 | __hc32 hw_token; | 318 | __hc32 hw_token; |
319 | __hc32 hw_buf [5]; | 319 | __hc32 hw_buf [5]; |
320 | __hc32 hw_buf_hi [5]; | 320 | __hc32 hw_buf_hi [5]; |
321 | } __attribute__ ((aligned(32))); | ||
321 | 322 | ||
323 | struct ehci_qh { | ||
324 | struct ehci_qh_hw *hw; | ||
322 | /* the rest is HCD-private */ | 325 | /* the rest is HCD-private */ |
323 | dma_addr_t qh_dma; /* address of qh */ | 326 | dma_addr_t qh_dma; /* address of qh */ |
324 | union ehci_shadow qh_next; /* ptr to qh; or periodic */ | 327 | union ehci_shadow qh_next; /* ptr to qh; or periodic */ |
@@ -358,7 +361,7 @@ struct ehci_qh { | |||
358 | 361 | ||
359 | struct usb_device *dev; /* access to TT */ | 362 | struct usb_device *dev; /* access to TT */ |
360 | unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ | 363 | unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ |
361 | } __attribute__ ((aligned (32))); | 364 | }; |
362 | 365 | ||
363 | /*-------------------------------------------------------------------------*/ | 366 | /*-------------------------------------------------------------------------*/ |
364 | 367 | ||