]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/host/sl811-hcd.c
Revert "cfi_flash: Use uintptr_t for casts from u32 to void *"
[u-boot] / drivers / usb / host / sl811-hcd.c
index c713d421c6f616b5c364c98292613f172e7d6080..417f1a8aba1bf2e9833ee6b6e29267bd7b10b4cc 100644 (file)
@@ -210,14 +210,14 @@ static int sl811_hc_reset(void)
        return 1;
 }
 
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
 {
        root_hub_devnum = 0;
        sl811_hc_reset();
        return 0;
 }
 
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
 {
        sl811_hc_reset();
        return 0;
@@ -234,7 +234,7 @@ static int sl811_send_packet(struct usb_device *dev, unsigned long pipe, __u8 *b
        __u16 status = 0;
        int err = 0, time_start = get_timer(0);
        int need_preamble = !(rh_status.wPortStatus & USB_PORT_STAT_LOW_SPEED) &&
-               usb_pipeslow(pipe);
+               (dev->speed == USB_SPEED_LOW);
 
        if (len > 239)
                return -1;
@@ -550,11 +550,12 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
        __u8 *bufp = data_buf;
        int len = 0;
        int status = 0;
-
        __u16 bmRType_bReq;
-       __u16 wValue;
-       __u16 wIndex;
-       __u16 wLength;
+       __u16 wValue  = le16_to_cpu (cmd->value);
+       __u16 wLength = le16_to_cpu (cmd->length);
+#ifdef SL811_DEBUG
+       __u16 wIndex  = le16_to_cpu (cmd->index);
+#endif
 
        if (usb_pipeint(pipe)) {
                PDEBUG(0, "interrupt transfer unimplemented!\n");
@@ -562,9 +563,6 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
        }
 
        bmRType_bReq  = cmd->requesttype | (cmd->request << 8);
-       wValue        = le16_to_cpu (cmd->value);
-       wIndex        = le16_to_cpu (cmd->index);
-       wLength       = le16_to_cpu (cmd->length);
 
        PDEBUG(5, "submit rh urb, req = %d(%x) val = %#x index = %#x len=%d\n",
               bmRType_bReq, bmRType_bReq, wValue, wIndex, wLength);