igep003x: UBIize
[platform/kernel/u-boot.git] / drivers / pci / pci_rom.c
index 21ed17c..57204c4 100644 (file)
@@ -334,7 +334,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void),
                        goto err;
 #endif
        } else {
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) && CONFIG_IS_ENABLED(X86_32BIT_INIT)
                bios_set_interrupt_handler(0x15, int15_handler);
 
                bios_run_on_x86(dev, (unsigned long)ram, vesa_mode,
@@ -351,9 +351,9 @@ err:
 }
 
 #ifdef CONFIG_DM_VIDEO
-static int vbe_setup_video_priv(struct vesa_mode_info *vesa,
-                               struct video_priv *uc_priv,
-                               struct video_uc_platdata *plat)
+int vbe_setup_video_priv(struct vesa_mode_info *vesa,
+                        struct video_priv *uc_priv,
+                        struct video_uc_platdata *plat)
 {
        if (!vesa->x_resolution)
                return -ENXIO;
@@ -382,9 +382,13 @@ int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void))
        struct video_priv *uc_priv = dev_get_uclass_priv(dev);
        int ret;
 
+       printf("Video: ");
+
        /* If we are running from EFI or coreboot, this can't work */
-       if (!ll_boot_init())
+       if (!ll_boot_init()) {
+               printf("Not available (previous bootloader prevents it)\n");
                return -EPERM;
+       }
        bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display");
        ret = dm_pci_run_vga_bios(dev, int15_handler, PCI_ROM_USE_NATIVE |
                                        PCI_ROM_ALLOW_FALLBACK);
@@ -400,6 +404,9 @@ int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void))
                return ret;
        }
 
+       printf("%dx%dx%d\n", uc_priv->xsize, uc_priv->ysize,
+              mode_info.vesa.bits_per_pixel);
+
        return 0;
 }
 #endif