diff options
Diffstat (limited to 'arch/powerpc/platforms/iseries/pci.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 21cddc30220b..175aac8ca7e5 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -318,6 +318,7 @@ static void __init iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) | |||
318 | { | 318 | { |
319 | struct resource *bar_res = &dev->resource[bar_num]; | 319 | struct resource *bar_res = &dev->resource[bar_num]; |
320 | long bar_size = pci_resource_len(dev, bar_num); | 320 | long bar_size = pci_resource_len(dev, bar_num); |
321 | struct device_node *dn = pci_device_to_OF_node(dev); | ||
321 | 322 | ||
322 | /* | 323 | /* |
323 | * No space to allocate, quick exit, skip Allocation. | 324 | * No space to allocate, quick exit, skip Allocation. |
@@ -335,9 +336,9 @@ static void __init iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) | |||
335 | * Allocate the number of table entries needed for BAR. | 336 | * Allocate the number of table entries needed for BAR. |
336 | */ | 337 | */ |
337 | while (bar_size > 0 ) { | 338 | while (bar_size > 0 ) { |
338 | iomm_table[current_iomm_table_entry] = dev->sysdata; | 339 | iomm_table[current_iomm_table_entry] = dn; |
339 | ds_addr_table[current_iomm_table_entry] = | 340 | ds_addr_table[current_iomm_table_entry] = |
340 | iseries_ds_addr(dev->sysdata) | (bar_num << 24); | 341 | iseries_ds_addr(dn) | (bar_num << 24); |
341 | bar_size -= IOMM_TABLE_ENTRY_SIZE; | 342 | bar_size -= IOMM_TABLE_ENTRY_SIZE; |
342 | ++current_iomm_table_entry; | 343 | ++current_iomm_table_entry; |
343 | } | 344 | } |
@@ -410,7 +411,7 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev) | |||
410 | struct device_node *node; | 411 | struct device_node *node; |
411 | int i; | 412 | int i; |
412 | 413 | ||
413 | node = find_device_node(bus, pdev->devfn); | 414 | node = pci_device_to_OF_node(pdev); |
414 | pr_debug("PCI: iSeries %s, pdev %p, node %p\n", | 415 | pr_debug("PCI: iSeries %s, pdev %p, node %p\n", |
415 | pci_name(pdev), pdev, node); | 416 | pci_name(pdev), pdev, node); |
416 | if (!node) { | 417 | if (!node) { |
@@ -441,7 +442,6 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev) | |||
441 | } | 442 | } |
442 | } | 443 | } |
443 | 444 | ||
444 | pdev->sysdata = node; | ||
445 | allocate_device_bars(pdev); | 445 | allocate_device_bars(pdev); |
446 | iseries_device_information(pdev, bus, *sub_bus); | 446 | iseries_device_information(pdev, bus, *sub_bus); |
447 | } | 447 | } |