Skip to content
Snippets Groups Projects
Commit 9d9e2837 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Add some limited support for low-speed devices to SL811 USB controller

(at least "usb reset" now passes successfully and "usb info" displays
correct information)
parent baac607c
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
Changes since U-Boot 1.1.1: Changes since U-Boot 1.1.1:
====================================================================== ======================================================================
* Add some limited support for low-speed devices to SL811 USB controller
(at least "usb reset" now passes successfully and "usb info" displays
correct information)
* Change init sequence for multiple network interfaces: initialize * Change init sequence for multiple network interfaces: initialize
on-chip interfaces before external cards. on-chip interfaces before external cards.
......
...@@ -228,7 +228,7 @@ int usb_lowlevel_stop(void) ...@@ -228,7 +228,7 @@ int usb_lowlevel_stop(void)
static int calc_needed_buswidth(int bytes, int low_speed) static int calc_needed_buswidth(int bytes, int low_speed)
{ {
return bytes * 8 + 512; return low_speed ? 0 : bytes * 8 + 512;
} }
static int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len) static int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len)
...@@ -253,7 +253,8 @@ static int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len) ...@@ -253,7 +253,8 @@ static int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len)
if (!dir_to_host && len) if (!dir_to_host && len)
sl811_write_buf(0x10, buffer, len); sl811_write_buf(0x10, buffer, len);
if (sl811_read(SL811_SOFCNTDIV)*64 < calc_needed_buswidth(len, 0)) if (sl811_read(SL811_SOFCNTDIV)*64 <
calc_needed_buswidth(len, rh_status.wPortStatus & USB_PORT_STAT_LOW_SPEED))
ctrl |= SL811_USB_CTRL_SOF; ctrl |= SL811_USB_CTRL_SOF;
else else
ctrl &= ~SL811_USB_CTRL_SOF; ctrl &= ~SL811_USB_CTRL_SOF;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment