diff options
author | Tom Rini <trini@konsulko.com> | 2015-08-26 17:48:05 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-26 17:48:05 -0400 |
commit | 79c884d7e449a63fa8f07b7495f8f9873355c48f (patch) | |
tree | 19adcc1b9d3520a68937a1f5f81b06775c790d8a /drivers/video | |
parent | ad608a21f89bf7467059ed59d60b080aace7ef99 (diff) | |
parent | f4b5db7c5309dd7f3ecc6369f3c1f41e8bfe93ae (diff) | |
download | blackbird-obmc-uboot-79c884d7e449a63fa8f07b7495f8f9873355c48f.tar.gz blackbird-obmc-uboot-79c884d7e449a63fa8f07b7495f8f9873355c48f.zip |
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/cfb_console.c | 11 | ||||
-rw-r--r-- | drivers/video/coreboot_fb.c | 24 | ||||
-rw-r--r-- | drivers/video/ct69000.c | 21 |
3 files changed, 29 insertions, 27 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 30e0317bb2..aa7ca8646d 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2247,16 +2247,17 @@ __weak int board_video_skip(void) int drv_video_init(void) { - int skip_dev_init; struct stdio_dev console_dev; bool have_keyboard; + bool __maybe_unused keyboard_ok = false; /* Check if video initialization should be skipped */ if (board_video_skip()) return 0; /* Init video chip - returns with framebuffer cleared */ - skip_dev_init = (video_init() == -1); + if (video_init() == -1) + return 0; if (board_cfb_skip()) return 0; @@ -2272,11 +2273,9 @@ int drv_video_init(void) if (have_keyboard) { debug("KBD: Keyboard init ...\n"); #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE) - skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1); + keyboard_ok = !(VIDEO_KBD_INIT_FCT == -1); #endif } - if (skip_dev_init) - return 0; /* Init vga device */ memset(&console_dev, 0, sizeof(console_dev)); @@ -2287,7 +2286,7 @@ int drv_video_init(void) console_dev.puts = video_puts; /* 'puts' function */ #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE) - if (have_keyboard) { + if (have_keyboard && keyboard_ok) { /* Also init console device */ console_dev.flags |= DEV_FLAGS_INPUT; console_dev.tstc = VIDEO_TSTC_FCT; /* 'tstc' function */ diff --git a/drivers/video/coreboot_fb.c b/drivers/video/coreboot_fb.c index 56c35c18fe..4790ef1fdc 100644 --- a/drivers/video/coreboot_fb.c +++ b/drivers/video/coreboot_fb.c @@ -9,6 +9,7 @@ #include <common.h> #include <asm/arch/tables.h> #include <asm/arch/sysinfo.h> +#include <vbe.h> #include <video_fb.h> #include "videomodes.h" @@ -17,6 +18,26 @@ */ GraphicDevice ctfb; +static void save_vesa_mode(void) +{ + struct vesa_mode_info *vesa = &mode_info.vesa; + struct cb_framebuffer *fb = lib_sysinfo.framebuffer; + + vesa->x_resolution = fb->x_resolution; + vesa->y_resolution = fb->y_resolution; + vesa->bits_per_pixel = fb->bits_per_pixel; + vesa->bytes_per_scanline = fb->bytes_per_line; + vesa->phys_base_ptr = fb->physical_address; + vesa->red_mask_size = fb->red_mask_size; + vesa->red_mask_pos = fb->red_mask_pos; + vesa->green_mask_size = fb->green_mask_size; + vesa->green_mask_pos = fb->green_mask_pos; + vesa->blue_mask_size = fb->blue_mask_size; + vesa->blue_mask_pos = fb->blue_mask_pos; + vesa->reserved_mask_size = fb->reserved_mask_size; + vesa->reserved_mask_pos = fb->reserved_mask_pos; +} + static int parse_coreboot_table_fb(GraphicDevice *gdev) { struct cb_framebuffer *fb = lib_sysinfo.framebuffer; @@ -81,5 +102,8 @@ void *video_hw_init(void) memset((void *)gdev->pciBase, 0, gdev->winSizeX * gdev->winSizeY * gdev->gdfBytesPP); + /* Initialize vesa_mode_info structure */ + save_vesa_mode(); + return (void *)gdev; } diff --git a/drivers/video/ct69000.c b/drivers/video/ct69000.c index 168b9bad98..22b34418e5 100644 --- a/drivers/video/ct69000.c +++ b/drivers/video/ct69000.c @@ -256,9 +256,6 @@ struct ctfb_chips_properties { static const struct ctfb_chips_properties chips[] = { {PCI_DEVICE_ID_CT_69000, 0x200000, 1, 4, -2, 3, 257, 100, 220}, -#ifdef CONFIG_USE_CPCIDVI - {PCI_DEVICE_ID_CT_69030, 0x400000, 1, 4, -2, 3, 257, 100, 220}, -#endif {PCI_DEVICE_ID_CT_65555, 0x100000, 16, 4, 0, 1, 255, 48, 220}, /* NOT TESTED */ {0, 0, 0, 0, 0, 0, 0, 0, 0} /* Terminator */ }; @@ -944,9 +941,6 @@ SetDrawingEngine (int bits_per_pixel) */ static struct pci_device_id supported[] = { {PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000}, -#ifdef CONFIG_USE_CPCIDVI - {PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69030}, -#endif {} }; @@ -1111,22 +1105,7 @@ video_hw_init (void) pGD->cprBase = pci_mem_base; /* Dummy */ /* set up Hardware */ -#ifdef CONFIG_USE_CPCIDVI - if (device_id == PCI_DEVICE_ID_CT_69030) { - ctWrite (CT_MSR_W_O, 0x0b); - ctWrite (0x3cd, 0x13); - ctWrite_i (CT_FP_O, 0x02, 0x00); - ctWrite_i (CT_FP_O, 0x05, 0x00); - ctWrite_i (CT_FP_O, 0x06, 0x00); - ctWrite (0x3c2, 0x0b); - ctWrite_i (CT_FP_O, 0x02, 0x10); - ctWrite_i (CT_FP_O, 0x01, 0x09); - } else { - ctWrite (CT_MSR_W_O, 0x01); - } -#else ctWrite (CT_MSR_W_O, 0x01); -#endif /* set the extended Registers */ ctLoadRegs (CT_XR_O, xreg); |