vesa.c 661 B

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