Changeset 333 for GPL/branches/uniaud32-2.0/lib32/pci.c
- Timestamp:
- Apr 1, 2008, 10:54:17 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.0/lib32/pci.c
r306 r333 55 55 #define PCI_CONFIG_DATA 0xCFC 56 56 57 #ifdef ACPI 58 APIRET APIENTRY ACPIFindPCIDevice(ULONG Bus, ULONG Dev, ULONG Fun, ULONG *PicIRQ, ULONG *ApicIRQ, ULONG *Hdl, char *Component); 59 #endif 57 60 58 61 //****************************************************************************** … … 135 138 struct pci_dev near *pcidev, int idx) 136 139 { 140 #ifdef ACPI 141 APIRET rc; 142 #endif 137 143 int resNo, addr, found = 0; 138 144 u32 devNr, busNr, funcNr, detectedId, pciId, cfgaddrreg, temp, temp2; 145 #ifdef ACPI 146 ULONG temp1,temp3; //PS++ 147 #endif 139 148 u8 headerType; 140 149 … … 221 230 // IRQ and PIN 222 231 pci_read_config_dword(pcidev, PCI_INTERRUPT_LINE, &temp); 232 #ifdef ACPI 233 temp2 = temp3 = 0; 234 rc = ACPIFindPCIDevice( (ULONG)busNr, // Bus 235 (ULONG)devNr, // Dev 236 (ULONG)(pcidev->devfn >> 8) & 7, // Function 237 &temp1, // PIC IRQ 238 &temp3, // APIC IRQ 239 NULL, // ACPI handle to finding device 240 "Uniaud32"); // Name for acpi log 241 if (!rc) 242 { 243 // Check APIC IRQ, if we have /SMP /APIC, must be set 244 if (temp3) 245 temp = (temp & (~0xff)) | (temp3 & 0xff); 246 // Check PIC IRQ 247 else if (temp1) 248 temp = (temp & (~0xff)) | (temp1 & 0xff); 249 dprintf(("pci_query_device: IRQs ACPI PIC%d APIC%d", temp1, temp3)); 250 } 251 #endif /* ACPI */ 223 252 if( (u8)temp && (u8)temp != 0xff ) 224 253 {
Note:
See TracChangeset
for help on using the changeset viewer.