]> git.sur5r.net Git - u-boot/commitdiff
dm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI API
authorSimon Glass <sjg@chromium.org>
Sun, 29 Nov 2015 20:17:58 +0000 (13:17 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 12 Jan 2016 17:19:09 +0000 (10:19 -0700)
This function should take a struct udevice rather than pci_dev_t. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/bios.c
drivers/pci/pci_rom.c
include/bios_emul.h

index 1d75cfc263c383eb64a98d4d9b894ff031dd8736..9324bdb83e864eaa2c1e9c331e2a45a9a7ec473d 100644 (file)
@@ -242,9 +242,10 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info)
        vbe_set_mode(mode_info);
 }
 
-void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode,
+void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode,
                     struct vbe_mode_info *mode_info)
 {
+       pci_dev_t pcidev = dm_pci_get_bdf(dev);
        u32 num_dev;
 
        num_dev = PCI_BUS(pcidev) << 8 | PCI_DEV(pcidev) << 3 |
index 8949ea889792bc81963f471693606f4b137a1f12..2cb81b66b7004565765a2f35e592f5cbd14974d2 100644 (file)
@@ -324,8 +324,8 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void),
 #ifdef CONFIG_X86
                bios_set_interrupt_handler(0x15, int15_handler);
 
-               bios_run_on_x86(dm_pci_get_bdf(dev), (unsigned long)ram,
-                               vesa_mode, &mode_info);
+               bios_run_on_x86(dev, (unsigned long)ram, vesa_mode,
+                               &mode_info);
 #endif
        }
        debug("Final vesa mode %#x\n", mode_info.video_mode);
index 3643b82b3a6d0e5753e27145a5698fd7276eb2f9..80979edd04532ee4b89407b623cfcc11b8289c2e 100644 (file)
@@ -42,7 +42,7 @@ struct vbe_mode_info;
 int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int cleanUp);
 
 /* Run a BIOS ROM natively (only supported on x86 machines) */
-void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode,
+void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode,
                     struct vbe_mode_info *mode_info);
 
 /**