mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 03:51:31 +00:00
video: vesa_fb: Look up VGA device by class instead of id
Per PCI spec, VGA device reports its class as standard 030000h in its configuration space, so we can use it to determine if we need run option rom instead of testing the supported vendor/device ids. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5afeb4bb45
commit
b018a8c716
1 changed files with 2 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
*
|
* VESA frame buffer driver
|
||||||
* Vesa frame buffer driver for x86
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Google, Inc
|
* Copyright (C) 2014 Google, Inc
|
||||||
*
|
*
|
||||||
|
@ -17,16 +16,6 @@
|
||||||
*/
|
*/
|
||||||
GraphicDevice ctfb;
|
GraphicDevice ctfb;
|
||||||
|
|
||||||
/* Devices to allow - only the last one works fully */
|
|
||||||
struct pci_device_id vesa_video_ids[] = {
|
|
||||||
{ .vendor = 0x102b, .device = 0x0525 },
|
|
||||||
{ .vendor = 0x1002, .device = 0x5159 },
|
|
||||||
{ .vendor = 0x1002, .device = 0x4752 },
|
|
||||||
{ .vendor = 0x1002, .device = 0x5452 },
|
|
||||||
{ .vendor = 0x8086, .device = 0x0f31 },
|
|
||||||
{},
|
|
||||||
};
|
|
||||||
|
|
||||||
void *video_hw_init(void)
|
void *video_hw_init(void)
|
||||||
{
|
{
|
||||||
GraphicDevice *gdev = &ctfb;
|
GraphicDevice *gdev = &ctfb;
|
||||||
|
@ -36,8 +25,7 @@ void *video_hw_init(void)
|
||||||
|
|
||||||
printf("Video: ");
|
printf("Video: ");
|
||||||
if (vbe_get_video_info(gdev)) {
|
if (vbe_get_video_info(gdev)) {
|
||||||
/* TODO: Should we look these up by class? */
|
dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, 0);
|
||||||
dev = pci_find_devices(vesa_video_ids, 0);
|
|
||||||
if (dev == -1) {
|
if (dev == -1) {
|
||||||
printf("no card detected\n");
|
printf("no card detected\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue