Skip to content
Snippets Groups Projects
  1. Oct 14, 2008
    • Remy Bohmer's avatar
      fix USB initialisation procedure · 48867208
      Remy Bohmer authored
      
      The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
      At some places directly 8,16,32,64 was used instead of the encoded
      value. Made a enum for the options to make this more clear and to help
      preventing similar errors in the future.
      
      After fixing this bug it became clear that another bug existed where
      the 'pipe' is and-ed with PIPE_* flags, where it should have been
      'usb_pipetype(pipe)', or even better usb_pipeint(pipe).
      
      Also removed the triple 'get_device_descriptor' sequence, it has no use,
      and Windows nor Linux behaves that way.
      There is also a poll going on with a timeout when usb_control_msg() fails.
      However, the poll is useless, because the flag will never be set on a error,
      because there is no code that runs in a parallel that can set this flag.
      Changed this to something more logical.
      
      Tested on AT91SAM9261ek and compared the flow on the USB bus to what
      Linux is doing. There is no difference anymore in the early initialisation
      sequence.
      
      Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
      Signed-off-by: default avatarMarkus Klotzbuecher <mk@denx.de>
      48867208
  2. Sep 19, 2008
  3. Sep 17, 2008
    • Remy Bohmer's avatar
      USB layer of U-Boot causes USB protocol errors while using USB memory sticks · c9e8436b
      Remy Bohmer authored
      
      There are several differences between Linux, Windows and U-boot for initialising the
      USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
      things really different, and some are wrong (compared to the USB standard).
      
      This patch fixes some errors:
      * The NEW_init procedure that was already in the code is good, while the old procedure
        is wrong. See code comments for more info.
      * On a Control request the data returned by the device can be more than 8 bytes, while
        the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
        This results in a lot of USB sticks not being recognised, and the transmission ended
        frequently with a CTL:TIMEOUT Error.
      * Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.
      
      Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
      Signed-off-by: default avatarMarkus Klotzbuecher <mk@denx.de>
      c9e8436b
    • Remy Bohmer's avatar
      Refactoring parts of the common USB OHCI code · 6f5794a6
      Remy Bohmer authored
      
      This patch refactors some large routines of the USB OHCI code by
      making some routines smaller and more readable which helps
      debugging and understanding the code. (Makes the code looks
      somewhat more like the Linux implementation.)
      
      Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)
      
      Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
      Signed-off-by: default avatarMarkus Klotzbuecher <mk@denx.de>
      6f5794a6
    • Remy Bohmer's avatar
      Fix for USB sticks not working on ARM while using GCC 4.x compilers · be19d324
      Remy Bohmer authored
      
      The GCC-compiler makes an optimisation error while optimising the routine
      usb_set_maxpacket(). This should be fixed in the compiler in the first place,
      but there lots of compilers out there that makes this error, that it is
      probably wiser to workaround it in U-boot itself.
      
      What happens is that the register r3 is used as loop-counter 'i', but gets
      overwritten later on. From there it starts using register r3 for several other
      things and the assembler code is becoming a big mess. This is clearly a compiler bug.
      
      This error occurs on at least several versions of Code Sourcery Lite compilers
      for ARM. Like the Edition 2008q1, and 2008q3, It has also been seen on other
      compilers, while compiling for armv4t, or armv5te with Os, O1 and O2.
      
      We work around it by splitting up this routine in 2 parts, and making sure that
      the split out part is NOT inlined any longer. This will make GCC spit out assembler
      that do not show this problem. Another possibility is to adapt the Makefile to stop
      optimisation for the complete file. I think this solution is nicer.
      
      Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
      Signed-off-by: default avatarMarkus Klotzbuecher <mk@denx.de>
      be19d324
    • Wolfgang Denk's avatar
      Coding style cleanup; update CHANEGLOG · 87b4ef56
      Wolfgang Denk authored
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      87b4ef56
  4. Sep 16, 2008
  5. Sep 13, 2008
  6. Sep 12, 2008
  7. Sep 11, 2008
Loading