summaryrefslogtreecommitdiff
path: root/drivers/usb/musb-new
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2016-11-17 09:08:10 (GMT)
committerSimon Glass <sjg@chromium.org>2016-12-03 04:04:48 (GMT)
commit1cac34ce161ae010d3f9ffd3f664e70206638ebc (patch)
treeb4e97524e55215380ee0e0f5c17635e27d523d52 /drivers/usb/musb-new
parent3aec2648698d9be14ab8b3eeb7d4d7d3783379ac (diff)
downloadu-boot-fsl-qoriq-1cac34ce161ae010d3f9ffd3f664e70206638ebc.tar.xz
drivers: usb: musb: adopt musb backend driver to driver model
Currently all backend driver ops uses hard coded physical address, so to adopt the driver to DM, add device pointer to ops call backs so that drivers can get physical addresses from the usb driver priv/plat data. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/usb/musb-new')
-rw-r--r--drivers/usb/musb-new/am35x.c14
-rw-r--r--drivers/usb/musb-new/musb_dsps.c8
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index b8791dd..0167ea7 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -336,7 +336,7 @@ eoi:
if (ret == IRQ_HANDLED || epintr || usbintr) {
/* clear level interrupt */
if (data->clear_irq)
- data->clear_irq();
+ data->clear_irq(data->dev);
/* write EOI */
musb_writel(reg_base, USB_END_OF_INTR_REG, 0);
}
@@ -401,14 +401,14 @@ static int am35x_musb_init(struct musb *musb)
/* Reset the musb */
if (data->reset)
- data->reset();
+ data->reset(data->dev);
/* Reset the controller */
musb_writel(reg_base, USB_CTRL_REG, AM35X_SOFT_RESET_MASK);
/* Start the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(1);
+ data->set_phy_power(data->dev, 1);
msleep(5);
@@ -416,7 +416,7 @@ static int am35x_musb_init(struct musb *musb)
/* clear level interrupt */
if (data->clear_irq)
- data->clear_irq();
+ data->clear_irq(data->dev);
return 0;
}
@@ -439,7 +439,7 @@ static int am35x_musb_exit(struct musb *musb)
/* Shutdown the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(0);
+ data->set_phy_power(data->dev, 0);
#ifndef __UBOOT__
usb_put_phy(musb->xceiv);
@@ -630,7 +630,7 @@ static int am35x_suspend(struct device *dev)
/* Shutdown the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(0);
+ data->set_phy_power(data->dev, 0);
clk_disable(glue->phy_clk);
clk_disable(glue->clk);
@@ -647,7 +647,7 @@ static int am35x_resume(struct device *dev)
/* Start the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(1);
+ data->set_phy_power(data->dev, 1);
ret = clk_enable(glue->phy_clk);
if (ret) {
diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index a71db76..399b85b 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -452,7 +452,7 @@ static int dsps_musb_init(struct musb *musb)
/* Start the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(1);
+ data->set_phy_power(data->dev, 1);
musb->isr = dsps_interrupt;
@@ -493,7 +493,7 @@ static int dsps_musb_exit(struct musb *musb)
/* Shutdown the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(0);
+ data->set_phy_power(data->dev, 0);
#ifndef __UBOOT__
/* NOP driver needs change if supporting dual instance */
@@ -693,7 +693,7 @@ static int dsps_suspend(struct device *dev)
/* Shutdown the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(0);
+ data->set_phy_power(data->dev, 0);
return 0;
}
@@ -705,7 +705,7 @@ static int dsps_resume(struct device *dev)
/* Start the on-chip PHY and its PLL. */
if (data->set_phy_power)
- data->set_phy_power(1);
+ data->set_phy_power(data->dev, 1);
return 0;
}