diff options
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 51beb13c7e1a..09529f94e72d 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -494,10 +494,9 @@ static int dsps_musb_set_mode(struct musb *musb, u8 mode) | |||
494 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); | 494 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); |
495 | const struct dsps_musb_wrapper *wrp = glue->wrp; | 495 | const struct dsps_musb_wrapper *wrp = glue->wrp; |
496 | void __iomem *ctrl_base = musb->ctrl_base; | 496 | void __iomem *ctrl_base = musb->ctrl_base; |
497 | void __iomem *base = musb->mregs; | ||
498 | u32 reg; | 497 | u32 reg; |
499 | 498 | ||
500 | reg = dsps_readl(base, wrp->mode); | 499 | reg = dsps_readl(ctrl_base, wrp->mode); |
501 | 500 | ||
502 | switch (mode) { | 501 | switch (mode) { |
503 | case MUSB_HOST: | 502 | case MUSB_HOST: |
@@ -510,7 +509,7 @@ static int dsps_musb_set_mode(struct musb *musb, u8 mode) | |||
510 | */ | 509 | */ |
511 | reg |= (1 << wrp->iddig_mux); | 510 | reg |= (1 << wrp->iddig_mux); |
512 | 511 | ||
513 | dsps_writel(base, wrp->mode, reg); | 512 | dsps_writel(ctrl_base, wrp->mode, reg); |
514 | dsps_writel(ctrl_base, wrp->phy_utmi, 0x02); | 513 | dsps_writel(ctrl_base, wrp->phy_utmi, 0x02); |
515 | break; | 514 | break; |
516 | case MUSB_PERIPHERAL: | 515 | case MUSB_PERIPHERAL: |
@@ -523,10 +522,10 @@ static int dsps_musb_set_mode(struct musb *musb, u8 mode) | |||
523 | */ | 522 | */ |
524 | reg |= (1 << wrp->iddig_mux); | 523 | reg |= (1 << wrp->iddig_mux); |
525 | 524 | ||
526 | dsps_writel(base, wrp->mode, reg); | 525 | dsps_writel(ctrl_base, wrp->mode, reg); |
527 | break; | 526 | break; |
528 | case MUSB_OTG: | 527 | case MUSB_OTG: |
529 | dsps_writel(base, wrp->phy_utmi, 0x02); | 528 | dsps_writel(ctrl_base, wrp->phy_utmi, 0x02); |
530 | break; | 529 | break; |
531 | default: | 530 | default: |
532 | dev_err(glue->dev, "unsupported mode %d\n", mode); | 531 | dev_err(glue->dev, "unsupported mode %d\n", mode); |