From 02c57abd5079dec2311cf51e785bd2090b7bb440 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sun, 9 Oct 2016 04:14:11 -0700 Subject: dm: video: Add driver for VESA-compatible device This adds a DM driver for VESA-compatible device. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/video/vesa.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 drivers/video/vesa.c (limited to 'drivers/video') diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c new file mode 100644 index 0000000000..ddf8df8993 --- /dev/null +++ b/drivers/video/vesa.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2016, Bin Meng + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include + +static int vesa_video_probe(struct udevice *dev) +{ + return vbe_setup_video(dev, NULL); +} + +static const struct udevice_id vesa_video_ids[] = { + { .compatible = "vesa-fb" }, + { } +}; + +U_BOOT_DRIVER(vesa_video) = { + .name = "vesa_video", + .id = UCLASS_VIDEO, + .of_match = vesa_video_ids, + .probe = vesa_video_probe, +}; + +static struct pci_device_id vesa_video_supported[] = { + { PCI_DEVICE_CLASS(PCI_CLASS_DISPLAY_VGA << 8, ~0) }, + { }, +}; + +U_BOOT_PCI_DEVICE(vesa_video, vesa_video_supported); -- cgit v1.2.3