]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/musb-new/musb_dsps.c
Merge git://git.denx.de/u-boot-fsl-qoriq
[u-boot] / drivers / usb / musb-new / musb_dsps.c
index 17ed224488f3c924c2c5873e74bd49c8f880120c..399b85bbce814c1ea865d8afa4eab9c4e33d0c4b 100644 (file)
@@ -7,21 +7,7 @@
  *
  * This file is part of the Inventra Controller Driver for Linux.
  *
- * The Inventra Controller Driver for Linux is free software; you
- * can redistribute it and/or modify it under the terms of the GNU
- * General Public License version 2 as published by the Free Software
- * Foundation.
- *
- * The Inventra Controller Driver for Linux is distributed in
- * the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
- * License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Inventra Controller Driver for Linux ; if not,
- * write to the Free Software Foundation, Inc., 59 Temple Place,
- * Suite 330, Boston, MA  02111-1307  USA
+ * SPDX-License-Identifier:    GPL-2.0
  *
  * musb_dsps.c will be a common file for all the TI DSPS platforms
  * such as dm64x, dm36x, dm35x, da8x, am35x and ti81x.
@@ -156,7 +142,11 @@ struct dsps_glue {
 /**
  * dsps_musb_enable - enable interrupts
  */
+#ifndef __UBOOT__
 static void dsps_musb_enable(struct musb *musb)
+#else
+static int dsps_musb_enable(struct musb *musb)
+#endif
 {
 #ifndef __UBOOT__
        struct device *dev = musb->controller;
@@ -181,6 +171,8 @@ static void dsps_musb_enable(struct musb *musb)
        if (is_otg_enabled(musb))
                dsps_writel(reg_base, wrp->coreintr_set,
                            (1 << wrp->drvvbus) << wrp->usb_shift);
+#else
+       return 0;
 #endif
 }
 
@@ -460,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;
 
@@ -501,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 */
@@ -635,7 +627,7 @@ static int __devinit dsps_probe(struct platform_device *pdev)
        /* get memory resource */
        iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!iomem) {
-               dev_err(&pdev->dev, "failed to get usbss mem resourse\n");
+               dev_err(&pdev->dev, "failed to get usbss mem resource\n");
                ret = -ENODEV;
                goto err1;
        }
@@ -701,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;
 }
@@ -713,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;
 }