]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/musb/musb_hcd.c
Merge branch 'u-boot/master' into u-boot-arm/master
[karo-tx-uboot.git] / drivers / usb / musb / musb_hcd.c
index 8d44c4657f493005487af6133c9fcb7f8ab6ada0..3dc5d6a5583bd0ab5ff574224ec888a82697656b 100644 (file)
@@ -3,25 +3,13 @@
  *
  * Copyright (c) 2008 Texas Instruments
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program 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 this program; 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+
  *
  * Author: Thomas Abraham t-abraham@ti.com, Texas Instruments
  */
 
 #include <common.h>
+#include <usb.h>
 #include "musb_hcd.h"
 
 /* MSC control transfers */
@@ -485,8 +473,8 @@ static int ctrlreq_in_status_phase(struct usb_device *dev)
  */
 static u8 get_dev_speed(struct usb_device *dev)
 {
-       return (dev->speed & USB_SPEED_HIGH) ? MUSB_TYPE_SPEED_HIGH :
-               ((dev->speed & USB_SPEED_LOW) ? MUSB_TYPE_SPEED_LOW :
+       return (dev->speed == USB_SPEED_HIGH) ? MUSB_TYPE_SPEED_HIGH :
+               ((dev->speed == USB_SPEED_LOW) ? MUSB_TYPE_SPEED_LOW :
                                                MUSB_TYPE_SPEED_FULL);
 }
 
@@ -1092,7 +1080,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
 /*
  * This function initializes the usb controller module.
  */
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
 {
        u8  power;
        u32 timeout;
@@ -1104,8 +1092,7 @@ int usb_lowlevel_init(void)
 
        /* Configure all the endpoint FIFO's and start usb controller */
        musbr = musb_cfg.regs;
-       musb_configure_ep(&epinfo[0],
-                       sizeof(epinfo) / sizeof(struct musb_epinfo));
+       musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo));
        musb_start();
 
        /*
@@ -1144,7 +1131,7 @@ int usb_lowlevel_init(void)
 /*
  * This function stops the operation of the davinci usb module.
  */
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
 {
        /* Reset the USB module */
        musb_platform_deinit();