aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2010-12-15 14:18:11 -0500
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-01-14 15:52:00 -0800
commit50d64676d132a8a72a1a1657d7b3e6efa53da1ac (patch)
treeb2c5b85f15e4068d29fd41d2e6e65f81dd7339d5 /drivers/usb/host/xhci.h
parent7961acd7327fe48e55abef277630abdbb3f2081a (diff)
downloadkernel_samsung_smdk4412-50d64676d132a8a72a1a1657d7b3e6efa53da1ac.zip
kernel_samsung_smdk4412-50d64676d132a8a72a1a1657d7b3e6efa53da1ac.tar.gz
kernel_samsung_smdk4412-50d64676d132a8a72a1a1657d7b3e6efa53da1ac.tar.bz2
xhci: Remove more doorbell-related reads
The unused space in the doorbell is now marked as RsvdZ, not RsvdP, so we can avoid reading the doorbell before writing it. Update the doorbell-related defines to produce the entire doorbell value from a single macro. Document the doorbell format in a comment. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 170c367..7f236fd 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -436,22 +436,18 @@ struct xhci_run_regs {
/**
* struct doorbell_array
*
+ * Bits 0 - 7: Endpoint target
+ * Bits 8 - 15: RsvdZ
+ * Bits 16 - 31: Stream ID
+ *
* Section 5.6
*/
struct xhci_doorbell_array {
u32 doorbell[256];
};
-#define DB_TARGET_MASK 0xFFFFFF00
-#define DB_STREAM_ID_MASK 0x0000FFFF
-#define DB_TARGET_HOST 0x0
-#define DB_STREAM_ID_HOST 0x0
-#define DB_MASK (0xff << 8)
-
-/* Endpoint Target - bits 0:7 */
-#define EPI_TO_DB(p) (((p) + 1) & 0xff)
-#define STREAM_ID_TO_DB(p) (((p) & 0xffff) << 16)
-
+#define DB_VALUE(ep, stream) ((((ep) + 1) & 0xff) | ((stream) << 16))
+#define DB_VALUE_HOST 0x00000000
/**
* struct xhci_protocol_caps