xref: /openbmc/u-boot/drivers/video/vesa.c (revision 382bee57)
1 /*
2  * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <dm.h>
9 #include <pci.h>
10 #include <vbe.h>
11 
12 static int vesa_video_probe(struct udevice *dev)
13 {
14 	return vbe_setup_video(dev, NULL);
15 }
16 
17 static const struct udevice_id vesa_video_ids[] = {
18 	{ .compatible = "vesa-fb" },
19 	{ }
20 };
21 
22 U_BOOT_DRIVER(vesa_video) = {
23 	.name	= "vesa_video",
24 	.id	= UCLASS_VIDEO,
25 	.of_match = vesa_video_ids,
26 	.probe	= vesa_video_probe,
27 };
28 
29 static struct pci_device_id vesa_video_supported[] = {
30 	{ PCI_DEVICE_CLASS(PCI_CLASS_DISPLAY_VGA << 8, ~0) },
31 	{ },
32 };
33 
34 U_BOOT_PCI_DEVICE(vesa_video, vesa_video_supported);
35