summaryrefslogtreecommitdiff
path: root/lib_i386/video_bios.c
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2009-08-23 12:59:50 +1000
committerWolfgang Denk <wd@denx.de>2009-09-04 21:52:52 +0200
commitd7549024098af093785151261266a02be19af633 (patch)
tree8eb81a6bdbd6ed5c3d2f17de25b534e131640e63 /lib_i386/video_bios.c
parent04ff9ab158714d43cdf2f4f6f0235c3ea9d241a2 (diff)
downloadu-boot-imx-d7549024098af093785151261266a02be19af633.zip
u-boot-imx-d7549024098af093785151261266a02be19af633.tar.gz
u-boot-imx-d7549024098af093785151261266a02be19af633.tar.bz2
i386: Misc PCI fixups
Change PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY (Originally done in commit ff4e66e93c1a, regressed by commit 6d7f610b09f8) Cast PCI_ROM_ADDRESS_MASK to u32 Wrap probe_pci_video() call inside #ifdef CONFIG_VIDEO Change call to pci_find_class() to pci_find_devices(). This is based on a patch submitted on 1st March 2007 (Patch that fixes the compilation errors for sc520_cdp board) by mushtaq_k This patch requires that PCI_VIDEO_VENDOR_ID and PCI_VIDEO_DEVICE_ID be specified in the board config file. Dummy values have been added for the SC520 CDP board to enable compilation, but since I do not have one of these, I do know what the values should be Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'lib_i386/video_bios.c')
-rw-r--r--lib_i386/video_bios.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib_i386/video_bios.c b/lib_i386/video_bios.c
index ce96a3e..c8060e6 100644
--- a/lib_i386/video_bios.c
+++ b/lib_i386/video_bios.c
@@ -76,18 +76,22 @@ void print_bios_bios_stat(void)
}
#endif
+#ifdef CONFIG_VIDEO
+
#define PCI_CLASS_VIDEO 3
#define PCI_CLASS_VIDEO_STD 0
#define PCI_CLASS_VIDEO_PROG_IF_VGA 0
+static struct pci_device_id supported[] = {
+ {PCI_VIDEO_VENDOR_ID, PCI_VIDEO_DEVICE_ID},
+ {}
+};
static u32 probe_pci_video(void)
{
pci_dev_t devbusfn;
- if ((devbusfn = pci_find_class(PCI_CLASS_VIDEO,
- PCI_CLASS_VIDEO_STD,
- PCI_CLASS_VIDEO_PROG_IF_VGA, 0)) != -1) {
+ if ((devbusfn = pci_find_devices(supported, 0) != -1)) {
u32 old;
u32 addr;
@@ -103,7 +107,7 @@ static u32 probe_pci_video(void)
/* Test the ROM decoder, do the device support a rom? */
pci_read_config_dword(devbusfn, PCI_ROM_ADDRESS, &old);
- pci_write_config_dword(devbusfn, PCI_ROM_ADDRESS, PCI_ROM_ADDRESS_MASK);
+ pci_write_config_dword(devbusfn, PCI_ROM_ADDRESS, (u32)PCI_ROM_ADDRESS_MASK);
pci_read_config_dword(devbusfn, PCI_ROM_ADDRESS, &addr);
pci_write_config_dword(devbusfn, PCI_ROM_ADDRESS, old);
@@ -133,11 +137,6 @@ static u32 probe_pci_video(void)
return 0;
}
-
-#endif
-
-#ifdef CONFIG_VIDEO
-
static int probe_isa_video(void)
{
u32 ptr;
@@ -220,3 +219,4 @@ int video_bios_init(void)
}
#endif
+#endif