diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2010-05-24 16:25:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-04 16:16:19 -0400 |
commit | 0238634d02dd10b678ebe9ea5d8803483277ee93 (patch) | |
tree | 5978fcfdc185e15e407fb16e52daef4225c19882 /drivers/usb/host/xhci.h | |
parent | ed07453fd356025cc25272629e982f5e4607632c (diff) |
USB: xhci: Print NEC firmware version.
The NEC xHCI host controller firmware version can be found by putting a
vendor-specific command on the command ring and extracting the BCD
encoded-version out of the vendor-specific event TRB.
The firmware version debug line in dmesg will look like:
xhci_hcd 0000:05:00.0: NEC firmware version 30.21
(NEC merged with Renesas Technologies and became Renesas Electronics on
April 1, 2010. I have their OK to merge this vendor-specific code.)
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Satoshi Otani <satoshi.otani.xm@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index dada2fb59261..8b4b7d39f79c 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -925,6 +925,7 @@ union xhci_trb { | |||
925 | /* TRB bit mask */ | 925 | /* TRB bit mask */ |
926 | #define TRB_TYPE_BITMASK (0xfc00) | 926 | #define TRB_TYPE_BITMASK (0xfc00) |
927 | #define TRB_TYPE(p) ((p) << 10) | 927 | #define TRB_TYPE(p) ((p) << 10) |
928 | #define TRB_FIELD_TO_TYPE(p) (((p) & TRB_TYPE_BITMASK) >> 10) | ||
928 | /* TRB type IDs */ | 929 | /* TRB type IDs */ |
929 | /* bulk, interrupt, isoc scatter/gather, and control data stage */ | 930 | /* bulk, interrupt, isoc scatter/gather, and control data stage */ |
930 | #define TRB_NORMAL 1 | 931 | #define TRB_NORMAL 1 |
@@ -992,6 +993,14 @@ union xhci_trb { | |||
992 | #define TRB_MFINDEX_WRAP 39 | 993 | #define TRB_MFINDEX_WRAP 39 |
993 | /* TRB IDs 40-47 reserved, 48-63 is vendor-defined */ | 994 | /* TRB IDs 40-47 reserved, 48-63 is vendor-defined */ |
994 | 995 | ||
996 | /* Nec vendor-specific command completion event. */ | ||
997 | #define TRB_NEC_CMD_COMP 48 | ||
998 | /* Get NEC firmware revision. */ | ||
999 | #define TRB_NEC_GET_FW 49 | ||
1000 | |||
1001 | #define NEC_FW_MINOR(p) (((p) >> 0) & 0xff) | ||
1002 | #define NEC_FW_MAJOR(p) (((p) >> 8) & 0xff) | ||
1003 | |||
995 | /* | 1004 | /* |
996 | * TRBS_PER_SEGMENT must be a multiple of 4, | 1005 | * TRBS_PER_SEGMENT must be a multiple of 4, |
997 | * since the command ring is 64-byte aligned. | 1006 | * since the command ring is 64-byte aligned. |
@@ -1172,6 +1181,7 @@ struct xhci_hcd { | |||
1172 | unsigned int quirks; | 1181 | unsigned int quirks; |
1173 | #define XHCI_LINK_TRB_QUIRK (1 << 0) | 1182 | #define XHCI_LINK_TRB_QUIRK (1 << 0) |
1174 | #define XHCI_RESET_EP_QUIRK (1 << 1) | 1183 | #define XHCI_RESET_EP_QUIRK (1 << 1) |
1184 | #define XHCI_NEC_HOST (1 << 2) | ||
1175 | }; | 1185 | }; |
1176 | 1186 | ||
1177 | /* For testing purposes */ | 1187 | /* For testing purposes */ |
@@ -1379,6 +1389,8 @@ void xhci_set_hc_event_deq(struct xhci_hcd *xhci); | |||
1379 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); | 1389 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); |
1380 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | 1390 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |
1381 | u32 slot_id); | 1391 | u32 slot_id); |
1392 | int xhci_queue_vendor_command(struct xhci_hcd *xhci, | ||
1393 | u32 field1, u32 field2, u32 field3, u32 field4); | ||
1382 | int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, | 1394 | int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, |
1383 | unsigned int ep_index); | 1395 | unsigned int ep_index); |
1384 | int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, | 1396 | int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, |