[U-Boot] USB unaligned problem

Remy Bohmer linux at bohmer.net
Mon Feb 1 19:52:54 CET 2010


Hi,

2010/2/1 Daniel Hellstrom <daniel at gaisler.com>:
> Hi Remy,
>
> I experience unaligned exceptions when using the USB stack in u-boot on
> SPARC/LEON. I believe that there are many places in the code that must be
> updated since many structures are declared with the GCC attribute PACKED and
> still use 16-bit or 32-bit fields. However, I have so far only needed to
> patch one C-line to make it work. I'm not sure why the packed attribute is
> used in so many structures, I guess it is bacause of the layout of the USB
> information headers read from USB devices.

I think that was historically the reason (in OHCI), but I never
investigated if less 'packed' attributes would be suitable as well.

> Please see commit 5b6bc53e4c3eadd04f2ecb94bbb596dca306236a in u-boot sparc
> repoistory, usb branch:
>
> http://git.denx.de/?p=u-boot/u-boot-sparc.git;a=commit;h=5b6bc53e4c3eadd04f2ecb94bbb596dca306236a
>
> What do you think?

That it should be posted to the mailinglist, and that I would take it
in in the u-boot-usb repository...

Kind regards,

Remy


More information about the U-Boot mailing list