************************************************************/
#ifndef GRUSS_TESTING
#define CONFIG_VIDEO /* To enable video controller support */
+#define PCI_VIDEO_VENDOR_ID 0 /*Use the appropriate vendor ID*/
+#define PCI_VIDEO_DEVICE_ID 0 /*Use the appropriate Device ID*/
#else
#undef CONFIG_VIDEO
#endif
vendor, device, class_code);
#endif
/* Enable the rom addess decoder */
- pci_write_config_dword(dev, PCI_ROM_ADDRESS, PCI_ROM_ADDRESS_MASK);
+ pci_write_config_dword(dev, PCI_ROM_ADDRESS, (u32)PCI_ROM_ADDRESS_MASK);
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &addr_reg);
if (!addr_reg) {
}
#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;
/* 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);
return 0;
}
-
-#endif
-
-#ifdef CONFIG_VIDEO
-
static int probe_isa_video(void)
{
u32 ptr;
}
#endif
+#endif