[U-Boot] [PATCH v3 10/18] tegra: Add LCD support to Nvidia boards
Simon Glass
sjg at chromium.org
Thu Jul 12 17:25:10 CEST 2012
Add calls to the LCD driver from Nvidia board code.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v3:
- Add separate call to pwm_init() in board_init()
board/nvidia/common/board.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index e65fc9e..ff08bd1 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -29,12 +29,14 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/board.h>
+#include <asm/arch/display.h>
#include <asm/arch/clk_rst.h>
#include <asm/arch/clock.h>
#include <asm/arch/emc.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/pmc.h>
#include <asm/arch/pmu.h>
+#include <asm/arch/pwm.h>
#include <asm/arch/uart.h>
#include <asm/arch/warmboot.h>
#include <spi.h>
@@ -93,6 +95,9 @@ int board_init(void)
{
__maybe_unused int err;
+#ifdef CONFIG_VIDEO_TEGRA2
+ tegra_lcd_check_next_stage(gd->blob, 0);
+#endif
/* Do clocks and UART first so that printf() works */
clock_init();
clock_verify();
@@ -129,6 +134,11 @@ int board_init(void)
pin_mux_usb();
board_usb_init(gd->fdt_blob);
#endif
+#if defined(CONFIG_VIDEO_TEGRA)
+ if (pwm_init(gd->fdt_blob))
+ debug("%s: Failed to init pwm\n", __func__);
+ tegra_lcd_check_next_stage(gd->fdt_blob, 0);
+#endif
#ifdef CONFIG_TEGRA2_LP0
/* prepare the WB code to LP0 location */
@@ -156,6 +166,18 @@ int board_early_init_f(void)
#else
gpio_config_uart();
#endif
- return 0;
+#if defined(CONFIG_VIDEO_TEGRA)
+ tegra_lcd_early_init(gd->fdt_blob);
+#endif
+return 0;
}
#endif /* EARLY_INIT */
+
+int board_late_init(void)
+{
+#ifdef CONFIG_VIDEO_TEGRA
+ /* Make sure we finish initing the LCD */
+ tegra_lcd_check_next_stage(gd->fdt_blob, 1);
+#endif
+ return 0;
+}
--
1.7.7.3
More information about the U-Boot
mailing list