aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-dbg.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-04-27 22:57:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:48 -0400
commit0f2a79300a1471cf92ab43af165ea13555c8b0a5 (patch)
treea46c63777a6040708500aefdbc31e0a0404d2e4a /drivers/usb/host/xhci-dbg.c
parent7206b00164a1c3ca533e01db285955617e1019f8 (diff)
USB: xhci: Root hub support.
Add functionality for getting port status and hub descriptor for xHCI root hubs. This is WIP because the USB 3.0 hub descriptor is different from the USB 2.0 hub descriptor. For now, we lie about the root hub descriptor because the changes won't effect how the core talks to the root hub. Later we will need to add the USB 3.0 hub descriptor for real hubs, and this code might change. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-dbg.c')
-rw-r--r--drivers/usb/host/xhci-dbg.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 6dbf7d856f80..570cd4820458 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -152,6 +152,31 @@ void xhci_print_op_regs(struct xhci_hcd *xhci)
152 xhci_print_status(xhci); 152 xhci_print_status(xhci);
153} 153}
154 154
155void xhci_print_ports(struct xhci_hcd *xhci)
156{
157 u32 __iomem *addr;
158 int i, j;
159 int ports;
160 char *names[NUM_PORT_REGS] = {
161 "status",
162 "power",
163 "link",
164 "reserved",
165 };
166
167 ports = HCS_MAX_PORTS(xhci->hcs_params1);
168 addr = &xhci->op_regs->port_status_base;
169 for (i = 0; i < ports; i++) {
170 for (j = 0; j < NUM_PORT_REGS; ++j) {
171 xhci_dbg(xhci, "0x%x port %s reg = 0x%x\n",
172 (unsigned int) addr,
173 names[j],
174 (unsigned int) xhci_readl(xhci, addr));
175 addr++;
176 }
177 }
178}
179
155void xhci_print_ir_set(struct xhci_hcd *xhci, struct intr_reg *ir_set, int set_num) 180void xhci_print_ir_set(struct xhci_hcd *xhci, struct intr_reg *ir_set, int set_num)
156{ 181{
157 void *addr; 182 void *addr;
@@ -228,6 +253,7 @@ void xhci_print_registers(struct xhci_hcd *xhci)
228{ 253{
229 xhci_print_cap_regs(xhci); 254 xhci_print_cap_regs(xhci);
230 xhci_print_op_regs(xhci); 255 xhci_print_op_regs(xhci);
256 xhci_print_ports(xhci);
231} 257}
232 258
233void xhci_print_trb_offsets(struct xhci_hcd *xhci, union xhci_trb *trb) 259void xhci_print_trb_offsets(struct xhci_hcd *xhci, union xhci_trb *trb)