aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_dsps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r--drivers/usb/musb/musb_dsps.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 6bb89715b637..3a18e44e9391 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -38,6 +38,7 @@
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/usb/nop-usb-xceiv.h> 39#include <linux/usb/nop-usb-xceiv.h>
40#include <linux/platform_data/usb-omap.h> 40#include <linux/platform_data/usb-omap.h>
41#include <linux/sizes.h>
41 42
42#include <linux/of.h> 43#include <linux/of.h>
43#include <linux/of_device.h> 44#include <linux/of_device.h>
@@ -224,7 +225,7 @@ static void otg_timer(unsigned long _musb)
224 */ 225 */
225 devctl = dsps_readb(mregs, MUSB_DEVCTL); 226 devctl = dsps_readb(mregs, MUSB_DEVCTL);
226 dev_dbg(musb->controller, "Poll devctl %02x (%s)\n", devctl, 227 dev_dbg(musb->controller, "Poll devctl %02x (%s)\n", devctl,
227 otg_state_string(musb->xceiv->state)); 228 usb_otg_state_string(musb->xceiv->state));
228 229
229 spin_lock_irqsave(&musb->lock, flags); 230 spin_lock_irqsave(&musb->lock, flags);
230 switch (musb->xceiv->state) { 231 switch (musb->xceiv->state) {
@@ -273,7 +274,7 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)
273 if (musb->is_active || (musb->a_wait_bcon == 0 && 274 if (musb->is_active || (musb->a_wait_bcon == 0 &&
274 musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) { 275 musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) {
275 dev_dbg(musb->controller, "%s active, deleting timer\n", 276 dev_dbg(musb->controller, "%s active, deleting timer\n",
276 otg_state_string(musb->xceiv->state)); 277 usb_otg_state_string(musb->xceiv->state));
277 del_timer(&glue->timer[pdev->id]); 278 del_timer(&glue->timer[pdev->id]);
278 glue->last_timer[pdev->id] = jiffies; 279 glue->last_timer[pdev->id] = jiffies;
279 return; 280 return;
@@ -288,7 +289,7 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)
288 glue->last_timer[pdev->id] = timeout; 289 glue->last_timer[pdev->id] = timeout;
289 290
290 dev_dbg(musb->controller, "%s inactive, starting idle timer for %u ms\n", 291 dev_dbg(musb->controller, "%s inactive, starting idle timer for %u ms\n",
291 otg_state_string(musb->xceiv->state), 292 usb_otg_state_string(musb->xceiv->state),
292 jiffies_to_msecs(timeout - jiffies)); 293 jiffies_to_msecs(timeout - jiffies));
293 mod_timer(&glue->timer[pdev->id], timeout); 294 mod_timer(&glue->timer[pdev->id], timeout);
294} 295}
@@ -334,7 +335,7 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)
334 * value but DEVCTL.BDEVICE is invalid without DEVCTL.SESSION set. 335 * value but DEVCTL.BDEVICE is invalid without DEVCTL.SESSION set.
335 * Also, DRVVBUS pulses for SRP (but not at 5V) ... 336 * Also, DRVVBUS pulses for SRP (but not at 5V) ...
336 */ 337 */
337 if (usbintr & MUSB_INTR_BABBLE) 338 if (is_host_active(musb) && usbintr & MUSB_INTR_BABBLE)
338 pr_info("CAUTION: musb: Babble Interrupt Occurred\n"); 339 pr_info("CAUTION: musb: Babble Interrupt Occurred\n");
339 340
340 if (usbintr & ((1 << wrp->drvvbus) << wrp->usb_shift)) { 341 if (usbintr & ((1 << wrp->drvvbus) << wrp->usb_shift)) {
@@ -377,7 +378,7 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)
377 /* NOTE: this must complete power-on within 100 ms. */ 378 /* NOTE: this must complete power-on within 100 ms. */
378 dev_dbg(musb->controller, "VBUS %s (%s)%s, devctl %02x\n", 379 dev_dbg(musb->controller, "VBUS %s (%s)%s, devctl %02x\n",
379 drvvbus ? "on" : "off", 380 drvvbus ? "on" : "off",
380 otg_state_string(musb->xceiv->state), 381 usb_otg_state_string(musb->xceiv->state),
381 err ? " ERROR" : "", 382 err ? " ERROR" : "",
382 devctl); 383 devctl);
383 ret = IRQ_HANDLED; 384 ret = IRQ_HANDLED;
@@ -596,14 +597,13 @@ err0:
596 597
597static int dsps_probe(struct platform_device *pdev) 598static int dsps_probe(struct platform_device *pdev)
598{ 599{
599 struct device_node *np = pdev->dev.of_node;
600 const struct of_device_id *match; 600 const struct of_device_id *match;
601 const struct dsps_musb_wrapper *wrp; 601 const struct dsps_musb_wrapper *wrp;
602 struct dsps_glue *glue; 602 struct dsps_glue *glue;
603 struct resource *iomem; 603 struct resource *iomem;
604 int ret, i; 604 int ret, i;
605 605
606 match = of_match_node(musb_dsps_of_match, np); 606 match = of_match_node(musb_dsps_of_match, pdev->dev.of_node);
607 if (!match) { 607 if (!match) {
608 dev_err(&pdev->dev, "fail to get matching of_match struct\n"); 608 dev_err(&pdev->dev, "fail to get matching of_match struct\n");
609 ret = -EINVAL; 609 ret = -EINVAL;