Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Bin Meng | 02c57ab | 2016-10-09 04:14:11 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> |
Bin Meng | 02c57ab | 2016-10-09 04:14:11 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <dm.h> |
| 8 | #include <pci.h> |
| 9 | #include <vbe.h> |
| 10 | |
| 11 | static int vesa_video_probe(struct udevice *dev) |
| 12 | { |
| 13 | return vbe_setup_video(dev, NULL); |
| 14 | } |
| 15 | |
| 16 | static const struct udevice_id vesa_video_ids[] = { |
| 17 | { .compatible = "vesa-fb" }, |
| 18 | { } |
| 19 | }; |
| 20 | |
| 21 | U_BOOT_DRIVER(vesa_video) = { |
| 22 | .name = "vesa_video", |
| 23 | .id = UCLASS_VIDEO, |
| 24 | .of_match = vesa_video_ids, |
| 25 | .probe = vesa_video_probe, |
| 26 | }; |
| 27 | |
| 28 | static struct pci_device_id vesa_video_supported[] = { |
| 29 | { PCI_DEVICE_CLASS(PCI_CLASS_DISPLAY_VGA << 8, ~0) }, |
| 30 | { }, |
| 31 | }; |
| 32 | |
| 33 | U_BOOT_PCI_DEVICE(vesa_video, vesa_video_supported); |