diff options
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index d51be7c7a2ef..c1b1e14775e4 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -1254,6 +1254,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
1254 | 1254 | ||
1255 | DBG("Try to map irq for %s...\n", pci_name(pci_dev)); | 1255 | DBG("Try to map irq for %s...\n", pci_name(pci_dev)); |
1256 | 1256 | ||
1257 | #ifdef DEBUG | ||
1258 | memset(&oirq, 0xff, sizeof(oirq)); | ||
1259 | #endif | ||
1257 | /* Try to get a mapping from the device-tree */ | 1260 | /* Try to get a mapping from the device-tree */ |
1258 | if (of_irq_map_pci(pci_dev, &oirq)) { | 1261 | if (of_irq_map_pci(pci_dev, &oirq)) { |
1259 | u8 line, pin; | 1262 | u8 line, pin; |
@@ -1279,8 +1282,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
1279 | if (virq != NO_IRQ) | 1282 | if (virq != NO_IRQ) |
1280 | set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 1283 | set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
1281 | } else { | 1284 | } else { |
1282 | DBG(" -> got one, spec %d cells (0x%08x...) on %s\n", | 1285 | DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
1283 | oirq.size, oirq.specifier[0], oirq.controller->full_name); | 1286 | oirq.size, oirq.specifier[0], oirq.specifier[1], |
1287 | oirq.controller->full_name); | ||
1284 | 1288 | ||
1285 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 1289 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
1286 | oirq.size); | 1290 | oirq.size); |
@@ -1289,6 +1293,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
1289 | DBG(" -> failed to map !\n"); | 1293 | DBG(" -> failed to map !\n"); |
1290 | return -1; | 1294 | return -1; |
1291 | } | 1295 | } |
1296 | |||
1297 | DBG(" -> mapped to linux irq %d\n", virq); | ||
1298 | |||
1292 | pci_dev->irq = virq; | 1299 | pci_dev->irq = virq; |
1293 | pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq); | 1300 | pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq); |
1294 | 1301 | ||