summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-01-29 13:47:38 -0500
committerTom Rini <trini@konsulko.com>2016-01-29 13:47:38 -0500
commit8a36287a019f5d7532a8a1a7da6aa96e490dbb8a (patch)
treecae7e68596b7405120720f7a81c7ffb04d6ffa6e /arch
parent82d72a1b9967cff4908f22c57536c3660f794401 (diff)
parent26db3a617b38cc1bed1ce100381d2c4ccbb55e42 (diff)
downloadblackbird-obmc-uboot-8a36287a019f5d7532a8a1a7da6aa96e490dbb8a.tar.gz
blackbird-obmc-uboot-8a36287a019f5d7532a8a1a7da6aa96e490dbb8a.zip
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/Kconfig13
-rw-r--r--arch/arm/mach-tegra/board2.c10
2 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 48a387c957..0b2852c4da 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -52,6 +52,19 @@ config TEGRA210
endchoice
+config TEGRA_DISCONNECT_UDC_ON_BOOT
+ bool "Disconnect USB device mode controller on boot"
+ default y
+ help
+ When loading U-Boot into RAM over USB protocols using tools such as
+ tegrarcm or L4T's exec-uboot.sh/tegraflash.py, Tegra's USB device
+ mode controller is initialized and enumerated by the host PC running
+ the tool. Unfortunately, these tools do not shut down the USB
+ controller before executing the downloaded code, and so the host PC
+ does not "de-enumerate" the USB device. This option shuts down the
+ USB controller when U-Boot boots to avoid leaving a stale USB device
+ present.
+
config SYS_MALLOC_F_LEN
default 0x1800
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index a650abd731..60e19c8387 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -34,8 +34,8 @@
#ifdef CONFIG_TEGRA_CLOCK_SCALING
#include <asm/arch/emc.h>
#endif
-#ifdef CONFIG_USB_EHCI_TEGRA
#include <asm/arch-tegra/usb.h>
+#ifdef CONFIG_USB_EHCI_TEGRA
#include <usb.h>
#endif
#ifdef CONFIG_TEGRA_MMC
@@ -201,6 +201,14 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
int board_early_init_f(void)
{
+#if defined(CONFIG_TEGRA_DISCONNECT_UDC_ON_BOOT)
+#define USBCMD_FS2 (1 << 15)
+ {
+ struct usb_ctlr *usbctlr = (struct usb_ctlr *)0x7d000000;
+ writel(USBCMD_FS2, &usbctlr->usb_cmd);
+ }
+#endif
+
/* Do any special system timer/TSC setup */
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
if (!tegra_cpu_is_non_secure())
OpenPOWER on IntegriCloud