diff options
author | Lin Wang <lin.x.wang@intel.com> | 2015-01-09 09:06:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 13:05:47 -0500 |
commit | dc0b177cf8be1e7371cfb92cfbccac595bf8dac8 (patch) | |
tree | 05c3e7f1459aabe9863b651f0011fea5e47fa1b8 /drivers/usb | |
parent | 92c9691bf38007853345f719543908d1383e3e46 (diff) |
xhci: remove unused parameter 'xhci' in function xhci_handshake().
Parameter 'xhci' is no longer be used in function xhci_handshake(),
just remove it.
Signed-off-by: Lin Wang <lin.x.wang@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 19 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 3 |
3 files changed, 11 insertions, 13 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index e692e769c50c..c84a959b1480 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -299,7 +299,7 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci) | |||
299 | * seconds), then it should assume that the there are | 299 | * seconds), then it should assume that the there are |
300 | * larger problems with the xHC and assert HCRST. | 300 | * larger problems with the xHC and assert HCRST. |
301 | */ | 301 | */ |
302 | ret = xhci_handshake(xhci, &xhci->op_regs->cmd_ring, | 302 | ret = xhci_handshake(&xhci->op_regs->cmd_ring, |
303 | CMD_RING_RUNNING, 0, 5 * 1000 * 1000); | 303 | CMD_RING_RUNNING, 0, 5 * 1000 * 1000); |
304 | if (ret < 0) { | 304 | if (ret < 0) { |
305 | xhci_err(xhci, "Stopped the command ring failed, " | 305 | xhci_err(xhci, "Stopped the command ring failed, " |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 93200dbc028c..5ec74e213dab 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -60,8 +60,7 @@ MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default"); | |||
60 | * handshake done). There are two failure modes: "usec" have passed (major | 60 | * handshake done). There are two failure modes: "usec" have passed (major |
61 | * hardware flakeout), or the register reads as all-ones (hardware removed). | 61 | * hardware flakeout), or the register reads as all-ones (hardware removed). |
62 | */ | 62 | */ |
63 | int xhci_handshake(struct xhci_hcd *xhci, void __iomem *ptr, | 63 | int xhci_handshake(void __iomem *ptr, u32 mask, u32 done, int usec) |
64 | u32 mask, u32 done, int usec) | ||
65 | { | 64 | { |
66 | u32 result; | 65 | u32 result; |
67 | 66 | ||
@@ -111,7 +110,7 @@ int xhci_halt(struct xhci_hcd *xhci) | |||
111 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Halt the HC"); | 110 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Halt the HC"); |
112 | xhci_quiesce(xhci); | 111 | xhci_quiesce(xhci); |
113 | 112 | ||
114 | ret = xhci_handshake(xhci, &xhci->op_regs->status, | 113 | ret = xhci_handshake(&xhci->op_regs->status, |
115 | STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC); | 114 | STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC); |
116 | if (!ret) { | 115 | if (!ret) { |
117 | xhci->xhc_state |= XHCI_STATE_HALTED; | 116 | xhci->xhc_state |= XHCI_STATE_HALTED; |
@@ -140,7 +139,7 @@ static int xhci_start(struct xhci_hcd *xhci) | |||
140 | * Wait for the HCHalted Status bit to be 0 to indicate the host is | 139 | * Wait for the HCHalted Status bit to be 0 to indicate the host is |
141 | * running. | 140 | * running. |
142 | */ | 141 | */ |
143 | ret = xhci_handshake(xhci, &xhci->op_regs->status, | 142 | ret = xhci_handshake(&xhci->op_regs->status, |
144 | STS_HALT, 0, XHCI_MAX_HALT_USEC); | 143 | STS_HALT, 0, XHCI_MAX_HALT_USEC); |
145 | if (ret == -ETIMEDOUT) | 144 | if (ret == -ETIMEDOUT) |
146 | xhci_err(xhci, "Host took too long to start, " | 145 | xhci_err(xhci, "Host took too long to start, " |
@@ -175,7 +174,7 @@ int xhci_reset(struct xhci_hcd *xhci) | |||
175 | command |= CMD_RESET; | 174 | command |= CMD_RESET; |
176 | writel(command, &xhci->op_regs->command); | 175 | writel(command, &xhci->op_regs->command); |
177 | 176 | ||
178 | ret = xhci_handshake(xhci, &xhci->op_regs->command, | 177 | ret = xhci_handshake(&xhci->op_regs->command, |
179 | CMD_RESET, 0, 10 * 1000 * 1000); | 178 | CMD_RESET, 0, 10 * 1000 * 1000); |
180 | if (ret) | 179 | if (ret) |
181 | return ret; | 180 | return ret; |
@@ -186,7 +185,7 @@ int xhci_reset(struct xhci_hcd *xhci) | |||
186 | * xHCI cannot write to any doorbells or operational registers other | 185 | * xHCI cannot write to any doorbells or operational registers other |
187 | * than status until the "Controller Not Ready" flag is cleared. | 186 | * than status until the "Controller Not Ready" flag is cleared. |
188 | */ | 187 | */ |
189 | ret = xhci_handshake(xhci, &xhci->op_regs->status, | 188 | ret = xhci_handshake(&xhci->op_regs->status, |
190 | STS_CNR, 0, 10 * 1000 * 1000); | 189 | STS_CNR, 0, 10 * 1000 * 1000); |
191 | 190 | ||
192 | for (i = 0; i < 2; ++i) { | 191 | for (i = 0; i < 2; ++i) { |
@@ -929,7 +928,7 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup) | |||
929 | /* Some chips from Fresco Logic need an extraordinary delay */ | 928 | /* Some chips from Fresco Logic need an extraordinary delay */ |
930 | delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1; | 929 | delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1; |
931 | 930 | ||
932 | if (xhci_handshake(xhci, &xhci->op_regs->status, | 931 | if (xhci_handshake(&xhci->op_regs->status, |
933 | STS_HALT, STS_HALT, delay)) { | 932 | STS_HALT, STS_HALT, delay)) { |
934 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); | 933 | xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); |
935 | spin_unlock_irq(&xhci->lock); | 934 | spin_unlock_irq(&xhci->lock); |
@@ -944,7 +943,7 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup) | |||
944 | command = readl(&xhci->op_regs->command); | 943 | command = readl(&xhci->op_regs->command); |
945 | command |= CMD_CSS; | 944 | command |= CMD_CSS; |
946 | writel(command, &xhci->op_regs->command); | 945 | writel(command, &xhci->op_regs->command); |
947 | if (xhci_handshake(xhci, &xhci->op_regs->status, | 946 | if (xhci_handshake(&xhci->op_regs->status, |
948 | STS_SAVE, 0, 10 * 1000)) { | 947 | STS_SAVE, 0, 10 * 1000)) { |
949 | xhci_warn(xhci, "WARN: xHC save state timeout\n"); | 948 | xhci_warn(xhci, "WARN: xHC save state timeout\n"); |
950 | spin_unlock_irq(&xhci->lock); | 949 | spin_unlock_irq(&xhci->lock); |
@@ -1011,7 +1010,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
1011 | command = readl(&xhci->op_regs->command); | 1010 | command = readl(&xhci->op_regs->command); |
1012 | command |= CMD_CRS; | 1011 | command |= CMD_CRS; |
1013 | writel(command, &xhci->op_regs->command); | 1012 | writel(command, &xhci->op_regs->command); |
1014 | if (xhci_handshake(xhci, &xhci->op_regs->status, | 1013 | if (xhci_handshake(&xhci->op_regs->status, |
1015 | STS_RESTORE, 0, 10 * 1000)) { | 1014 | STS_RESTORE, 0, 10 * 1000)) { |
1016 | xhci_warn(xhci, "WARN: xHC restore state timeout\n"); | 1015 | xhci_warn(xhci, "WARN: xHC restore state timeout\n"); |
1017 | spin_unlock_irq(&xhci->lock); | 1016 | spin_unlock_irq(&xhci->lock); |
@@ -1082,7 +1081,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
1082 | command = readl(&xhci->op_regs->command); | 1081 | command = readl(&xhci->op_regs->command); |
1083 | command |= CMD_RUN; | 1082 | command |= CMD_RUN; |
1084 | writel(command, &xhci->op_regs->command); | 1083 | writel(command, &xhci->op_regs->command); |
1085 | xhci_handshake(xhci, &xhci->op_regs->status, STS_HALT, | 1084 | xhci_handshake(&xhci->op_regs->status, STS_HALT, |
1086 | 0, 250 * 1000); | 1085 | 0, 250 * 1000); |
1087 | 1086 | ||
1088 | /* step 5: walk topology and initialize portsc, | 1087 | /* step 5: walk topology and initialize portsc, |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index cc7c5bb7cbcf..eeea5c074493 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1733,8 +1733,7 @@ void xhci_free_command(struct xhci_hcd *xhci, | |||
1733 | 1733 | ||
1734 | /* xHCI host controller glue */ | 1734 | /* xHCI host controller glue */ |
1735 | typedef void (*xhci_get_quirks_t)(struct device *, struct xhci_hcd *); | 1735 | typedef void (*xhci_get_quirks_t)(struct device *, struct xhci_hcd *); |
1736 | int xhci_handshake(struct xhci_hcd *xhci, void __iomem *ptr, | 1736 | int xhci_handshake(void __iomem *ptr, u32 mask, u32 done, int usec); |
1737 | u32 mask, u32 done, int usec); | ||
1738 | void xhci_quiesce(struct xhci_hcd *xhci); | 1737 | void xhci_quiesce(struct xhci_hcd *xhci); |
1739 | int xhci_halt(struct xhci_hcd *xhci); | 1738 | int xhci_halt(struct xhci_hcd *xhci); |
1740 | int xhci_reset(struct xhci_hcd *xhci); | 1739 | int xhci_reset(struct xhci_hcd *xhci); |