diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-08-04 17:13:12 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:23 -0700 |
commit | 0c5ff9c582cff50ea47b446af9e5bcd976d95fe1 (patch) | |
tree | 0f7d10abbe5c2eddb301954dc73ecd40eef37e50 /drivers/video | |
parent | b4a3fbea1f1496c1600caff4b043530f3178f291 (diff) |
Implement missing functions for vboot:
* video_clear()
Clear the video framebuffer.
* cold_reboot()
Do a hard reset through the chipset's reset control register. This
register is available on all x86 systems (at least those built in
the last 10ys)
* power_off()
Power down the machine by using the power management sleep control
of the chipset. This will currently only work on Intel chipsets.
However, adapting it to new chipsets is fairly simple. You will
have to find the IO address of the power management register block
in your southbridge, and look up the appropriate SLP_TYP_S5 value
from your southbridge's data sheet.
BUG=chrome-os-partner:3912
TEST=Run vboot_twostage and see vboot first clear the screen and later cold boot.
Run poweroff and coldboot command in uboot console.
Change-Id: I59f49a41e8807b2ec3ebb3d083d2a06ced9553a0
Reviewed-on: http://gerrit.chromium.org/gerrit/5361
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/cfb_console.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 6b0b766321..d79fa1efb1 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1709,3 +1709,11 @@ int video_get_screen_columns (void) return CONSOLE_COLS; } +int video_clear(void) +{ + memsetl(video_fb_address, + (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), 0); + + return 0; +} + |