Skip to content

Commit b8c8fc6

Browse files
committed
Merge tag 'for-usb-next-2013-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
Sarah writes: xhci: Cleanup for 3.14: Sparse fixes, replace xhci_read/write, misc Hi Greg, Here's fifteen patches for 3.14. They include some non-urgent cleanups, and the patches to replace the xhci_read/write variants with standard read/write calls. As you asked, the big endian fixes are being queued for 3.14 and they aren't marked for stable. This also includes a couple of streams fixes, but not the full set from Hans. (I'll test those later this week.) The goal is to get both the xHCI driver streams support and the UAS driver fixed up for 3.14. We don't want to mark the fixes for stable, as all the code changes are really too big for stable. Please queue for 3.14. Sarah Sharp
2 parents 6ce4eac + 7dd09a1 commit b8c8fc6

File tree

7 files changed

+223
-262
lines changed

7 files changed

+223
-262
lines changed

drivers/usb/host/xhci-dbg.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
3232

3333
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
3434
xhci->cap_regs);
35-
temp = xhci_readl(xhci, &xhci->cap_regs->hc_capbase);
35+
temp = readl(&xhci->cap_regs->hc_capbase);
3636
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
3737
&xhci->cap_regs->hc_capbase, temp);
3838
xhci_dbg(xhci, "// CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
4444

4545
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
4646

47-
temp = xhci_readl(xhci, &xhci->cap_regs->run_regs_off);
47+
temp = readl(&xhci->cap_regs->run_regs_off);
4848
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
4949
&xhci->cap_regs->run_regs_off,
5050
(unsigned int) temp & RTSOFF_MASK);
5151
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
5252

53-
temp = xhci_readl(xhci, &xhci->cap_regs->db_off);
53+
temp = readl(&xhci->cap_regs->db_off);
5454
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", &xhci->cap_regs->db_off, temp);
5555
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
5656
}
@@ -61,15 +61,15 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
6161

6262
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
6363

64-
temp = xhci_readl(xhci, &xhci->cap_regs->hc_capbase);
64+
temp = readl(&xhci->cap_regs->hc_capbase);
6565
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
6666
(unsigned int) temp);
6767
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
6868
(unsigned int) HC_LENGTH(temp));
6969
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
7070
(unsigned int) HC_VERSION(temp));
7171

72-
temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params1);
72+
temp = readl(&xhci->cap_regs->hcs_params1);
7373
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
7474
(unsigned int) temp);
7575
xhci_dbg(xhci, " Max device slots: %u\n",
@@ -79,38 +79,38 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
7979
xhci_dbg(xhci, " Max ports: %u\n",
8080
(unsigned int) HCS_MAX_PORTS(temp));
8181

82-
temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params2);
82+
temp = readl(&xhci->cap_regs->hcs_params2);
8383
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
8484
(unsigned int) temp);
8585
xhci_dbg(xhci, " Isoc scheduling threshold: %u\n",
8686
(unsigned int) HCS_IST(temp));
8787
xhci_dbg(xhci, " Maximum allowed segments in event ring: %u\n",
8888
(unsigned int) HCS_ERST_MAX(temp));
8989

90-
temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params3);
90+
temp = readl(&xhci->cap_regs->hcs_params3);
9191
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
9292
(unsigned int) temp);
9393
xhci_dbg(xhci, " Worst case U1 device exit latency: %u\n",
9494
(unsigned int) HCS_U1_LATENCY(temp));
9595
xhci_dbg(xhci, " Worst case U2 device exit latency: %u\n",
9696
(unsigned int) HCS_U2_LATENCY(temp));
9797

98-
temp = xhci_readl(xhci, &xhci->cap_regs->hcc_params);
98+
temp = readl(&xhci->cap_regs->hcc_params);
9999
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
100100
xhci_dbg(xhci, " HC generates %s bit addresses\n",
101101
HCC_64BIT_ADDR(temp) ? "64" : "32");
102102
/* FIXME */
103103
xhci_dbg(xhci, " FIXME: more HCCPARAMS debugging\n");
104104

105-
temp = xhci_readl(xhci, &xhci->cap_regs->run_regs_off);
105+
temp = readl(&xhci->cap_regs->run_regs_off);
106106
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
107107
}
108108

109109
static void xhci_print_command_reg(struct xhci_hcd *xhci)
110110
{
111111
u32 temp;
112112

113-
temp = xhci_readl(xhci, &xhci->op_regs->command);
113+
temp = readl(&xhci->op_regs->command);
114114
xhci_dbg(xhci, "USBCMD 0x%x:\n", temp);
115115
xhci_dbg(xhci, " HC is %s\n",
116116
(temp & CMD_RUN) ? "running" : "being stopped");
@@ -128,7 +128,7 @@ static void xhci_print_status(struct xhci_hcd *xhci)
128128
{
129129
u32 temp;
130130

131-
temp = xhci_readl(xhci, &xhci->op_regs->status);
131+
temp = readl(&xhci->op_regs->status);
132132
xhci_dbg(xhci, "USBSTS 0x%x:\n", temp);
133133
xhci_dbg(xhci, " Event ring is %sempty\n",
134134
(temp & STS_EINT) ? "not " : "");
@@ -163,7 +163,7 @@ static void xhci_print_ports(struct xhci_hcd *xhci)
163163
for (j = 0; j < NUM_PORT_REGS; ++j) {
164164
xhci_dbg(xhci, "%p port %s reg = 0x%x\n",
165165
addr, names[j],
166-
(unsigned int) xhci_readl(xhci, addr));
166+
(unsigned int) readl(addr));
167167
addr++;
168168
}
169169
}
@@ -177,7 +177,7 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num)
177177
u64 temp_64;
178178

179179
addr = &ir_set->irq_pending;
180-
temp = xhci_readl(xhci, addr);
180+
temp = readl(addr);
181181
if (temp == XHCI_INIT_VALUE)
182182
return;
183183

@@ -187,28 +187,28 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num)
187187
(unsigned int)temp);
188188

189189
addr = &ir_set->irq_control;
190-
temp = xhci_readl(xhci, addr);
190+
temp = readl(addr);
191191
xhci_dbg(xhci, " %p: ir_set.control = 0x%x\n", addr,
192192
(unsigned int)temp);
193193

194194
addr = &ir_set->erst_size;
195-
temp = xhci_readl(xhci, addr);
195+
temp = readl(addr);
196196
xhci_dbg(xhci, " %p: ir_set.erst_size = 0x%x\n", addr,
197197
(unsigned int)temp);
198198

199199
addr = &ir_set->rsvd;
200-
temp = xhci_readl(xhci, addr);
200+
temp = readl(addr);
201201
if (temp != XHCI_INIT_VALUE)
202202
xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n",
203203
addr, (unsigned int)temp);
204204

205205
addr = &ir_set->erst_base;
206-
temp_64 = xhci_read_64(xhci, addr);
206+
temp_64 = readq(addr);
207207
xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n",
208208
addr, temp_64);
209209

210210
addr = &ir_set->erst_dequeue;
211-
temp_64 = xhci_read_64(xhci, addr);
211+
temp_64 = readq(addr);
212212
xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n",
213213
addr, temp_64);
214214
}
@@ -219,12 +219,12 @@ void xhci_print_run_regs(struct xhci_hcd *xhci)
219219
int i;
220220

221221
xhci_dbg(xhci, "xHCI runtime registers at %p:\n", xhci->run_regs);
222-
temp = xhci_readl(xhci, &xhci->run_regs->microframe_index);
222+
temp = readl(&xhci->run_regs->microframe_index);
223223
xhci_dbg(xhci, " %p: Microframe index = 0x%x\n",
224224
&xhci->run_regs->microframe_index,
225225
(unsigned int) temp);
226226
for (i = 0; i < 7; ++i) {
227-
temp = xhci_readl(xhci, &xhci->run_regs->rsvd[i]);
227+
temp = readl(&xhci->run_regs->rsvd[i]);
228228
if (temp != XHCI_INIT_VALUE)
229229
xhci_dbg(xhci, " WARN: %p: Rsvd[%i] = 0x%x\n",
230230
&xhci->run_regs->rsvd[i],
@@ -412,7 +412,7 @@ void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci)
412412
{
413413
u64 val;
414414

415-
val = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
415+
val = readq(&xhci->op_regs->cmd_ring);
416416
xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = @%08x\n",
417417
lower_32_bits(val));
418418
xhci_dbg(xhci, "// xHC command ring deq ptr high bits = @%08x\n",

0 commit comments

Comments
 (0)