summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-12-19 20:15:38 -0800
committerSimon Glass <sjg@chromium.org>2012-01-06 12:43:57 -0800
commite712ffb3ea9de6fa08b50032d772531cc607bc7e (patch)
tree8b80db5a4f1d97c79852e777c42a6d17d416625f /common
parentfe7814fabf738769d20491cbfa8c98b454bc621c (diff)
CHROMIUM: Support vboot without a display
This allows booting without a display, mostly as a way of calculating the time that LCD init and maintenance costs us. Perhaps we might integrate the lcd and video APIs within U-Boot - it would be a much nicer solution. With that in mind I feel it is not work refactoring this into three separate (lcd, video, none) files to implement the display API. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Iea4656f8939f7f2fd78292827091de4ee379954b Reviewed-on: https://gerrit.chromium.org/gerrit/13369 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_vboot_twostop.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/common/cmd_vboot_twostop.c b/common/cmd_vboot_twostop.c
index 2d8bf37e45..3797492357 100644
--- a/common/cmd_vboot_twostop.c
+++ b/common/cmd_vboot_twostop.c
@@ -25,6 +25,11 @@
#include <chromeos/power_management.h>
#include <usb.h>
+#ifdef CONFIG_VIDEO_TEGRA2
+/* for tegra_lcd_check_next_stage() */
+#include <asm/arch-tegra/dc.h>
+#endif
+
#include <gbb_header.h> /* for GoogleBinaryBlockHeader */
#include <tss_constants.h>
#include <vboot_api.h>
@@ -174,7 +179,6 @@ twostop_init_cparams(struct twostop_fmap *fmap, void *gbb,
static void setup_arch_unused_memory(memory_wipe_t *wipe,
crossystem_data_t *cdata, VbCommonParams *cparams)
{
- int fb_size, lcd_line_length;
struct fdt_memory config, ramoops;
if (fdt_decode_memory(gd->blob, "/memory", &config))
@@ -193,11 +197,17 @@ static void setup_arch_unused_memory(memory_wipe_t *wipe,
(uintptr_t)TEGRA_LP0_ADDR,
(uintptr_t)(TEGRA_LP0_ADDR + TEGRA_LP0_SIZE));
- /* Excludes the frame buffer. */
- fb_size = lcd_get_size(&lcd_line_length);
- memory_wipe_sub(wipe,
- (uintptr_t)gd->fb_base,
- (uintptr_t)gd->fb_base + fb_size);
+#ifdef CONFIG_LCD
+ {
+ int fb_size, lcd_line_length;
+
+ /* Excludes the frame buffer. */
+ fb_size = lcd_get_size(&lcd_line_length);
+ memory_wipe_sub(wipe,
+ (uintptr_t)gd->fb_base,
+ (uintptr_t)gd->fb_base + fb_size);
+ }
+#endif
}
#elif defined(CONFIG_SYS_COREBOOT)
@@ -290,6 +300,9 @@ twostop_init_vboot_library(firmware_storage_t *file, void *gbb,
return err;
}
+#ifdef CONFIG_VIDEO_TEGRA2
+ tegra_lcd_check_next_stage(gd->blob, 0);
+#endif
VBDEBUG(PREFIX "iparams.out_flags: %08x\n", iparams.out_flags);
if (iparams.out_flags & VB_INIT_OUT_CLEAR_RAM)
@@ -597,6 +610,9 @@ twostop_init(struct twostop_fmap *fmap, firmware_storage_t *file,
}
ret = 0;
+#ifdef CONFIG_VIDEO_TEGRA2
+ tegra_lcd_check_next_stage(gd->blob, 0);
+#endif
out:
if (ret)