public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/4] board: ti: am57xx: Fix USB configuration
Date: Mon, 16 May 2016 12:26:18 +0300	[thread overview]
Message-ID: <5739923A.2040706@ti.com> (raw)
In-Reply-To: <57398D92.1060709@ti.com>

On 16/05/16 12:06, Roger Quadros wrote:
> On 13/05/16 15:45, Marek Vasut wrote:
>> On 05/13/2016 02:36 PM, Roger Quadros wrote:
>>> Currently CONFIG_USB_DWC3 is not selected so doing a usb start
>>> command results in a serious error [1].
>>
>> Why does this error happen ? That is what should be fixed. Selecting
>> some random options seems like papering over a bug.
> 
> Agreed. I was lazy :P.

OK. The issue is like this.

CONFIG_CMD_USB and CONFIG_USB_XHCI is defined, so usb_init() calls
usb_lowlevel_init() in xhci.c which calls xhci_hcd_init in xhci-omap.c which calls
board_usb_init().

But board_usb_init() in am57xx/board.c is defined only if CONFIG_USB_DWC3 is defined
and that is missing in am57xx_evm.h leading to the serious error. We're trying to
access the IP without turning on the necessary clocks.

So it looks like we need to define it based on CONFIG_USB_XHCI_OMAP or something else.

But then again looking into the future, what if we want only gadget operation?
That would not define XHCI, but we still need board_usb_init(). So board_usb_init()
should be defined based on CONFIG_CMD_USB=y?

What do you suggest?

cheers,
-roger

> 
> cheers,
> -roger
> 
>>
>>> Fix that by enabling CONFIG_USB_DWC3 and other related options
>>> CONFIG_USB_DWC3_PHY_OMAP and CONFIG_USB_DWC3_OMAP.
>>>
>>> [1]
>>> => usb start
>>> starting USB...
>>> USB0:   data abort
>>> pc : [<fff7ed10>]          lr : [<fff7ebbf>]
>>> reloc pc : [<8081dd10>]    lr : [<8081dbbf>]
>>> sp : fef3d260  ip : 00000000     fp : fef3d2a8
>>> r10: fffa4610  r9 : fef50ed0     r8 : 00000000
>>> r7 : fef3d280  r6 : fef3d284     r5 : fffbc380  r4 : 00000000
>>> r3 : 48880000  r2 : 00000000     r1 : 00000000  r0 : fffbc380
>>> Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
>>> Resetting CPU ...
>>>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> ---
>>>  include/configs/am57xx_evm.h | 3 +++
>>>  1 file changed, 3 insertions(+)
>>
>> Changelog is missing ;-)
>>
>>> diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
>>> index 32d7d4d..939057c 100644
>>> --- a/include/configs/am57xx_evm.h
>>> +++ b/include/configs/am57xx_evm.h
>>> @@ -63,6 +63,7 @@
>>>  #define CONFIG_SUPPORT_EMMC_BOOT
>>>  
>>>  /* USB xHCI HOST */
>>> +#define CONFIG_USB_DWC3
>>>  #define CONFIG_USB_HOST
>>>  #define CONFIG_USB_XHCI_DWC3
>>>  #define CONFIG_USB_XHCI
>>> @@ -72,6 +73,8 @@
>>>  
>>>  #define CONFIG_OMAP_USB_PHY
>>>  #define CONFIG_OMAP_USB3PHY1_HOST
>>> +#define CONFIG_USB_DWC3_PHY_OMAP
>>> +#define CONFIG_USB_DWC3_OMAP
>>>  
>>>  /* SATA */
>>>  #define CONFIG_BOARD_LATE_INIT
>>>
>>
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

  reply	other threads:[~2016-05-16  9:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 12:17 [U-Boot] [PATCH 0/4] am57xx: beagle-x15: get usb host working Roger Quadros
2016-05-13 12:17 ` [U-Boot] [PATCH 1/4] usb: dwc3: fix kconfig Roger Quadros
2016-05-13 12:23   ` Marek Vasut
2016-05-13 12:27     ` Roger Quadros
2016-05-13 12:43       ` Marek Vasut
2016-05-17 10:37     ` Masahiro Yamada
2016-05-17 10:33   ` Masahiro Yamada
2016-05-18 12:47     ` Roger Quadros
2016-05-18 12:52       ` Marek Vasut
2016-05-19 14:15   ` [U-Boot] [PATCH v2 " Roger Quadros
2016-05-13 12:17 ` [U-Boot] [PATCH 2/4] board: ti: am57xx: Fix USB configuration Roger Quadros
2016-05-13 12:23   ` Marek Vasut
2016-05-13 12:36   ` [U-Boot] [PATCH v2 " Roger Quadros
2016-05-13 12:45     ` Marek Vasut
2016-05-16  9:06       ` Roger Quadros
2016-05-16  9:26         ` Roger Quadros [this message]
2016-05-16  9:49           ` Roger Quadros
2016-05-16 10:03             ` Kishon Vijay Abraham I
2016-05-16 10:31               ` Roger Quadros
2016-05-16 11:10                 ` Kishon Vijay Abraham I
2016-05-16 13:51                   ` Roger Quadros
2016-05-20 22:32   ` [U-Boot] [U-Boot,2/4] " Tom Rini
2016-05-13 12:17 ` [U-Boot] [PATCH 3/4] usb: dwc3: Makefile: Don't build gadget code if USB_GADGET is disabled Roger Quadros
2016-05-13 12:24   ` Marek Vasut
2016-05-30 17:58   ` [U-Boot] [U-Boot, " Tom Rini
2016-05-13 12:17 ` [U-Boot] [PATCH 4/4] usb: gadget: udc: Build on USB_GADGET Roger Quadros
2016-05-13 12:24   ` Marek Vasut
2016-05-13 12:29     ` Roger Quadros
2016-05-13 12:47       ` Marek Vasut
2016-05-16  9:03         ` Roger Quadros
2016-05-13 12:22 ` [U-Boot] [PATCH 0/4] am57xx: beagle-x15: get usb host working Marek Vasut
2016-05-13 12:39 ` Roger Quadros
2016-05-13 12:47   ` Marek Vasut
2016-05-18 14:27     ` Roger Quadros

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=5739923A.2040706@ti.com \
    --to=rogerq@ti.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox