18 #include <linux/kernel.h>
19 #include <linux/errno.h>
31 fhci->usb_irq_stat[12]++;
35 for (i = 0; i < 12; ++
i) {
36 if (usb_er & (1 << i))
37 fhci->usb_irq_stat[
i]++;
41 static int fhci_dfs_regs_show(
struct seq_file *
s,
void *
v)
47 "mode: 0x%x\n" "addr: 0x%x\n"
48 "command: 0x%x\n" "ep0: 0x%x\n"
49 "event: 0x%x\n" "mask: 0x%x\n"
50 "status: 0x%x\n" "SOF timer: %d\n"
52 "lines status: 0x%x\n",
53 in_8(®s->usb_usmod),
in_8(®s->usb_usadr),
54 in_8(®s->usb_uscom),
in_be16(®s->usb_usep[0]),
63 static int fhci_dfs_irq_stat_show(
struct seq_file *s,
void *v)
66 int *usb_irq_stat = fhci->usb_irq_stat;
69 "RXB: %d\n" "TXB: %d\n" "BSY: %d\n"
70 "SOF: %d\n" "TXE0: %d\n" "TXE1: %d\n"
71 "TXE2: %d\n" "TXE3: %d\n" "IDLE: %d\n"
72 "RESET: %d\n" "SFT: %d\n" "MSF: %d\n"
74 usb_irq_stat[0], usb_irq_stat[1], usb_irq_stat[2],
75 usb_irq_stat[3], usb_irq_stat[4], usb_irq_stat[5],
76 usb_irq_stat[6], usb_irq_stat[7], usb_irq_stat[8],
77 usb_irq_stat[9], usb_irq_stat[10], usb_irq_stat[11],
94 .open = fhci_dfs_regs_open,
101 .open = fhci_dfs_irq_stat_open,
109 struct device *
dev = fhci_to_hcd(fhci)->self.controller;
112 if (!fhci->dfs_root) {
118 fhci->dfs_root, fhci, &fhci_dfs_regs_fops);
122 &fhci_dfs_irq_stat_fops);
124 WARN_ON(!fhci->dfs_regs || !fhci->dfs_irq_stat);
132 if (fhci->dfs_irq_stat)