]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-tegra/board2.c
tegra: Allow CONFIG_DM_VIDEO to be used as well as CONFIG_LCD
[u-boot] / arch / arm / mach-tegra / board2.c
index 8ba143d996caed61ceb613383acf283d72838b6b..c03f3e2052a2f8e0b265f11b8b37612dd81eb4ed 100644 (file)
@@ -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
@@ -134,12 +134,15 @@ int board_init(void)
        pin_mux_spi();
 #endif
 
-#ifdef CONFIG_PWM_TEGRA
+       /* Init is handled automatically in the driver-model case */
+#if defined(CONFIG_PWM_TEGRA) && !defined(CONFIG_PWM)
        if (pwm_init(gd->fdt_blob))
                debug("%s: Failed to init pwm\n", __func__);
 #endif
-#ifdef CONFIG_LCD
+#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
        pin_mux_display();
+#endif
+#ifdef CONFIG_LCD
        tegra_lcd_check_next_stage(gd->fdt_blob, 0);
 #endif
        /* boot param addr */
@@ -168,11 +171,13 @@ int board_init(void)
        pin_mux_usb();
 #endif
 
-#ifdef CONFIG_LCD
+#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
        board_id = tegra_board_id();
        err = tegra_lcd_pmic_init(board_id);
        if (err)
                return err;
+#endif
+#ifdef CONFIG_LCD
        tegra_lcd_check_next_stage(gd->fdt_blob, 0);
 #endif
 
@@ -201,6 +206,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())
@@ -377,6 +390,10 @@ void dram_init_banksize(void)
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
        gd->bd->bi_dram[0].size = usable_ram_size_below_4g();
 
+#ifdef CONFIG_PCI
+       gd->pci_ram_top = gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size;
+#endif
+
 #ifdef CONFIG_PHYS_64BIT
        if (gd->ram_size > SZ_2G) {
                gd->bd->bi_dram[1].start = 0x100000000;