All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Jones <michael.jones@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] OMAP4 u-boot broken (was [PATCH] usb: align usb_endpoint_descriptor to 16-bit boundary)
Date: Wed, 14 Dec 2011 11:12:46 +0100	[thread overview]
Message-ID: <4EE8769E.3030500@matrix-vision.de> (raw)
In-Reply-To: <4EE75349.1060802@ti.com>

On 12/13/2011 02:29 PM, Aneesh V wrote:
> Hi Kristiansson,
>
> On Friday 21 October 2011 12:55 AM, Stefan Kristiansson wrote:
>> The usb_endpoint_descriptor struct is 7 bytes large and is
>> defined as an array (ep_desc[USB_MAXENDPOINTS])
>> in the usb_interface struct in include/usb.h
>>
>> This fact will result in that every odd index in that
>> array will start at an uneven address, this in
>> turn makes accesses to u16 wMaxPacketSize unaligned.
>> Such accesses are illegal on the OpenRISC architecture
>> (as well as other architectures) and will render a bus error.
>>
>> Setting the aligned(2) attribute on usb_endpoint_descriptor
>> will force wMaxPacketSize to a 16-bit boundary.
>>
>> Signed-off-by: Stefan Kristiansson<stefan.kristiansson@saunalahti.fi>
>> ---
>
> OMAP4 U-Boot is broken in the mainline. U-Boot wouldn't boot up on any
> OMAP4 platforms. I suspect this will be the case with any ARM platform
> that has enabled USB tty code. I git-bisected the issue to this patch.
> I did some analysis on it and here are my findings.

I can confirm this on my OMAP3 platform with CONFIG_USB_TTY set.  I can 
get it to boot again by either reverting this patch or unsetting 
CONFIG_USB_TTY.  Looking forward to the fix.

-Michael

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier

      parent reply	other threads:[~2011-12-14 10:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 19:25 [U-Boot] [PATCH] usb: align usb_endpoint_descriptor to 16-bit boundary Stefan Kristiansson
2011-11-26 22:33 ` Remy Bohmer
2011-12-13 13:29 ` [U-Boot] OMAP4 u-boot broken (was [PATCH] usb: align usb_endpoint_descriptor to 16-bit boundary) Aneesh V
2011-12-13 20:15   ` Stefan Kristiansson
2011-12-14 10:24     ` Aneesh V
2011-12-14 14:24       ` Tom Rini
2011-12-14 20:25     ` Tom Rini
2011-12-14 10:12   ` Michael Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE8769E.3030500@matrix-vision.de \
    --to=michael.jones@matrix-vision.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.