Changeset 516 for GPL/branches/uniaud32-2.1.x/lib32/pci.c
- Timestamp:
- Jul 14, 2010, 10:34:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.1.x/lib32/pci.c
r458 r516 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 #ifdef ACPI 58 APIRET APIENTRY ACPIFindPCIDevice(ULONG Bus, ULONG Dev, ULONG Fun, ULONG *PicIRQ, ULONG *ApicIRQ, ULONG *Hdl, char *Component); 59 #endif 60 60 61 61 //****************************************************************************** … … 135 135 //****************************************************************************** 136 136 //****************************************************************************** 137 #ifdef ACPI 137 #ifdef ACPI 138 138 struct SaveIRQForSlot 139 139 { … … 141 141 BYTE LowIRQ; 142 142 BYTE HighIRQ; 143 BYTE Pin; 143 BYTE Pin; 144 144 }; 145 145 extern struct SaveIRQForSlot sISRHigh[]; … … 150 150 struct pci_dev near *pcidev, int idx) 151 151 { 152 #ifdef ACPI153 APIRET rc;154 #endif155 152 int resNo, addr, found = 0; 156 153 u32 devNr, busNr, funcNr, detectedId, pciId, cfgaddrreg, temp, temp2; 157 #ifdef ACPI 158 ULONG temp1,temp3; //PS++ 159 #endif 154 #ifdef ACPI 155 APIRET rc; 156 ULONG temp1,temp3; //PS++ 157 #endif 160 158 u8 headerType; 161 159 … … 242 240 // IRQ and PIN 243 241 pci_read_config_dword(pcidev, PCI_INTERRUPT_LINE, &temp); 244 #ifdef ACPI 242 #ifdef ACPI 245 243 sISRHigh[SaveIRQCounter].Pin = (temp >> 8) & 0xf; 246 temp2 = temp3 = 0; 247 rc = ACPIFindPCIDevice( (ULONG)busNr, // Bus 248 (ULONG)devNr, // Dev 249 (ULONG)(pcidev->devfn >> 8) & 7, // Function 250 &temp1, // PIC IRQ 251 &temp3, // APIC IRQ 252 NULL, // ACPI handle to finding device 253 "Uniaud32"); // Name for acpi log 254 if (!rc) 255 { 256 // Check APIC IRQ, if we have /SMP /APIC, must be set 257 if (temp1) 258 temp = (temp & (~0xff)) | (temp1 & 0xff); 259 // Check PIC IRQ 260 else if (temp3) 261 temp = (temp & (~0xff)) | (temp3 & 0xff); 262 dprintf(("pci_query_device: IRQs ACPI PIC%d APIC%d", temp1, temp3)); 244 temp2 = temp3 = 0; 245 rc = ACPIFindPCIDevice( (ULONG)busNr, // Bus 246 (ULONG)devNr, // Dev 247 (ULONG)(pcidev->devfn >> 8) & 7, // Function 248 &temp1, // PIC IRQ 249 &temp3, // APIC IRQ 250 NULL, // ACPI handle to finding device 251 "Uniaud32"); // Name for acpi log 252 if (!rc) 253 { 254 // Check APIC IRQ, if we have /SMP /APIC, must be set 255 if (temp1) 256 temp = (temp & (~0xff)) | (temp1 & 0xff); 257 // Check PIC IRQ 258 else if (temp3) 259 temp = (temp & (~0xff)) | (temp3 & 0xff); 260 dprintf(("pci_query_device: IRQs ACPI PIC%d APIC%d", temp1, temp3)); 263 261 sISRHigh[SaveIRQCounter].LowIRQ = temp1; 264 262 sISRHigh[SaveIRQCounter].HighIRQ = temp3; 265 } 266 #endif /* ACPI */ 263 } 264 #endif /* ACPI */ 267 265 if( (u8)temp && (u8)temp != 0xff ) 268 266 {
Note:
See TracChangeset
for help on using the changeset viewer.