mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
dm: video: Add driver for VESA-compatible device
This adds a DM driver for VESA-compatible device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4dc5e54da3
commit
02c57abd50
1 changed files with 34 additions and 0 deletions
34
drivers/video/vesa.c
Normal file
34
drivers/video/vesa.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <pci.h>
|
||||
#include <vbe.h>
|
||||
|
||||
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);
|
Loading…
Reference in a new issue