Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Trailing whitespace.
details: https://anonhg.NetBSD.org/src/rev/cb6871c1c372
branches: trunk
changeset: 331489:cb6871c1c372
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Aug 12 08:06:07 2014 +0000
description:
Trailing whitespace.
diffstat:
sys/dev/usb/motg.c | 134 ++++++++++++++++++++++++++--------------------------
1 files changed, 67 insertions(+), 67 deletions(-)
diffs (truncated from 427 to 300 lines):
diff -r daf4053f36f4 -r cb6871c1c372 sys/dev/usb/motg.c
--- a/sys/dev/usb/motg.c Tue Aug 12 06:57:20 2014 +0000
+++ b/sys/dev/usb/motg.c Tue Aug 12 08:06:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $ */
+/* $NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -182,7 +182,7 @@
#endif
static void
-musbotg_pull_common(struct motg_softc *sc, uint8_t on)
+musbotg_pull_common(struct motg_softc *sc, uint8_t on)
{
uint8_t val;
@@ -259,7 +259,7 @@
UWRITE2(sc, MUSB2_REG_INTRXE, 0);
/* disable pullup */
- musbotg_pull_common(sc, 0);
+ musbotg_pull_common(sc, 0);
/* disable double packet buffering XXX what's this ? */
UWRITE2(sc, MUSB2_REG_RXDBDIS, 0xFFFF);
@@ -288,11 +288,11 @@
UWRITE1(sc, MUSB2_REG_TESTMODE, 0);
- /* set default value */
+ /* set default value */
UWRITE1(sc, MUSB2_REG_MISC, 0);
- /* select endpoint index 0 */
+ /* select endpoint index 0 */
UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
@@ -318,11 +318,11 @@
dynfifo = (val & MUSB2_MASK_CD_DYNFIFOSZ) ? 1 : 0;
- if (dynfifo) {
+ if (dynfifo) {
aprint_normal_dev(sc->sc_dev, "Dynamic FIFO sizing detected, "
"assuming 16Kbytes of FIFO RAM\n");
- }
-
+ }
+
DPRINTF(("HW version: 0x%04x\n", UREAD1(sc, MUSB2_REG_HWVERS)));
/* initialise endpoint profiles */
@@ -335,7 +335,7 @@
for (i = 1; i <= sc->sc_ep_max; i++) {
int fiforx_size, fifotx_size, fifo_size;
- /* select endpoint */
+ /* select endpoint */
UWRITE1(sc, MUSB2_REG_EPINDEX, i);
val = UREAD1(sc, MUSB2_REG_FSIZE);
@@ -351,24 +351,24 @@
} else if (i < 10) {
fifo_size = 10; /* 1K */
} else {
- fifo_size = 7; /* 128 bytes */
- }
+ fifo_size = 7; /* 128 bytes */
+ }
if (fiforx_size && (i <= nrx)) {
fiforx_size = fifo_size;
if (fifo_size > 7) {
#if 0
- UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
+ UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
MUSB2_VAL_FIFOSZ(fifo_size) |
MUSB2_MASK_FIFODB);
#else
- UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
+ UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
MUSB2_VAL_FIFOSZ(fifo_size));
#endif
} else {
- UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
+ UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
MUSB2_VAL_FIFOSZ(fifo_size));
}
- UWRITE2(sc, MUSB2_REG_RXFIFOADD,
+ UWRITE2(sc, MUSB2_REG_RXFIFOADD,
offset >> 3);
offset += (1 << fiforx_size);
}
@@ -376,21 +376,21 @@
fifotx_size = fifo_size;
if (fifo_size > 7) {
#if 0
- UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
- MUSB2_VAL_FIFOSZ(fifo_size) |
+ UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+ MUSB2_VAL_FIFOSZ(fifo_size) |
MUSB2_MASK_FIFODB);
#else
- UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
- MUSB2_VAL_FIFOSZ(fifo_size));
+ UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+ MUSB2_VAL_FIFOSZ(fifo_size));
#endif
} else {
- UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
- MUSB2_VAL_FIFOSZ(fifo_size));
- }
-
- UWRITE2(sc, MUSB2_REG_TXFIFOADD,
+ UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+ MUSB2_VAL_FIFOSZ(fifo_size));
+ }
+
+ UWRITE2(sc, MUSB2_REG_TXFIFOADD,
offset >> 3);
-
+
offset += (1 << fifotx_size);
}
}
@@ -405,7 +405,7 @@
sc->sc_out_ep[i].ep_number = sc->sc_in_ep[i].ep_number = i;
}
-
+
DPRINTF(("Dynamic FIFO size = %d bytes\n", offset));
/* turn on default interrupts */
@@ -513,7 +513,7 @@
break;
case UE_BULK:
case UE_INTERRUPT:
- DPRINTFN(MD_BULK,
+ DPRINTFN(MD_BULK,
("new %s %s pipe wMaxPacketSize %d\n",
(ed->bmAttributes & UE_XFERTYPE) == UE_BULK ?
"bulk" : "interrupt",
@@ -1503,7 +1503,7 @@
DPRINTFN(MD_CTRL,
("motg_device_ctrl_start1 pipe %p xfer %p status %d\n",
otgpipe, xfer, (xfer != NULL) ? xfer->status : 0));
-
+
if (xfer != NULL) {
/* move this pipe to the end of the list */
SIMPLEQ_REMOVE(&ep->ep_pipes, otgpipe,
@@ -1539,7 +1539,7 @@
else
ep->need_short_xfer = 0;
/* now we need send this request */
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_start1(%p) send data %p len %d short %d speed %d to %d\n",
xfer, ep->data, ep->datalen, ep->need_short_xfer, xfer->pipe->device->speed,
xfer->pipe->device->address));
@@ -1597,13 +1597,13 @@
ep->phase != STATUS_IN)
panic("motg_device_ctrl_intr_rx: bad phase %d", ep->phase);
#endif
- /* select endpoint 0 */
+ /* select endpoint 0 */
UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
/* read out FIFO status */
csr = UREAD1(sc, MUSB2_REG_TXCSRL);
- DPRINTFN(MD_CTRL,
- ("motg_device_ctrl_intr_rx phase %d csr 0x%x xfer %p status %d\n",
+ DPRINTFN(MD_CTRL,
+ ("motg_device_ctrl_intr_rx phase %d csr 0x%x xfer %p status %d\n",
ep->phase, csr, xfer, (xfer != NULL) ? xfer->status : 0));
if (csr & MUSB2_MASK_CSR0L_NAKTIMO) {
@@ -1636,8 +1636,8 @@
goto complete;
}
datalen = UREAD2(sc, MUSB2_REG_RXCOUNT);
- DPRINTFN(MD_CTRL,
- ("motg_device_ctrl_intr_rx phase %d datalen %d\n",
+ DPRINTFN(MD_CTRL,
+ ("motg_device_ctrl_intr_rx phase %d datalen %d\n",
ep->phase, datalen));
KASSERT(UGETW(xfer->pipe->endpoint->edesc->wMaxPacketSize) > 0);
max_datalen = min(UGETW(xfer->pipe->endpoint->edesc->wMaxPacketSize),
@@ -1656,7 +1656,7 @@
xfer->actlen += datalen;
if (((vaddr_t)data & 0x3) == 0 &&
(datalen >> 2) > 0) {
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_rx r4 data %p len %d\n",
data, datalen));
bus_space_read_multi_4(sc->sc_iot, sc->sc_ioh,
@@ -1664,7 +1664,7 @@
data += (datalen & ~0x3);
datalen -= (datalen & ~0x3);
}
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_rx r1 data %p len %d\n",
data, datalen));
if (datalen) {
@@ -1722,12 +1722,12 @@
ep->phase != STATUS_OUT)
panic("motg_device_ctrl_intr_tx: bad phase %d", ep->phase);
#endif
- /* select endpoint 0 */
+ /* select endpoint 0 */
UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
csr = UREAD1(sc, MUSB2_REG_TXCSRL);
- DPRINTFN(MD_CTRL,
- ("motg_device_ctrl_intr_tx phase %d csr 0x%x xfer %p status %d\n",
+ DPRINTFN(MD_CTRL,
+ ("motg_device_ctrl_intr_tx phase %d csr 0x%x xfer %p status %d\n",
ep->phase, csr, xfer, (xfer != NULL) ? xfer->status : 0));
if (csr & MUSB2_MASK_CSR0L_RXSTALL) {
@@ -1742,7 +1742,7 @@
/* flush fifo */
while (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) {
UWRITE1(sc, MUSB2_REG_TXCSRH,
- UREAD1(sc, MUSB2_REG_TXCSRH) |
+ UREAD1(sc, MUSB2_REG_TXCSRH) |
MUSB2_MASK_CSR0H_FFLUSH);
csr = UREAD1(sc, MUSB2_REG_TXCSRL);
}
@@ -1767,7 +1767,7 @@
* we have sent status and got no error;
* declare transfer complete
*/
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_tx %p status %d complete\n",
xfer, xfer->status));
new_status = USBD_NORMAL_COMPLETION;
@@ -1778,13 +1778,13 @@
ep->need_short_xfer = 0;
/* one more data phase */
if (xfer->request.bmRequestType & UT_READ) {
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_tx %p to DATA_IN\n", xfer));
motg_device_ctrl_read(xfer);
return;
} /* else fall back to DATA_OUT */
} else {
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_tx %p to STATUS_IN, csrh 0x%x\n",
xfer, UREAD1(sc, MUSB2_REG_TXCSRH)));
ep->phase = STATUS_IN;
@@ -1806,7 +1806,7 @@
datalen = min(ep->datalen,
UGETW(xfer->pipe->endpoint->edesc->wMaxPacketSize));
ep->phase = DATA_OUT;
- DPRINTFN(MD_CTRL,
+ DPRINTFN(MD_CTRL,
("motg_device_ctrl_intr_tx %p to DATA_OUT, csrh 0x%x\n", xfer,
UREAD1(sc, MUSB2_REG_TXCSRH)));
if (datalen) {
@@ -1983,9 +1983,9 @@
else
ep->need_short_xfer = 0;
/* now we need send this request */
- DPRINTFN(MD_BULK,
+ DPRINTFN(MD_BULK,
("motg_device_data_start1(%p) %s data %p len %d short %d speed %d to %d\n",
- xfer,
+ xfer,
UE_GET_DIR(xfer->pipe->endpoint->edesc->bEndpointAddress) == UE_DIR_IN ? "read" : "write",
ep->data, ep->datalen, ep->need_short_xfer, xfer->pipe->device->speed,
xfer->pipe->device->address));
@@ -2032,7 +2032,7 @@
val &= ~MUSB2_MASK_CSRH_RXDT_VAL;
UWRITE1(sc, MUSB2_REG_RXCSRH, val);
- DPRINTFN(MD_BULK,
+ DPRINTFN(MD_BULK,
("motg_device_data_read %p to DATA_IN on ep %d, csrh 0x%x\n",
xfer, otgpipe->hw_ep->ep_number, UREAD1(sc, MUSB2_REG_RXCSRH)));
/* start transaction */
@@ -2056,7 +2056,7 @@
Home |
Main Index |
Thread Index |
Old Index