board: ge: bx50v3: add i2c eeprom bootcount storage
[oweals/u-boot.git] / drivers / bios_emulator / atibios.c
index 77172467b2e18141c7f88b786f026ec6a084d7cf..fb806b53d4410d492cad3ac21745e4194f51c9e2 100644 (file)
@@ -65,6 +65,7 @@ static u32 saveBaseAddress20;
 /* Addres im memory of VBE region */
 const int vbe_offset = 0x2000;
 
+#ifdef CONFIG_FRAMEBUFFER_SET_VESA_MODE
 static const void *bios_ptr(const void *buf, BE_VGAInfo *vga_info,
                            u32 x86_dword_ptr)
 {
@@ -135,7 +136,6 @@ static int atibios_debug_mode(BE_VGAInfo *vga_info, RMREGS *regs,
                bool linear_ok;
                int attr;
 
-               break;
                debug("Mode %x: ", mode);
                memset(buffer, '\0', sizeof(struct vbe_mode_info));
                regs->e.eax = VESA_GET_MODE_INFO;
@@ -215,6 +215,7 @@ static int atibios_set_vesa_mode(RMREGS *regs, int vesa_mode,
 
        return 0;
 }
+#endif /* CONFIG_FRAMEBUFFER_SET_VESA_MODE */
 
 /****************************************************************************
 PARAMETERS:
@@ -263,11 +264,13 @@ static void PCI_doBIOSPOST(pci_dev_t pcidev, BE_VGAInfo *vga_info,
        /*Cleanup and exit*/
        BE_getVGA(vga_info);
 
+#ifdef CONFIG_FRAMEBUFFER_SET_VESA_MODE
        /* Useful for debugging */
        if (0)
                atibios_debug_mode(vga_info, &regs, vesa_mode, mode_info);
        if (vesa_mode != -1)
                atibios_set_vesa_mode(&regs, vesa_mode, mode_info);
+#endif
 }
 
 /****************************************************************************
@@ -599,10 +602,9 @@ int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
        if (clean_up) {
                BE_exit();
                if (vga_info->BIOSImage &&
-                   (u32)(vga_info->BIOSImage) != 0xc0000)
+                   (ulong)(vga_info->BIOSImage) != 0xc0000)
                        free(vga_info->BIOSImage);
                free(vga_info);
-               vga_info = NULL;
        }
 
        return 0;