diff options
author | Simon Glass <sjg@chromium.org> | 2015-11-29 20:17:57 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-01-12 17:19:09 (GMT) |
commit | 3f4e1e8efc5b700473f1920e92b521cb0945a6e3 (patch) | |
tree | f6a14337c06d9dc7b48367073ff17eeb467ddd8a /drivers/video | |
parent | 7d8e4042f19eafcb24eeabbf10830aa21c3b700c (diff) | |
download | u-boot-3f4e1e8efc5b700473f1920e92b521cb0945a6e3.tar.xz |
dm: pci: video: Convert video and pci_rom to use DM PCI API
Adjust these files to use the driver-model PCI API instead of the legacy
functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/vesa_fb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/vesa_fb.c b/drivers/video/vesa_fb.c index a19651f..021c1d6 100644 --- a/drivers/video/vesa_fb.c +++ b/drivers/video/vesa_fb.c @@ -19,8 +19,8 @@ GraphicDevice ctfb; void *video_hw_init(void) { GraphicDevice *gdev = &ctfb; + struct udevice *dev; int bits_per_pixel; - pci_dev_t dev; int ret; printf("Video: "); @@ -33,14 +33,14 @@ void *video_hw_init(void) return NULL; } if (vbe_get_video_info(gdev)) { - dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, 0); - if (dev < 0) { + ret = dm_pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, 0, &dev); + if (ret) { printf("no card detected\n"); return NULL; } bootstage_start(BOOTSTAGE_ID_ACCUM_LCD, "vesa display"); - ret = pci_run_vga_bios(dev, NULL, PCI_ROM_USE_NATIVE | - PCI_ROM_ALLOW_FALLBACK); + ret = dm_pci_run_vga_bios(dev, NULL, PCI_ROM_USE_NATIVE | + PCI_ROM_ALLOW_FALLBACK); bootstage_accum(BOOTSTAGE_ID_ACCUM_LCD); if (ret) { printf("failed to run video BIOS: %d\n", ret); |