diff options
author | wdenk <wdenk> | 2004-05-11 21:53:55 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-05-11 21:53:55 +0000 |
commit | 9d9e283790102f760676b3b949561e6deb5213d2 (patch) | |
tree | 0b935dd575c17021a7e02f835688adca00614af8 /drivers/sl811_usb.c | |
parent | baac607c134a0cb2faf3e0412a6463adabb8d440 (diff) | |
download | u-boot-imx-9d9e283790102f760676b3b949561e6deb5213d2.zip u-boot-imx-9d9e283790102f760676b3b949561e6deb5213d2.tar.gz u-boot-imx-9d9e283790102f760676b3b949561e6deb5213d2.tar.bz2 |
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)
Diffstat (limited to 'drivers/sl811_usb.c')
-rw-r--r-- | drivers/sl811_usb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/sl811_usb.c b/drivers/sl811_usb.c index 5136cdc..61604e5 100644 --- a/drivers/sl811_usb.c +++ b/drivers/sl811_usb.c @@ -228,7 +228,7 @@ int usb_lowlevel_stop(void) 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) @@ -253,7 +253,8 @@ static int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len) if (!dir_to_host && 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; else ctrl &= ~SL811_USB_CTRL_SOF; |